-1

Given 1) CA -> B and 2) B -> C can you infer A -> B using Armstrong's axioms?

I tried to use inference rules to prove this, but get stuck.

BA -> CA Augmentation of A
BA -> CA and CA -> B Transitive property
AB -> B

It seems to makes sense to be able to drop the B as it is redundant? Is that an axiom that can be proved using the fundamental inference rules?

Is this problem even possible?

philipxy
  • 14,867
  • 6
  • 39
  • 83
Henry
  • 564
  • 3
  • 22
  • Why are you "stuck", doing exactly what? Give your textbook name & edition & quote the algorithm you are following & show your work following it. PS What do you mean, "redundant"? (Rhetorical.) – philipxy Jul 04 '18 at 17:29

2 Answers2

0

You seem to misunderstand the basics. You are proving that FDs hold when other ones do, you are not proving axioms. Armstrong's (so-called) "axioms" are the "fundamental inference rules" for FDs. Read your textbook. It says that the axioms are "complete" & says that that means that if you keep applying one that you haven't applied since you added an FD until you don't add any FDs then you will get all the FDs that hold.

So just do that & see whether yours is added/implied. Inspiration and/or luck might shorten things.

And--one counterexample disproves a claim. So generate some small example relations with attributes A, B & C where CA -> B & B -> C and try to generate one where it is not the case that A -> B. Again, inspiration and/or luck might shorten things.

philipxy
  • 14,867
  • 6
  • 39
  • 83
-1

A -> B cannot be inferred as the following counterexample shows:

Assume C is a nonempty set of attributes. And B = C (hence B is also a nonempty set of attributes and each member of B is also member of C and vice versa).

By the reflexivity axiom it is obvious, that C -> C holds. And since B equals C, also B -> C holds.

Assume A is an empty set of attributes. Then clearly no nonempty set of attributes can be inferred from A. (One can't infer a customer's address from nothing).

CA denotes the union of C and A. Since A is empty, CA equals C. Hence CA -> C is the same as C -> C which is true by the reflexivity axiom. And since B equals C also CA -> B holds.


For those who don't think that empty sets are valid sets a more explicit example:

C = { street, telephone_number }, B = C, A = { street }.

CA still equals C, hence CA -> B holds, just as B -> C. But clearly it'll be hard to infer a telephone number if you only know the street, hence A -> B doesn't hold.


Since there are people who are convinced that the telephone number of a person functionally depends on the street that person lives in (which, if true, would indeed break my counterexample), I'll elaborate a little on that.

I live in a village that has many (i.e. more than one) streets. Each of those streets have buildings which are identified by a number. Each of those buildings have one or more apartments (like 3rd floor left) and in each of those apartments there live 1 or more persons. All those persons have a telephone. Some persons share a telephone, others won't.

A relation that describes the people in my village has the attributes street, building_number, apartment_number, telephone_number among others (name of the person, date of birth, ...).

