Question: Entities and Attributes Customer Attributes: CustomerID ( Primary Key ) , Name, Email, Password, Address, Phone Product Attributes: ProductID ( Primary Key ) , SKU,
Entities and Attributes
Customer
Attributes: CustomerID Primary Key Name, Email, Password, Address, Phone
Product
Attributes: ProductID Primary Key SKU, Name, Description, Price, Image
Cart
Attributes: CartID Primary Key CustomerID Foreign Key TotalPrice, CreatedAtRelationships:
Each cart is associated with one customer, but a customer can have one active cart at a time.Contains a manytomany relationship with products through CartProduct.
CartProduct Associative Entity between Cart and Product
Attributes: CartID Foreign Key ProductID Foreign Key QuantityRelationships:Connects each cart to its products with specific quantities.
Order
Attributes: OrderID Primary Key CartID Foreign Key CustomerID Foreign Key OrderDate, ShippingAddress, TotalPriceRelationships:Each order is associated with one cart and one customer.
OrderProduct Associative Entity between Order and Product
Attributes: OrderID Foreign Key ProductID Foreign Key QuantityRelationships:Connects each order to its products with specific quantities.
Relationships
Customer Cart: OnetoOne A customer has one active cart
Cart Product: ManytoMany A cart can contain multiple products, and each product can appear in multiple carts
Customer Order: OnetoMany A customer can place multiple orders
Order Product: ManytoMany An order can contain multiple products, and each product can be part of multiple orders Draw me ER diagram based on the information above. Draw me a similar Er diagram image that I have given you
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
