Entity 1: Customers
- Attributes: customer_id (primary key), first_name, last_name, email, phone_number, address
Entity 2: Products
- Attributes: product_id (primary key), product_name, price, description, quantity_available
Entity 3: Orders
- Attributes: order_id (primary key), customer_id (foreign key referencing Customers entity), order_date, total_amount
Entity 4: Order Items
- Attributes: order_item_id (primary key), order_id (foreign key referencing Orders entity), product_id (foreign key referencing Products entity), quantity, item_total
Entity 5: Employees
- Attributes: employee_id (primary key), first_name, last_name, email, phone_number, address, position, hire_date
Entity 6: Categories
- Attributes: category_id (primary key), category_name
Entity 7: Reviews
- Attributes: review_id (primary key), customer_id (foreign key referencing Customers entity), product_id (foreign key referencing Products entity), rating, comment, review_date
Identify the necessary entities and their attributes for your database. Set appropriate. primary key for each entity accordingly.
1 answer