Since a single value of street maps to many persons in many cases (the cases in which there's only a single building with a single apartment where only a single person lives are rare), this means that for each street there's a long list of telephone numbers (where "long" means "more than one").

Even if the full address is used (street, building number, apartment number) it is still possible to find several telephone numbers since potentially more than one person lives at that address.

And because some people share a phone, the telephone number is not a key for persons either. And since it isn't excluded that persons that share a telephone live at different addresses, there's not even a functional dependency between telephone number and street.

By the above there is no functional dependency between { street } and { telephone_number }, which means there isn't a functional dependency between { street } and { street, telephone_number } either. Hence A -> B doesn't hold.

Ronald
  • 2,842
  • 16
  • 16
  • 1
    What does A = empty mean? Why is A -> B false? Do you understand that FD X -> Y holds in a relational database model relation (value or variable) when for all tuple pairs if their X is the same then so is their Y? – philipxy Jul 05 '18 at 14:41
  • Well, if empty isn't a valid rule (no functional dependencies), then let A be a real subset of C. That works as well as a counterexample – Ronald Jul 06 '18 at 06:55
  • 1
    A is a set of attributes. It is not a rule or set of FDs. Anyway it is not clear what you mean by the parentheses. And "real subset" doesn't mean anything. The phrasing for the empty set is, A is empty or A = {}. "Empty" is not commonly a name for the empty set. The question is, from CA -> B & B -> C can we infer A -> B. But you address only a case where A = {}. Do you understand that those arrows mean "functionally determines" & not "implies"? And you don't clearly justify your claims, eg via the axioms/rules. – philipxy Jul 06 '18 at 17:27
  • So if A, B and C are sets of attributes, then B=C is a possible situation and A is empty (an empty set of attributes) is so as well. CA is the union of A and C, and because A is empty CA = C. Hence CA->B is trivially true because C->C. And B->C is trivially true because C->C. A->B can't be true; it would require a function that without input gives the values of the attributes of B as an output. – Ronald Jul 10 '18 at 16:36
  • I admit that my answer to your question (what does A is empty mean?) wasn't optimally formulated. My apologies for that. But my claim holds. And if you don't like empty sets, it also works if A is a real subset of C (i.e. a subset but not equal). – Ronald Jul 10 '18 at 16:42
  • 1
    Your comments don't make any sense. As I already explained you have to show that any time CA functionally determines B & B functionally determines C then A must functionally determine B. PS The word you want is not "real" but "proper". PPS Please edit clarifications into posts, not comments. – philipxy Jul 10 '18 at 18:21
  • @philipxy satisfied with the explicit counterexample now? – Ronald Jul 11 '18 at 10:13
  • 1. You give FDs that do & don't hold, but you don't show that such a case exists, so you haven't given a counterexample. (Give a relation value with those properties.) 2. You don't clearly connect "can't infer a customer's address from nothing" & "it'll be hard to infer a telephone number if you only know the street" to FDs. The use of "infer" in those phrases is not "functionally determines". 3. If there is only one phone number then {} is a determinant; your claim that FD {}->A can't hold is wrong. You'd have to show it doesn't follow from just the given FDs holding--the question is begged. – philipxy Jul 12 '18 at 18:50
  • 1. I give FDs that hold: CA -> B and B -> C which are the given FDs. And I construct an example in which the prerequisites are fulfilled but the claim (A -> B) isn't valid. 2. I admit I didn't write A -> B doesn't hold. 3. I don't want to prove something for every database that is imaginable. As an example the data warehouse of my telephone company contains multiple telephone numbers and this even per street (attribute of the customer's address) in many cases. I've read somewhere that a single counterexample is sufficient to disprove the claim ((CA->B && B->C) => A->B). – Ronald Jul 12 '18 at 22:43
  • You haven't addressed any point in my last comment. You haven't given/constructed a counterexample. You have said, imagine a case/relation where certain FDs hold & don't hold. You haven't shown such a case exists. To show it exists requires disproving the point you are trying to disprove. Give a relation where your FDs hold & don't hold as appropriate. That is the simplest way to show such a relation exists. That is a counterexample. (I repeat myself.) – philipxy Jul 12 '18 at 23:09
  • Your new edit does not fix the problems. You do get closer to a counterexample, but you have only described it in informal terms, you haven't given a corresponding relation. (But when you do, the motivating informality is irrelevant.) Moreover your edits say they are addressing certain claims, but I never made those claims, you have misinterpreted me. ("For those who don't think that empty sets are valid [...]", "Since there are people who are convinced that [...]".) – philipxy Jul 20 '18 at 21:56
  • So let R be a relation in 3rd normal form having non-key attributes A1,...,An, n> 2. Let C = {A1, A2], B = C and A = {A1}. Now CA->B holds and B->C holds, but A->B doesn't hold. It's very annoying you refuse to understand the example. And at least I try to make clear why the claim is wrong and don't just wish the OP good luck with his problem – Ronald Jul 21 '18 at 05:26
  • You have *again* only given some properties & not shown that a value exists satisfying them. Proving such a value exists *is the same thing as disproving the original claim*. (Moreover in the case of that comment you don't explain why it must be that A->B can't hold.) Re my answer, I didn't give a solution because the question is obviously homework; I disabused the asker of misconceptions & told them how to go about answering their assignment. I also left help in a comment on the question. I have also persevered in trying to help you. – philipxy Jul 21 '18 at 06:30
  • So if I understand you correctly, you doubt the existence of a 3rd NF satisfying relation if I can't provide real values like "main street" and "1-234-456789". I've seen loads of databases and tables therein in 3rd NF. And believe me, there was data stored (without data databases are pretty pointless). Clearly this is homework. And giving an idea to start with is, in my vision, a proper help. To formulate the idea until it's 100% formally correct it then the task of the OP. And BTW A->B doesn't hold by the definition of the 3rd NF. – Ronald Jul 22 '18 at 08:36
  • No, again you are misinterpreting what I said, I said your argument is unsound/invalid until you show such a value exists. You are also wrong that your comment conditions force A->B to not hold, eg (X A1 A2)(x1 y y)(x2 y y)). I'm done. – philipxy Jul 22 '18 at 09:15
  • You confuse a situation within a single row with the validity for all rows. A relation in 3rd NF does NOT have FD within non-key attributes by definition. And yes it will be possible to find a subset of rows where a FD seems to exist, but it is not the data that is stored, but the data you want to be able to store that determines if there is a FD between sets of attributes. – Ronald Jul 22 '18 at 09:55