Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

EDS 6397: Database Management Tools

Name: ……KARTHIKEYAN…RAVICHANDRAN…………………………………………

Part 1: Relational Algebra

a. πName, Position, Salary (Employees ⨝ EmployeeID=EmployeeID Salaries)

b. πName, Salary (σ_DepartmentID=101 (Employees ⟕ EmployeeID=EmployeeID Salaries))

1
Part 2: Normalization

1. Given the dependency diagram shown in Figure 1 below, answer items 1a-1c:

FIGURE 1: Dependency Diagram for Question 1

C1 C2 C3 C4 C5

a. Identify and discuss each of the indicated dependencies.

C1-> C2 (Partial dependency)


C1,C3 -> C4 (full dependency)
C4 -> C5 (Transitive dependency)

b. Create a database whose tables are at least in 2NF, showing the dependency diagrams for
each table.

C1 C2
Primary Key: C1
Foreign Key: None
Normal Form: 3NF

2
C1 C3
C2 C4 C5

Primary Key: C1+C3


Foreign Key: C1
Normal Form: 2NF

c. Create a database whose tables are at least in 3NF, showing the dependency diagrams for
each table.

C1 C2
Primary Key : C1
Foreign Key : None
Normal Form : 3NF

C1 C3
C2 C4

C4 C5

Primary key : C1+C3 Primary Key: C4


Foreign Key: C1 to table 1 and C4 to another table. Foreign Key: None
Normal Form : 3NF Normal Form: 3NF

2. The dependency diagram in Figure 2 below indicates that authors are paid royalties for each
book that they write for a publisher. The amount of the royalty can vary by author, by book,
and by edition of the book.

Figure 2: Book royalty dependency diagram

3
a. Identify and discuss each of the indicated dependencies.

ISBN -> BookTitle, Publisher, Edition (Partial dependency)


Author_Num -> LastName (Partial dependency)
ISBN+Author_Num -> BookTitle, LastName, Publisher, Royalty, Edition
BookTitle -> Publisher (Transitive dependency)

b. Based on the dependency diagram, create a database whose tables are at least in 2NF,
showing the dependency diagram for each table.

4
For table 1: Primary Key: ISBN ; Form : 2NF
For table 2: Primary Key: Author_Num ; Form : 3NF
For table 3: Primary Key: ISBN+Author_Num ; Form : 3NF

c. Create a database whose tables are at least in 3NF, showing the dependency diagram for each
table.

5
For table 1: Primary Key: ISBN ; Form : 3NF
For table 2: Primary Key: Author_Num ; Form : 3NF
For table 3: Primary Key: ISBN+Author_Num ; Form : 3NF
For table 4 : Primary Key: BookTitle ; Form : 3NF

You might also like