Chuẩn hóa Database E-commerce
Lập trìnhChuẩn hóa database thiết kế cho hệ thống e-commerce
Hướng dẫn
Lời giải
Cho thiết kế database chưa chuẩn hóa: ``` orders(order_id, customer_name, customer_email, product_list, total_amount, order_date) ``` product_list chứa: "ProductA:2:100,ProductB:1:150" (product_name:quantity:price) Hãy chuẩn hóa lên 3NF với các bảng: - customers - orders - products - order_items
Code mẫu
-- Viết SQL schema đã chuẩn hóa ở đây -- customers table -- orders table -- products table -- order_items table