DBMS Micro
DBMS Micro
Group Members :
Name Enrollment No.
Project Definition
This project is an exclusive e-commerce platform dedicated to selling a wide
range of laptops. The store offers a comprehensive inventory that includes
laptops across various categories, from gaming to work and personal use.
Each laptop listing provides detailed specifications, such as processor type,
RAM capacity, storage size, graphics card model, display features, and more,
ensuring that customers can make well-informed purchasing decisions.
Initial Table
First we will create a single table with all the necessary columns:
Page 1
Functional Dependencies (Before Normalization)
UserID → Username
UserID determines the username (assuming each user has a unique ID).
Data Redundancy: Supplier and user information are repeated unnecessarily, which causes
inefficiency.
Partial Dependencies: Attributes like StockQuantity do not depend on the entire primary key.
Anomalies: Update, insert, and delete anomalies are likely due to mixed data types and
redundancy.
Lack of Separation: Combining purchase data with product data and supplier information
creates a need for separation into multiple tables.
Conclusion
As we can observe, just adding all the columns in a single table can cause unwanted
dependencies, data redundancy & anomalies. The solution for all this is Normalization.
Let’s Now Implement Normalization to our table and find the best possible set of relations
to solve our problem.
Page 2
Normalization
1st Normal Form : The table must have atomic (single-valued) attributes, and
there should be no repeating groups .
2nd Normal Form : The table must be in 1NF, and all non-key attributes should
be fully functionally dependent on the primary key. Partial dependencies should
be removed .
Functional Dependencies:
Laptop Table :
Supplier Table:
Purchase Table:
Page 3
3rd Normal Form : The table must be in 2NF, and no transitive dependencies
should exist (i.e., non-key attributes should not depend on other non-key attributes).
Functional Dependencies: .
Users Table :
Purchases Table :
BCNF : A table is in BCNF if It is already in 3NF and For every functional dependency
(FD), the determinant (left-hand side of the FD) is a superkey.
After checking all the tables we couldn’t find any table that violates BCNF.
Functional Dependencies: .
To resolve this, we need to split this table to remove the multi-valued dependency.
We create two separate tables:
Page 4
Supplier Details Table :
5th Normal Form : A relation is in Fifth Normal Form (5NF) if It is in 4NF and It
cannot be decomposed further into smaller relations without losing information
(i.e., no non-trivial join dependencies should exist). .
After checking all the tables we couldn’t find any table that violates 5th NF.
After Normalization :
Relational Diagram:
Page 5
Entity Relationship Diagram:
Page 6