1
CS 377 Database Systems
Entity-Relationship Model
Liyue Fan Department of Mathematics and Computer Science Emory University
CS 377 Database Systems Entity-Relationship Model Liyue Fan - - PowerPoint PPT Presentation
CS 377 Database Systems Entity-Relationship Model Liyue Fan Department of Mathematics and Computer Science Emory University 1 ER Model Chen, Peter P. (1976). " The Entity-Relationship Model Toward a Unified View of ". ACM
1
Liyue Fan Department of Mathematics and Computer Science Emory University
2
ER Model Concepts
Entities Relationships
ER Diagrams
3
different semesters/years.
many students.
4
represented in the database.
Sid='123456789', Address ='731, Fondren, Houston, TX', Sex='M', BirthDate='09-JAN-90‘
5
Name (FirstName, MiddleName, LastName).
{Color} or {PreviousDegrees}.
arbitrarily to any number of levels although this is rare.
denoted by {PreviousDegrees (College, Year, Degree, Field)}.
6
components (Number, State).
VehicleIdentificationNumber (popularly called VIN) and VehicleTagNumber (Number, State).
7
Entities with the same basic attributes are grouped
E.g. the STUDENT entity type or the COURSE entity
8
Meaning ENTITY TYPE WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING RELATIONSHIP TYPE ATTRIBUTE KEY ATTRIBUTE MULTIVALUED ATTRIBUTE COMPOSITE ATTRIBUTE DERIVED ATTRIBUTE TOTAL PARTICIPATION OF E2 IN R CARDINALITY RATIO 1:N FOR E1:E2 IN R STRUCTURAL CONSTRAINT (min, max) ON PARTICIPATION OF E IN R Symbol
E1
R
E2 E1
R
E2
R (min,max)
E
N
9
Step 2. Identify attributes for each entity type To be continued …
10
SECTIONs participate
11
The degree of a relationship type is the number of
Relationship types of degree 2 are called binary
E.g. Both TAKE and TEACH are binary relationships.
Relationship types of degree 3 are called ternary
An n-ary relationship equivalent to n binary
12
Relationships can be recursive: Both participations
E.g. SUPERVISE relationship between PROFESSOR (in
13
A relationship type can have attributes
E.g. HoursPerWeek of ADVISE describing the number of
14
participates in an identifying relationship type with an owner or identifying entity type
type
Example:
specific COURSE that the section is related to. SECTION is a weak entity type with COURSE as its identifying entity type via the identifying relationship type SECTIONS
15
Meaning ENTITY TYPE WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING RELATIONSHIP TYPE ATTRIBUTE KEY ATTRIBUTE MULTIVALUED ATTRIBUTE COMPOSITE ATTRIBUTE DERIVED ATTRIBUTE TOTAL PARTICIPATION OF E2 IN R CARDINALITY RATIO 1:N FOR E1:E2 IN R STRUCTURAL CONSTRAINT (min, max) ON PARTICIPATION OF E IN R Symbol
E1
R
E2 E1
R
E2
R (min,max)
E
N
16
existence-dependent)
dependent)
17
shown by placing appropriate number on the link
(called existence dependency) shown by double lining the link.
participates in at least min and at most max relationship instances in R
taught, and can only be taught by one professor.
– Specify (0,1) for participation of STUDENT in ADVISE – Specify (1,1) for participation of SECTION in TEACH
18
COMPANY TOOL FUNCTIONALITY Embarcadero Technologies ER Studio Database Modeling in ER and IDEF1X DB Artisan Database administration and space and security management Oracle Developer 2000 and Designer 2000 Database modeling, application development Popkin Software System Architect 2001 Data modeling, object modeling, process modeling, structured analysis/design Platinum Technology Platinum Enterprice Modeling Suite: Erwin, BPWin, Paradigm Plus Data, process, and business component modeling Persistence Inc. Pwertier Mapping from O-O to relational model Rational Rational Rose Modeling in UML and application generation in C++ and JAVA Rogue Ware RW Metro Mapping from O-O to relational model Resolution Ltd. Xcase Conceptual modeling up to code maintenance Sybase Enterprise Application Suite Data modeling, business logic modeling Visio Visio Enterprise Data modeling, design and reengineering Visual Basic and Visual C++