MySQL + SQL · Lesson 26
DBMS Normalization Examples
हल किए गए Normalization Examples
इन हल किए गए cases से normalization practice करें — Class 12 और B.Tech exams के लिए useful।
Example 1 — Order Table
orders(order_id, product, product_price, customer, customer_city)product_price, product पर निर्भर (transitive); customer_city, 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 सिर्फ roll पर निर्भर → partial dependency। 2NF split:
marks(roll, subject, marks)
students(roll, student_name)
सारांश
- Key ढूंढें, फिर partial और transitive dependencies check करें।
- Tables तब तक split करें जब तक हर non-key column पूरी key पर ही निर्भर हो।