MySQL + SQL · Lesson 26
Normalization Examples in DBMS
Solved Normalization Examples
Practice normalization with these solved cases — useful for Class 12 and B.Tech exams.
Example 1 — Order Table
orders(order_id, product, product_price, customer, customer_city)product_price depends on product (transitive); customer_city depends on customer. 3NF split:
orders(order_id, product_id, customer_id)
products(product_id, product, product_price)
customers(customer_id, customer, customer_city)
Example 2 — Marks Table
marks(roll, subject, marks, student_name)
Key = (roll, subject)student_name depends only on roll → partial dependency. 2NF split:
marks(roll, subject, marks)
students(roll, student_name)
Summary
- Find the key, then check for partial and transitive dependencies.
- Split tables until each non-key column depends only on the whole key.
💻 Live Code Editor
Is page ki language (MYSQL) mein code likhein aur turant chalाएं — yahीं, bina kuch install kiye.Powered by OneCompiler. Agar editor na khule to yahान naye tab mein kholein.
💻 Live Code Editor
Is page ke program yahan ready hain — chalाएं, badlें aur seekhें. Bina kuch install kiye.
Powered by OneCompiler. Editor mein code apne aap aa jata hai — Run dabaakर output dekhें.
Agar load na ho to naye tab mein kholें.