Entities:
1. Customer
- Attributes: customer_id, name, email, phone
2. Product
- Attributes: product_id, name, description, price
Relationship:
The relationship between Customer and Product is a Many-to-Many relationship.
Cardinalities:
- Each Customer can purchase multiple Products.
- Each Product can be purchased by multiple Customers.
Constraints:
- A Customer must be linked to at least one Product.
- A Product must be linked to at least one Customer.
ERD Diagram:
```
+--------------+ +--------------+
| Customer | | Product |
+--------------+ +--------------+
| customer_id | <-----> | product_id |
| name | | name |
| email | | description |
| phone | | price |
+--------------+ +--------------+
```
Note: The relationship between Customer and Product will typically require an intermediate entity (e.g., Order) to represent the actual purchases made by customers. However, as the prompt only asks for the entities and their attributes, the intermediate entity is omitted from the diagram.
1. Customer and product.
Identify the entities and their attributes
Identify the degree of their relationship
Identify their cardinalities
Constraints
Draw the ERD
1 answer