Module 4 Flashcards

1
Q

What is a functional dependency (FD)?

A

A constraint that states if two tuples have the same values for a set of attributes X, they must also have the same values for another set of attributes Y.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is a functional dependency written?

A

X → Y (X functionally determines Y).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a trivial functional dependency?

A

An FD where Y is a subset of X (e.g., {A, B} → A).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a non-trivial functional dependency?

A

An FD where Y is not a subset of X (e.g., A → B).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of functional dependencies in database design?

A

To identify redundancy and enforce integrity constraints.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the relationship between functional dependencies and keys?

A

A key is a minimal set of attributes that functionally determines all attributes in a relation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a superkey?

A

A set of attributes that uniquely identifies each tuple in a relation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a candidate key?

A

A minimal superkey that uniquely identifies all attributes of a relation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a primary key?

A

A chosen candidate key that uniquely identifies each tuple in a relation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is redundancy in a database?

A

When the same information is stored multiple times in different places.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the problems caused by redundancy?

A

Wasted storage, update anomalies, insertion anomalies, and deletion anomalies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is an update anomaly?

A

When a change in one record requires multiple updates elsewhere to maintain consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an insertion anomaly?

A

When certain information cannot be added without the presence of related data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a deletion anomaly?

A

When deleting one piece of data unintentionally removes necessary related data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is an Armstrong’s Axiom?

A

A set of rules used to derive all functional dependencies in a relation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the three main Armstrong’s Axioms?

A

Reflexivity, augmentation, and transitivity.

17
Q

What is reflexivity in functional dependencies?

A

If Y is a subset of X, then X → Y.

18
Q

What is augmentation in functional dependencies?

A

If X → Y, then XZ → YZ for any attribute Z.

19
Q

What is transitivity in functional dependencies?

A

If X → Y and Y → Z, then X → Z.

20
Q

What is the closure of a set of functional dependencies?

A

The set of all functional dependencies that can be inferred from a given set of FDs.

21
Q

How do you compute the closure of an attribute set?

A

Start with the attributes, apply given FDs iteratively, and include any new attributes inferred.

22
Q

Why is computing closure important?

A

To determine if an attribute set is a key and to verify functional dependencies.

23
Q

What is the minimal cover of a set of functional dependencies?

A

A simplified but equivalent set of FDs with no redundant attributes or dependencies.

24
Q

What is an equivalence of functional dependencies?

A

Two sets of FDs are equivalent if they imply the same set of dependencies.

25
What is the significance of finding a minimal cover?
It simplifies database design and eliminates redundant dependencies.
26
What is a key’s role in normal forms?
Keys help determine whether a relation is properly normalized to reduce redundancy.
27
What is a decomposition in database design?
Breaking a relation into smaller relations to reduce redundancy and anomalies.
28
What is a lossless join decomposition?
A decomposition where no information is lost when relations are joined back together.
29
What is a dependency-preserving decomposition?
A decomposition where all functional dependencies can still be enforced without recombining tables.
30
How can functional dependencies be used to check for redundancy?
If multiple tuples have the same values in determinant attributes but different values in dependent attributes, redundancy exists.