Week 9 - Normalisation Flashcards

(30 cards)

1
Q

What is a candidate key in a table?

A

A collection of attributes that is unique across all records.

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

What does a candidate key do in terms of functional dependencies?

A

It uniquely determines every other attribute in the record.

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

Are all candidate keys primary keys?

A

No, primary keys are candidate keys, but there can be other candidate keys as well.

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

What is an unwanted functional dependency?

A

A functional dependency that is not on a candidate key and should be eliminated.

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

What does “redundancy” mean in the context of a database table?

A

It refers to the same logical information being stored in multiple places within the table.

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

What is one immediate drawback of redundancy in a table?

A

It leads to unnecessary waste of storage space.

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

Why is redundancy more problematic than just space usage?

A

Because it requires maintaining consistency across all copies of the same data.

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

What can go wrong if redundant data is not updated consistently?

A

It can lead to data inconsistencies—for example, conflicting answers about who the manager of a department is.

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

What does the term “anomaly” refer to in database design?

A

It refers to unusual or problematic situations where the database gives incorrect or inconsistent results.

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

Why are anomalies particularly dangerous in a database?

A

Because they can cause queries to return wrong results, often without any obvious signs that something is wrong.

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

What makes anomalies difficult to handle?

A

Even if detected, writing queries to work around anomalies can be complex and unreliable.

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

What is an update anomaly?

A

It occurs when updating a piece of information requires updating multiple dependent attributes, risking inconsistency if any are missed.

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

What is an insertion anomaly?

A

It happens when inserting a new record requires checking and maintaining consistency with existing dependent attributes—often a lot of effort.

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

What is an aggregation anomaly?

A

This occurs when using functions like count, sum, or average gives incorrect results due to data duplication.

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

What is a deletion anomaly?

A

It occurs when deleting a record, causing the unintentional loss of important dependent data.

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

When is a table schema said to be in Boyce-Codd Normal Form (BCNF)?

A

When all functional dependencies in the table are only on the candidate keys.

17
Q

What does it mean for a functional dependency to be “on the candidate key”?

A

The left-hand side (LHS) of the dependency must be a superset of a candidate key.

18
Q

What kind of functional dependencies are not allowed in BCNF?

A

Any dependency where the LHS is not a candidate key or a superset of one—these are considered “unwanted.”

19
Q

How do you convert a table to BCNF?

A

By decomposing tables that contain unwanted functional dependencies not based on candidate keys.

20
Q

What triggers the decomposition process in normalization?

A

The presence of an unwanted functional dependency U→X.

21
Q

What is the first step in the decomposition method?

A

Find all attributes functionally dependent on the left-hand side
𝑈 using the closure algorithm.

22
Q

In the decomposition process, what is set 𝑊?

A

The collection of attributes functionally dependent on 𝑈.

23
Q

What is set 𝑉 in the decomposition method?

A

The remaining attributes not in
𝑈 or 𝑊.

24
Q

What is the Losslessness property of a decomposition?

A

The decomposition must allow for the original relation to be reconstructed from the decomposed tables without losing any data or introducing spurious tuples.

25
What does the Redundancy-Reducing property mean in a decomposition?
A decomposition should reduce redundancy in the data, ensuring that duplicate information does not need to be stored across multiple tables.
26
What is the Dependency-Preserving property of a decomposition?
The decomposition should ensure that all functional dependencies from the original relation are still enforceable within the decomposed tables, without needing to perform joins to check them.
27
What is the first step in achieving Boyce-Codd Normal Form (BCNF)?
Identify any unwanted functional dependencies—dependencies that are not based on candidate keys.
28
How do we eliminate unwanted functional dependencies in the process of achieving BCNF?
By decomposing the table into smaller tables, removing the unwanted dependency in the process.
29
How long does the process of achieving BCNF take?
The process repeats until no unwanted functional dependencies remain.
30
Is the resulting BCNF schema unique?
No, the BCNF schema is not necessarily unique because different unwanted dependencies might be chosen to eliminate, leading to different decompositions.