A functional dependency is a relationship between two sets of attributes in a database where the value of one attribute (or set of attributes) uniquely determines the value of another attribute (or set of attributes).
Click to reveal answer
beginner
Explain the notation A → B in functional dependency.
The notation A → B means that attribute A functionally determines attribute B. If two rows have the same value for A, they must have the same value for B.
Click to reveal answer
intermediate
Why are functional dependencies important in database design?
Functional dependencies help identify how data is related and are used to organize tables to reduce redundancy and avoid update anomalies.
Click to reveal answer
beginner
Give a real-life example of a functional dependency.
In a student database, StudentID → StudentName means the student ID uniquely determines the student's name. If two records have the same StudentID, they must have the same StudentName.
Click to reveal answer
intermediate
Can a functional dependency have multiple attributes on the left side? Explain.
Yes, a functional dependency can have a set of attributes on the left side. For example, (CourseID, StudentID) → Grade means the combination of CourseID and StudentID uniquely determines the Grade.
Click to reveal answer
What does the functional dependency A → B mean?
AA and B are unrelated
BB uniquely determines A
CA uniquely determines B
DA and B have the same value
✗ Incorrect
A → B means if two rows have the same value for A, they must have the same value for B.
Which of the following is an example of a functional dependency?
AStudentID → StudentName
BStudentName → StudentID
CGrade → CourseID
DCourseName → StudentID
✗ Incorrect
StudentID uniquely identifies StudentName, so StudentID → StudentName is a functional dependency.
Why are functional dependencies used in databases?
ATo increase data duplication
BTo organize data and reduce redundancy
CTo make queries slower
DTo delete data randomly
✗ Incorrect
Functional dependencies help organize data to reduce redundancy and avoid anomalies.
Can a functional dependency have multiple attributes on the left side?
AOnly in special databases
BNo, only one attribute is allowed
COnly if the right side has multiple attributes
DYes, it can have a set of attributes
✗ Incorrect
Functional dependencies can have multiple attributes on the left side, like (A, B) → C.
If two rows have the same value for attribute A, what must be true for attribute B in A → B?
AThey must have the same value for B
BThey can have different values for B
CB must be null
DB must be unique
✗ Incorrect
In A → B, same A means same B values to maintain the dependency.
Describe what a functional dependency is and why it matters in database design.
Think about how one piece of data can decide another.
You got /3 concepts.
Give an example of a functional dependency from everyday life and explain it.
Consider IDs and names or similar pairs.
You got /3 concepts.
Practice
(1/5)
1. What does the functional dependency X -> Y mean in a database?
easy
A. Knowing X allows you to find Y uniquely
B. X and Y are unrelated data sets
C. Y determines X uniquely
D. X and Y are always equal
Solution
Step 1: Understand the notation X -> Y
This notation means that the value of X determines the value of Y uniquely in the database.
Step 2: Interpret the meaning in simple terms
If you know X, you can find Y without ambiguity. This is the core idea of functional dependency.
Final Answer:
Knowing X allows you to find Y uniquely -> Option A
Quick Check:
Functional dependency means X determines Y [OK]
Hint: Remember: X determines Y means knowing X gives Y [OK]
Common Mistakes:
Confusing which attribute determines which
Thinking X and Y are unrelated
Assuming dependency means equality
2. Which of the following is the correct way to write a functional dependency?
easy
A. X -> Y
B. X = Y
C. X <-> Y
D. X + Y
Solution
Step 1: Recall the standard notation for functional dependency
The correct notation uses an arrow pointing from X to Y, written as X -> Y.
Step 2: Eliminate incorrect options
X = Y means equality, X <-> Y suggests bidirectional dependency, and X + Y is not a valid notation here.
Final Answer:
X -> Y -> Option A
Quick Check:
Functional dependency uses arrow notation [OK]
Hint: Look for arrow notation X -> Y for functional dependency [OK]
Common Mistakes:
Using equals sign instead of arrow
Confusing bidirectional with functional dependency
Using plus sign mistakenly
3. Given a table with columns StudentID and StudentName, which functional dependency is correct?
medium
A. StudentName -> StudentID
B. StudentID -> StudentName
C. StudentID -> StudentID
D. StudentName -> StudentName
Solution
Step 1: Identify the unique identifier
Usually, StudentID uniquely identifies a student, so it determines StudentName.
Step 2: Check the direction of dependency
Knowing StudentID gives StudentName, but not necessarily the other way around.
Final Answer:
StudentID -> StudentName -> Option B
Quick Check:
Unique ID determines name [OK]
Hint: Unique keys determine other attributes [OK]
Common Mistakes:
Assuming name uniquely identifies ID
Confusing attribute roles
Ignoring uniqueness of StudentID
4. Identify the error in this functional dependency statement: EmployeeName -> EmployeeID where EmployeeID is unique.
medium
A. EmployeeName must be numeric
B. EmployeeID cannot be unique
C. Functional dependency must be bidirectional
D. EmployeeName may not uniquely determine EmployeeID
Solution
Step 1: Understand uniqueness of EmployeeID
EmployeeID is unique, so it can determine EmployeeName, but not vice versa.
Step 2: Analyze the given dependency
EmployeeName may repeat for different employees, so it cannot uniquely determine EmployeeID.
Final Answer:
EmployeeName may not uniquely determine EmployeeID -> Option D
Quick Check:
Non-unique attribute cannot determine unique ID [OK]
Hint: Only unique attributes determine others [OK]
Common Mistakes:
Assuming all attributes are unique
Thinking dependency is always two-way
Confusing attribute types
5. In a database, if A -> B and B -> C, what can we conclude about the functional dependency between A and C?
hard
A. B -> A
B. C -> A
C. A -> C
D. C -> B
Solution
Step 1: Understand transitive dependency
If A determines B, and B determines C, then A determines C by transitivity.
Step 2: Apply the rule to given dependencies
Since A -> B and B -> C, it follows that A -> C.
Final Answer:
A -> C -> Option C
Quick Check:
Functional dependencies are transitive [OK]
Hint: Chain dependencies to find indirect ones [OK]
Common Mistakes:
Reversing dependency direction
Ignoring transitive property
Confusing attributes order
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.