Normalise a Denormalised Table
Hard
DDL & Constraints
A table stores Orders_Flat(order_id, customer_name, customer_email, product_name, product_price). Write the DDL for a normalised design (Customers, Products, Orders, OrderItems) with the proper keys.
Table schema
Orders_Flat(order_id INT, customer_name VARCHAR(50), customer_email VARCHAR(100), product_name VARCHAR(50), product_price INT)Sample data
Repeated customer and product data across rows is the problem to remove.
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.