Posts

Showing posts with the label Primary key

Search Atharv Gyan

NEW

Are Decentralized Stablecoins the Future of DeFi?

View on YouTube

View on Spotify

Catch this episode and more on Spotify Stay updated with the latest in tech and climate solutions.

Design a database schema for an online merch store

Image
Designing a database schema for an online merchandise store involves considering various entities and their relationships. 1. Entities: A. Users: - UserID (Primary Key) - Username - Password - Email - Address - Phone number B. Products: - ProductID (Primary Key) - Name - Description - Price - CategoryID (Foreign Key) C. Categories: - CategoryID (Primary Key) - Name D. Orders: - OrderID (Primary Key) - UserID (Foreign Key) - OrderDate - TotalPrice E. OrderItems: - OrderItemID (Primary Key) - OrderID (Foreign Key) - ProductID (Foreign Key) - Quantity - Price 2. Relationships : - Each user can have multiple orders, but each order belongs to only one user. (One-to-Many relationship between Users and Orders) - Each order can contain multiple items, and each item can belong to multiple orders. (Many-to-Many relationship between Orders...
🔍 DevTools is open. Please close it to continue reading.
Atharv Gyan Splash Screen