0% found this document useful (0 votes)
17 views13 pages

Entity Relationship Diagram

The document discusses entity relationship diagrams and their components. It provides examples of one-to-one, one-to-many, many-to-one and many-to-many relationships using a retail store inventory system scenario. Cardinality and foreign keys are also explained.

Uploaded by

Dars
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views13 pages

Entity Relationship Diagram

The document discusses entity relationship diagrams and their components. It provides examples of one-to-one, one-to-many, many-to-one and many-to-many relationships using a retail store inventory system scenario. Cardinality and foreign keys are also explained.

Uploaded by

Dars
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

INFORMATION SYSTEM MANAGEMENT

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

 Retail store: A customer orders new supplies or clothing items based on


inventory levels.
ONE-TO-ONE ENTITY RELATIONSHIP DIAGRAM:
One – To – Many Entity Relationship Diagram:

 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:

 Customer ID in the Purchase Order entity references the ID in the


Customer entity: This is the technical mechanism that establishes the link
between the two tables. The Customer ID field in each purchase order
record acts as a reference to the corresponding ID field in the customer
record. This allows the system to easily retrieve customer information
associated with any specific purchase order.
Explanation:

 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.

Many to one Entity Relationship:

Inventory Item - Part:

 This is a many-to-one relationship. One inventory item (product) is


usually assembled from many individual parts. However, each part can be
used in the assembly of many different inventory items, offering
flexibility and efficiency.

Customer - Order:

 This is another many-to-one relationship. One customer can place many


orders over time. However, each order can only be placed by one
customer. This links customer purchase history to individual orders.
Many-to-Many Entity Relationship:

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.

 Many Employees: Each employee can work on many different products.


 Many Products: Each product needs the help of many different employees
to be finished.

CONCLUSION:

In conclusion, an Entity Relationship Diagram (ERD) is a valuable visual


representation that illustrates the relationships among entities within a database
system. It provides a clear and concise overview of how different entities
interact and relate to each other, helping designers, developers, and stakeholders
understand the structure of the database.
Reference:

 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:

ADD FREQUENCY PURCHASE COLUMN:


DUPLICATE:

FREQUENCY PURCHASE FROM CUSTDETAILS WHERE


CUSTOMER _ID=4

DELETE:
SQL Code with output:

You might also like