database,database-design,relational-database,database-normalization,functional-dependencies

I'm not sure about the meaning of the columns in your table, but if your primary key consists of all the columns, you'll only have trivial functional dependencies of the form A->B with B being a subset of A. (If you had any other functional dependencies of the form A->B...

unit-testing,testing,tdd,functional-testing,functional-dependencies

unit tests you should tests everything. but not everything using unit-tests. unit tests don't depend on environment - database, internet connection etc. best practices for working with untrusted/unstable 3rd party tools is to create anti-corruption layer between your code and 3rd party code. so refactor your code to make your...

database-normalization,functional-dependencies,3nf,candidate-key

Re your original question: Your organization and reasoning are unsound. First give the all the FDs. Eg this determines the CKs. Eg you cannot reason soundly on just giving the (alleged) CKs (which imply certain FDs) and a couple of non-FDs. Eg "non-transitively dependent" cannot be determined without knowing all...

database-normalization,functional-dependencies,3nf,bcnf

If we write the given set of FDs with singleton right-hand side, we have - A->BA->CA->DBC->ABC->DD->B We can see at once 2 transitive dependencies. We have A->D and D->B so we don't need A->B and also we have BC->A and A->D so we don't need BC->D. So now we have...

database,functional-dependencies,inference

You're going about this the wrong way. In order for "{X->A, Y->B}, therefore XY->AB" to be true, you need to prove that you can derive XY->AB from {X->A, Y->B}, using only Armstrong's axioms and the additional rules derived from Armstrong's axioms. ...

database,normalization,database-normalization,functional-dependencies

It appears to me that you have skipped the NF2 and normalised the relation straight into the 3NF :) The primary key for the original relation should be (A,B) as by inference rules (transitivity, such as A->D,E and D->I,J therefore A->I,J) it determines all other attributes. From this point onwards...

database,database-design,primary-key,functional-dependencies

If this is what the business situation is like, and this solution accurately refelcts the business scenario, then what could possibly be "bad" about it ? EDIT I assumed you were aware that such designs might get you into problems for certain "swapping" updates, but perhaps it would have been...

database-design,functional-dependencies,database-diagramming,database-programming,oracle11gr1

You must know what the table and rules mean first. Apparently, the table means something like: /* student with id [si] has name [sn] and address [sa] and major [sm] and takes course [ci] with title [ct] from instructor with id [ii] and name [in] and office [io] with grade...

I found a way to do this. Find a closure of set of attributes of BFG (notation BFG+). If there is A and E, it can be derived, otherwise it can't. Same for ACG. Example: 7. BFG+ = BFG (trivially) 8. BFG+ = BFGE (from 3.) 9. BFG+ = BFGEH...

join,relational-algebra,cartesian-product,functional-dependencies,lossless

It helps if we demystify the concept of lossless decomposition a bit: it really just means that joining R1, R2 and R3 should yield the original R. Do you know the chase test a.k.a "the tableau method"? It's a cool algorithm to test for losslessness. It's easy to program, and...

relational-database,relation,relational-algebra,functional-dependencies,candidate-key

The keys here are ABD, ACD and BCD. You were on the right track. After dividing the attributes in three groups, the attributes under "only on the left" list are always a part of the key. Here that attribute is D. "I also tried computing the closures of (AD), (BD),...

relational-algebra,functional-dependencies

The discussion of why your answer is wrong can be found in the comments. The correct answer is #4: only in this answer A, B and C are superkeys as in the original set of functional dependencies. In #1 A is not a superkey (e.g., A -> B does not...

database,functional-dependencies

Functional dependency happens in a relation when the relation "is a function". Formally, this means that if you have an FD like X -> Y then each value of X must relate to exactly 1 value of Y. If we invert that statement, we get a "test" for a failure...

database,relational-database,functional-dependencies

The easiest way to do this would be to buy a computer-aided software engineering (CASE) tool that supports reverse-engineering. These tools can examine a SQL database, and generate every possible 5NF schema from the existing tables. I first saw tools like these in the 1980s, I think; I don't know...

database-design,functional-dependencies

Functional dependencies hold for all time. When you try to derive FDs from data, you're liable to derive FDs that hold only by coincidence. The FD make, color -> model means "When I see a Honda that's red, I know it's an Accord." As far as the data you're given...

haskell,ghc,functional-dependencies,type-constraints

You are misunderstanding how type variables are bound. They are not bound by the tau type (the a -> a in your example), but an implicit binder based on the full phi type ((Bar a b) => a -> a). This binding can be made explicit with the ExplicitForAll GHC...

sql,database,functional-dependencies

Start with these explicit functional dependencies. A->B B->C A->B and B->C, therefore A->C (transitivity rule, from Armstrong's axioms). The FD A->C is an implicit FD. It's logically implied by the two explicit FDs A->B and B->C....

Nope. Quoting wikipedia, a functional dependency X -> Y is called trivial if Y is a subset of X. You're right that you can infer b -> b from b -> d and d -> b via transitivity; but that only means that if the set were {b -> d,...

database,relational-database,database-normalization,functional-dependencies,bcnf

Take a look at database normalization, especially at following concepts 1. normal form (1NF) 2. normal form (2NF) 3. normal form (3NF) Boyce–Codd normal form (BCNF). It's been a while for me, but here we go: first_name, surname can be derived by student_id so we put them in an own...

database,key,functional-dependencies

The only candidate key in your example is indeed B. Any collection of attributes containing B will be a superkey, e.g., B itself, AB, BC or ABD.