0% found this document useful (0 votes)
2 views

Unit 3 Relational Database Design Answers

The document provides a comprehensive overview of relational database design concepts, including functional dependency, normalization, and denormalization. It explains key terms such as 1NF, 2NF, 3NF, and BCNF, along with their importance and examples. Additionally, it discusses the processes of finding attribute closure and the benefits and drawbacks of denormalization.

Uploaded by

raja6edge
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Unit 3 Relational Database Design Answers

The document provides a comprehensive overview of relational database design concepts, including functional dependency, normalization, and denormalization. It explains key terms such as 1NF, 2NF, 3NF, and BCNF, along with their importance and examples. Additionally, it discusses the processes of finding attribute closure and the benefits and drawbacks of denormalization.

Uploaded by

raja6edge
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Unit 3: Relational Database Design –

Complete Answers
Q1. Define Functional Dependency with example. (4 Marks)
A Functional Dependency (FD) is a relationship between attributes in a relation such that
the value of one attribute (or a set of attributes) determines the value of another attribute.

Notation: A → B
This means: If we know A, we can determine B.

Example:
In a student table:
| RollNo | Name |
|--------|-------|
| 101 | Amit |

Here, RollNo → Name is a functional dependency because RollNo determines the Name of
the student.

Q2. Explain the use of attribute closure. (4 Marks)


The closure of an attribute (denoted as A+) is the set of attributes that can be functionally
determined from A using the given set of FDs.

Use:
- To check whether a given attribute is a candidate key
- To find all attributes that can be determined from a set of keys
- Useful in normalization and decomposition

Example:
If FDs are:
-A→B
-B→C
Then: A+ = {A, B, C}

Q3. What is a Functional Dependency? Explain its importance. (6 Marks)


A Functional Dependency is a constraint between two sets of attributes in a relation from a
database.

Importance:
- Helps to maintain data integrity
- Guides the normalization process
- Avoids data redundancy and anomalies

Example:
If in an EMPLOYEE table, EmpID → EmpName, it means EmpName depends on EmpID. No
two employees can have the same ID with different names.

Q4. Explain how to find the closure of a set of attributes with example. (6
Marks)
To find the closure A+ of an attribute set A:
1. Start with A+ = A
2. Apply FDs repeatedly where left side is in A+
3. Add resulting attributes to A+
4. Repeat until no more attributes can be added

Example:
FDs:
-A→B
-B→C
Then A+ = {A, B, C}

Q5. What is Normalization? List its types. (4 Marks)


Normalization is the process of organizing data in a database to:
- Reduce redundancy
- Avoid anomalies (insert, update, delete)

Types:
- 1NF (First Normal Form)
- 2NF (Second Normal Form)
- 3NF (Third Normal Form)
- BCNF (Boyce-Codd Normal Form)

Q6. Define 1NF, 2NF with examples. (4 Marks)


1NF (First Normal Form):
- All attributes must have atomic (indivisible) values.

Example:
| Student | Subjects |
|---------|----------|
| Raj | Math, English | (Not in 1NF)

Fixed:
| Student | Subject |
|---------|---------|
| Raj | Math |
| Raj | English |

2NF (Second Normal Form):


- Must be in 1NF
- No partial dependency (i.e., no attribute depends only on part of a composite key)

Example:
If PK = (RollNo, Subject), and RollNo → Name, it's partial dependency.

Q7. Explain 1NF, 2NF, and 3NF with examples. (6 Marks)


1NF: Data is atomic
| Student | Subjects |
|---------|----------|
| Raj | Math, Science | (Not in 1NF)

Fixed:
| Student | Subject |
|---------|---------|
| Raj | Math |
| Raj | Science |

2NF: Must be in 1NF and no partial dependency.


Example: If a table has composite key (StudentID, CourseID) and StudentID → StudentName
→ It’s a partial dependency → Move to another table.

3NF: No transitive dependency


Example:
RollNo → DeptID,
DeptID → DeptName,
So RollNo → DeptName (transitive) → remove it by creating separate table for Department.

Q8. Explain BCNF and how it is different from 3NF. (6 Marks)


BCNF (Boyce-Codd Normal Form) is a stronger version of 3NF.

Rule:
For every FD A → B, A must be a super key.

Difference:
- 3NF allows some non-super key dependencies if the RHS is a prime attribute.
- BCNF does not allow any non-super key determinant.

Example:
Relation:
| Course | Teacher |
|--------|---------|
| DBMS | Raj |
| DBMS | Neha |

FD: Teacher → Course, but Teacher is not a key. → Violates BCNF but may satisfy 3NF.

Q9. What is Denormalization? (4 Marks)


Denormalization is the process of combining normalized tables into one to improve read
performance.

It is used when:
- Performance is more important than storage.
- Frequent JOINs slow down queries.

Q10. List two benefits of Denormalization. (4 Marks)


1. Faster data retrieval (fewer joins)
2. Simpler and more readable queries

Q11. Explain the process of Denormalization. List its benefits and drawbacks
with example. (6 Marks)
Denormalization Process:
- Identify frequently joined tables.
- Merge them into one table.
- Add redundant columns to improve performance.

Benefits:
- Improves read performance
- Reduces JOIN operations
- Better for analytics and reports

Drawbacks:
- Increases redundancy
- Risk of data inconsistency
- More storage required

Example:
Instead of two tables:
Student Table: | RollNo | Name | DeptID |
Department Table: | DeptID | DeptName |

Denormalized Table: | RollNo | Name | DeptID | DeptName |

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy