ASSIGNMENT 02
DUE 27 September 2024
Unique number: 286114
, QUESTION 1
a.
Redundancy in a database occurs when the same piece of data is stored in multiple
places. This duplication can lead to several problems:
1. Inconsistency: When data is duplicated, there's a risk that the copies may
become inconsistent if one instance is updated while the others are not.
2. Increased Storage Costs: Storing multiple copies of the same data takes up
more space, leading to increased storage costs.
3. Maintenance Overhead: Keeping all copies of the data synchronized requires
additional effort and resources.
4. Data Integrity Issues: Redundancy can lead to difficulties in ensuring the
accuracy and completeness of data, potentially resulting in errors.
b.
A relation is in Third Normal Form (3NF) if it is in Second Normal Form (2NF) and no
transitive dependencies exist. A relation is in Boyce-Codd Normal Form (BCNF) if it
is in 3NF and for every functional dependency A→BA \rightarrow BA→B, AAA is a
superkey.
Example: Consider a table with attributes: StudentID, CourseID, ProfessorID, and
ProfessorName, where:
• StudentID, CourseID → ProfessorID, ProfessorName
• ProfessorID → ProfessorName
3NF but not BCNF: The table is in 3NF because:
• StudentID, CourseID → ProfessorID, ProfessorName (composite key)
• ProfessorID → ProfessorName (no transitive dependency with a non -
superkey)
However, it is not in BCNF because:
• ProfessorID → ProfessorName, and ProfessorID is not a superkey.
BCNF: To convert this to BCNF, decompose the table into:
• Table 1: (StudentID, CourseID, ProfessorID)
• Table 2: (ProfessorID, ProfessorName)
Now both tables meet BCNF requirements.
c.