0% found this document useful (0 votes)
25 views4 pages

ER to Relational Model Mapping Guide

The document outlines the steps for mapping an Entity-Relationship (ER) diagram to a Relational Model by converting entities, relationships, and attributes into relational tables. It details the conversion of entities into tables with primary keys and the representation of relationships, including many-to-many and one-to-many, through separate tables. Key points emphasize the importance of primary and foreign keys in maintaining data integrity and reducing redundancy.

Uploaded by

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

ER to Relational Model Mapping Guide

The document outlines the steps for mapping an Entity-Relationship (ER) diagram to a Relational Model by converting entities, relationships, and attributes into relational tables. It details the conversion of entities into tables with primary keys and the representation of relationships, including many-to-many and one-to-many, through separate tables. Key points emphasize the importance of primary and foreign keys in maintaining data integrity and reducing redundancy.

Uploaded by

hemavasanth69
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Entity-Relationship (ER) diagram, which can

be mapped into a Relational Model by


converting entities, relationships, and
attributes into relational tables.

Steps for Mapping ER Model to


Relational Model:

1. Convert Entities to Relations (Tables)


Each entity in the ERdiagram is mapped
to a table with its attributes as columns.

o Employee (Employee_ID as Primary


Key)
OCopy code

Employee(ssn, F_name, M_name,


L_name, B_date, Address, Gender
Salary, Department_ID)

Department (Department_|D as
Primary Key)
OCopy code

Department (Department_ID, Name,


Location, Number_of_Employees)
Project (Project_ID as Primary Key)
O Copy code

Project (Project_ID, Name,


Location, Number)

Dependent (Dependent_ID as Primary


Key, Employee_ID as Foreign Key)
OCopy code

Dependent (Dependent_ID,
Employee_ID, Name, Gender,
Birthdate, Relationship)

2. Convert Relationships into Tables


Relationships with many-to-many
cardinality are represented as separate
tables.

o Works_On (for many-to-many


Employee-Project relationship)
O Copy code

Works_On ( Employee_ID, Project_ID,


Hours)
Manages (for one-to-one or
one-to-many Employee-Department
relationship)
OCopy code

Manages (Employee_ID,
Department_ID, Start_date)

o Supervision (for one-to-many


Employee-Employee relationship
where an Employee supervises
another Employee)
O Copy code

Supervision(Supervisor_ID,
Employee_ID)

Controls (for one-to-many


Department-Project relationship)
O Copy code

Controls (Depar tment_ID,


Project_ID)
Controls(Department_ID,
Project_ID)

Dependence_0f (for one-to-many


Employee-Dependent relationship)
O Copy code

Dependence_0f(Employee_ID,
Dependent_ID)

Key Points:

Primary keys are used to uniquely identify


records in each table.

" Foreign keys establish relationships


between tables.

" Many-to-many relationships require


separate tables.

One-to-many relationships use foreign


keys in the child table.

This approach ensures data is


well-structured and normalized, reducing
redundancy while maintaining referential
integrity.

You might also like