Lab 7 - IS222

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Rishika Prakash – S11219196

Lab 7 – Part 1

1. Normalisation is the process designing and correcting tables in the database to reduce
data redundancy.

2. A table is in 1NF when all attributes are dependent on the primary key and there are
no repeating groups in the table.

3. A table is in 2NF when it is in 1NF and with no partial dependency.

4. A table is in 3NF when it is in 2NF without transitive dependency.

5. A table is in BCNF when every determinant is a candidate key (special case of 3NF).

6. When a table has a primary key that is made up of just one attribute and is in the First
Normal Form (1NF), it is automatically in the Second Normal Form (2NF) since, in
the absence of composite primary keys, partial dependencies cannot exist.

7. a)
(C1-C2) – represents a partial in which the determinant is only part of the primary key. In
this case, C2 depends only on C1 rather than the entire primary key composed of C1
and C3.

(C4, C5) – shows transitive dependence where an attribute functionally depends on


another non-key attribute. In this case, C5 is depended on C4 which is not a primary
key.

(C1, C3-C2, C4, C5) – indicates a set of proper functional dependencies since C2, C4,
and C5 depend on the primary key composed of C1 and C3.

b)

C1 C2

Table 1
Primary key: C1
Foreign key: None
Normal Form: 3NF
Rishika Prakash – S11219196

b)

C1 C3 C4 C5

Table 2
Primary key: C1 & C3
Foreign key: None
Normal Form: 2NF since the table depicts the transitive dependencies C4-C5.

c)

C1 C2

Table 1
Primary key: C1
Foreign key: None
Normal Form: 3NF
Rishika Prakash – S11219196

C1 C3 C4

Table 2
Primary key: C1 and C3
Foreign key: C1 (table 1)
C4 (table 3)
Normal Form: 3NF

C4 C5
Table 3
Primary key: C4
Foreign key: None
Normal Form: 3NF
Rishika Prakash – S11219196

8.
Relational Schema
a. (A, B, C, D)
(C,D)
Table X – 2NF

b. (A, B, C, D)
(B, C)
Table Y – 1NF

9. 1NF

QUANTITY ITEM ID DESCRIPTION UNIT PRICE AMOUNT

Partial Dependency Transitive Dependency

2NF

QUANTITY UNIT PRICE AMOUNT

Transitive Dependency

ITEM ID DESCRIPTION
Rishika Prakash – S11219196

You might also like