Normalization
Normalization
Q1. Identify the First Normal Form (1NF) violations in the provided tables. Explain
how each table adheres to or violates 1NF.
There is not any (1NF) Violations in the 5 tables. This is because there is no sets of
values and all rows and columns are atomic meaning every table is already in 1NF
Q2. Determine the Second Normal Form (2NF) for each table. Explain any partial
dependencies and provide solutions to achieve 2NF.
Customers
Customers is already in 2NF because all non-key attributes are connected to the
primary key of CustomerID except SalesRepID which is a key.
Orders
Orders is already in 2NF because all non-key attributes are connected to the
primary key of OrderID except SalesRepID which is a key.
Products
Products is already in 2NF because all non-key attributes are connected to the
primary key of ProductID
OrderDetails
OrderDetails is already in 2NF because all non-key attributes are connected to the
primary key of OrderDetailID
Suppliers
Suppliers is already in 2NF because all non-key attributes are connected to the
primary key of SupplierID
ProductSuppliers
Q3. Identify and resolve any transitive dependencies to achieve Third Normal Form
(3NF).Explain how each table complies with 3NF.
Customers
--TABLE1--
CustomerID, FirstName, LastName, Email, Phone, Address, SalesRepID
--TABLE2--
Address, City, Country
Both City and Country are reliant on the address instead of the CustomerID so
spliting them into different tables puts it in 3NF
Orders
--TABLE1--
OrderID, CustomerID, OrderDate, Status, TotalAmount, SalesRepID
--TABLE2--
ShippingDate, Status
The status of the order is reliant on when it is shipped so if it is shipped or
cancelled, it no longer relies on the OrderID
Products
OrderDetails
Suppliers
ProductSuppliers
Q4. Analyze the provided tables for Boyce-Codd Normal Form (BCNF) compliance.
Discuss any violations and provide the necessary normalization steps.
Since 3NF is closely related to BCNF, all the tables are already in 3.5NF or BCNF.
There was no out of place or anomaly that each table needs to make to meet the
next level
of normalization. Every attribute must be connected to the superkey which has
already been done in 3NF
Q5. For the table with the most complex dependencies, decompose it into 4NF if
necessary. Explain the decomposition process and how it resolves multi-valued
dependencies.
The table with the most complex dependencies is the ProductSupplier Table.
--TABLE1--
ProductSupplierID, ProductID, SupplierID
--TABLE2--
SupplierID, SupplyDate
Q6. Discuss any denormalization considerations you would make for practical
scenarios where performance optimization is crucial. Explain the trade-offs involved.