Database Lec3 Donya
Database Lec3 Donya
3)
Product
• ProductID (Primary Key): Unique identifier for each product.
• Name, Description: Description of the product and its features.
• Price: Price of the product.
Order
• OrderID (Primary Key): Unique identifier for each order.
• UserID: Identifier for the user who placed the order.
• ProductID: Identifier for the product included in the order.
• Quantity: Quantity of the product ordered.
• Timestamp: Date and time when the order was placed.
Content
• ContentID (Primary Key): Unique identifier for each content item.
• Title, Description: Description of the content item.
• URL: URL or path to the content item (e.g., image, video, document).
User-Order Relationship
• One-to-many relationship
• Each user can place multiple orders, while each order is associated with one user.
2
Uruk University
Department of Cybersecurity and Cloud Computing Technical Engineering
Collage of Technical Engineering
Product-Order Relationship
• Many-to-many relationship
• Each product can be included in multiple orders, and each order can contain multiple
products.
User-Content Relationship
• One-to-many relationship
• Each user can create or access multiple content items, while each content item is
associated with one user.
Assignment 1: Write a suitable code for this database design (for each of them)!!
3
Uruk University
Department of Cybersecurity and Cloud Computing Technical Engineering
Collage of Technical Engineering