ER MODEL TO SCHEMA | Database Management System

marceldavidbaroi 10 views 14 slides Mar 11, 2025
Slide 1
Slide 1 of 14
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14

About This Presentation

Learn how to transform an Entity-Relationship (ER) model into a database schema. This guide covers key steps, including mapping entities, relationships, and constraints to tables, keys, and normalization techniques. Perfect for database designers and developers!


Slide Content

ER MODEL TO SCHEMA R_to_s R_to_s( …, …, …)

ER MODEL SCHEMA a a1 b b1 b2 R a( a1 ,a2) b( b1 ,b2,a1) 1 M

Employee E_ID name salary Employee( E_ID , name, salary) Strong Entity Not dependent on any other entity

Composite Attribute attribute composed of many other attribute Employee E_ID name salary Fast_name Last_name Employee( E_ID , first_name, Last_name,salary)

phone Employee E_ID name phone Employee( E_ID , name) Emp_phone( E_ID , phone ) Multivalued Attribute attribute that can have more than one value associated with the key of the entity

Employee E_ID name salary Employee( E_ID , name, salary) Department( D_no , D_name, Mgr_hours ) Department D_no D_name Works in hours 1 to 1 Relationship one row in a table may be linked with only one row in another table and vice versa

Employee E_ID name salary Employee( E_ID , name, salary) Department( D_no , D_name, E_ID ) Department D_no D_name Total Participation Each entity in the entity set must participate in the relationship.

Employee E_ID name salary Employee( E_ID , name, salary) Department(D_no, D_name, E_ID ) Department D_no D_name Department Weak Entity some entity type for which key attribute can’t be defined

a a1 a2 abc( a1 , a2, b1 , b2) b b1 b2 C Two side Total Participation

a a1 a2 a( a1 ,a2) b( b1 ,b2,a1) b b1 b2 R 1 M 1 to Many Relationship entities in one entity set can take part only once in the relationship set and entities in other entity set can take part more than once in the relationship se

a a1 a2 a( a1 ,a2) b( b1 ,b2) R( a1 , b1 ) b b1 b2 R M M Many to Many Relationship entities in all entity sets can take part more than once in the relationship cardinality is many to many. Let us assume that a student can take more than one course and one course can be taken by many students.

a a1 a2 a( a1 ,a2, R_a1) R M 1 1 to Many Unary Recursive

a a1 a2 a( a1 ,a2) A_r( a1 , R_a1 ) R M M Many to Many Unary Recursive

Thank you