Entity Relationship Diagram
Entity Relationship Diagram
FACULTY
Ms.KALAIARASI
ASSIGNMENT - 2
DARSANI S
23AD06
ENTITY RELATIONSHIP DIAGRAM
(1 to 1)
(1 to many)
(Many to 1)
(Many to many)
SCENARIO:
INVENTORY SYSTEM
One Customer has Many Purchase Orders: A single customer can place
multiple purchase orders over time. This is a one-to-many relationship
because one customer record is linked to multiple purchase order records.
A purchase order can have multiple order items, but each order item is
associated with only one purchase order.
Cardinality:
(1: N): This notation signifies that one customer can have many purchase
orders. In simpler terms, a single customer record can be linked to
multiple purchase order records in the database. This means, every time a
customer places an order, a new purchase order record is created and
associated with their existing customer record.
Foreign Key:
Each entity has its own primary key (Purchase Order ID for Purchase
Order, Order Item ID for Order Item).
The Purchase Order ID in the Order Item entity is a foreign key
linking it to the Purchase Order entity, indicating a one-to-many
relationship.
This design ensures that each order item is associated with one
purchase order, and a purchase order can have multiple associated
order items.
Customer - Order:
Many employees can work on many products. Any individual employee can be
associated with various products, and any product can be assembled by multiple
employees.
CONCLUSION:
Google Bard AI
https://www.techtarget.com/searchdatamanagement/definition/entity-
relationshipdiagramERD#:~:text=An%20entity%20relationship%20diagram
%20(ERD,information%20technol ogy%20(IT)%20system
INFORMATION SYSTEM MANAGEMENT
SQL ASSIGNMENT
FACULTY
Ms.KALAIARASI
ASSIGNMENT - 2
DARSANI S
23AD06
CREATE TABLE:
DELETE:
SQL Code with output: