Questions tagged [functional-dependencies]

A functional dependency is a constraint between two sets of attributes in a relation, in relational algebra, databases and type systems.

Functional dependencies (FD) are fundamental to the process of normalization.

Given a relation R, a set of attributes X in R is said to functionally determine a set of attributes Y, also in R, (written X → Y) if, and only if, whenever two tuples coincide on all attributes of X, they also coincide on all attributes of Y. Sound, complete and non-redundant axiomatisation of functional dependencies is given by Armstrong rules. Functional dependencies are also used in the Haskell programming language to describe relations between types, to support type level relational programming.

In other words, a dependency FD: X → Y means that the values of Y are determined by the values of X. Two tuples sharing the same values of X will necessarily have the same values of Y.

Enter image description here

544 questions
-2
votes
1 answer

Is this allowed in BCNF Normalization?

I know that in BCNF if A->B then A must be a candidate key. But what about if A is part of the candidate key but not the whole candidate key? Let me explain in an example: Exercise 1: Candidate keys: {A},{B,C} Functional dependencies: B->D Relation:…
-2
votes
1 answer

derivation of nontrivial dependencies

I am seeking for help. I am stuck over a question based on functional dependency. Consider the relation schema R= (A, B, C, D, E, G) and the set F of functional dependencies: A → BC BD → E CD → AB a. Derive the nontrivial dependencies from F using…
Encipher
  • 1,370
  • 1
  • 14
  • 31
-2
votes
2 answers

Functional Dependency Reduction

I'm supposed to find the minimal cover for this set of FD's. Please let me know if my answer is correct. XZ->Z XZ->Y XZ->B YA->C YA->G C->W B->G XZ->G My answer: X->Z (deleted Z attribute, trivial FD) Z->Y (deleted X, since it entails X->Z->Y…
Leif
  • 177
  • 1
  • 5
  • 17
-2
votes
1 answer

How to resolve dependencies that are both partial as well as transitive?

I have created this ER Diagram for a virtual car rental business. Each CAR can have many copies (CARCOPY) that can be hired many times over its lifetime. A CUSTOMER can hire more than one CARCOPY at once. I've created an entity named HIREDETAIL…
-2
votes
1 answer

Can A and B be functionaly dependent on each other?

If B is functionally dependent on A (A -> B) can A be functionally dependent on B (B -> A)? Why? Example: A table contains five columns: Patient Number, Full name, Bed number, Ward number and Ward name. Is it possible to say that Ward Number -> Ward…
Marcus
  • 289
  • 1
  • 3
  • 19
-2
votes
1 answer

How to determine a lossless join dependency preserving decomposition

I have a homework problem to determine a lossless join dependency decomposition for the following: R(A, B, C, D, E, F, G, H, I, J) with the functional dependencies: AB -> CG C -> A BD -> EF ABC -> DEFG G -> H G -> I G -> J H -> IJ J -> I I -> H I…
Hitomi86
  • 45
  • 7
-2
votes
1 answer

Checking if a functional dependency is in a closure

R=(A,B,C,D,E,F,G) Functional dependencies: A→B BF→C AB→F D→E Which of the following FDs are in F+ (the closure of F)? Select all correct answers. A→F DF→E B→E A→G ABC→C We learned about using reflexivity and augmentation to check if they…
-2
votes
1 answer

Is there a solution for the match-mapping-group pattern in python by Functional programming?

For example, I have a list such as [2, 4, 7, 9, 6, 12, 38]. I want to firstly recognize each number by whether it is odd, then add 100 to each odd and 101 to each even,finally get two lists. There are 3 steps: 1. Number matching that it is odd or…
-2
votes
1 answer

When does BCNF not preserve functional dependencies, and should I then use 3NF?

When is BCNF not able to preserve functional dependencies? When is a 3NF decomposition desired instead of a BCNF decomposition preserving functional dependencies? Please explain with an example. I saw this question but it does not answer my…
-2
votes
1 answer

Confusion re PK (primary key) and CK (candidate key) for FDs (functional dependencies) in R={A,B,C,D,E,F}

I have a confusion re the question below since according to me maybe its answer is that AD is a candidate key. But it is the primary key so I want to know: Is its candidate key the same as its primary key? A relation R={A,B,C,D,E,F} is given with…
-2
votes
1 answer

Is A → B the same as B → A when speaking of functional dependencies?

This might very simple but I just had to check with you guys. When it comes to databases, does the arrow in literature imply vise versa on equality? Meaning, is A → B considered the SAME as B → A, in particular when it comes to databases and…
Ann
  • 1
  • 1
-2
votes
2 answers

Why is this table in 3NF?

Consider the following table: The primary key is a composite key consisting of PatID and PhysName. My professor says this table is in 3rd normal form. I thought it's not even in second normal form because the non-key attribute, Name, is not…
-2
votes
1 answer

identifying the functional dependencies

I have been reading up on database design and I am having some difficulty constructing functional dependency diagrams from tables. I have the following table. Each salesperson is identified by a salesperson’s number, and their sales activities are…
-2
votes
2 answers

Functional dependency: find candidate key

In relation R = (ABCDEFGH) the set of functional dependencies that hold is {BE -> GH, G -> FA, D -> C, F -> B} What is a candidate key of R? I found the answer can be BED, DEG, or FED. However, this question is a multiple choice question where I…
zgfn
  • 1
-3
votes
1 answer

Applied Databse question on Functional Dependency

LabResults: FirstName, LastName, DOB, Gender, ConsultDoctor, SSN, Address, Phone -- pk, TestRequest, ChemistryPanels, DrugLevel ImagingResults: PatientName, DOB, Phone fk, ICD9, Authorization, ReferringPhysician, PhysicianNum …
1 2 3
36
37