Introduction According to the assignment, I am tasked with developing a database for an e-commerce platform. It is assumed that customers can place multiple orders, each order consisting of one or more products. Each product belongs to a specific category. Customers can maintain multiple shipping addresses for their orders. Definition …show more content…
The assignment does not contain a detailed description of the required configuration. However, the following conditions are allowed: Each customer has a name, a list of delivery addresses, and contact information. Each product has a name, price, and is also characterized by units of measurement. Each order has a unique number, date, a list of products with their quantity, prices, and total order amount. An order is made for a specific buyer to a specific delivery address. The price specified in the order may differ from the current price of the product. Each category of goods has its name. Considering the above, the ER diagram takes the following form: Defining Primary Keys Primary keys are vital elements of a holistic database architecture. Primary keys play a key role in establishing relationships between tables using foreign keys (Yasar, 2022). For each entity, I will create a key attribute (Id). Additional Requirement With additional considerations, thoughts appeared that in this database it would be nice to track the delivery of the order and payments made by the client. To implement these ideas, you need to add two entities to the database: Payments and Tracking Details. Thinking about attributes, I concluded that each payment should have an Id, number, date, and amount. Tracking Details must contain the tracking number, carrier name, and delivery status. Here Tracking number and Id will be used as key elements. Additional connections arise between entities: Related Entities Justification for the Mapping Cardinality Type of Cardinality Orders-Tracking Details The Order has one Tracking Detail. Tracking Details describes one order. one-to-one Customers Payments Customers can create many Payments. Orders can be created by one customer. one-to-many Orders-Payments Orders have one Payment. Payment can only be made for one order.