Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Entity-Relationship Model

Similar presentations


Presentation on theme: "The Entity-Relationship Model"— Presentation transcript:

1 The Entity-Relationship Model
Defining the Entity-Relationship Model Examples

2 Defining the Entity-Relationship Model
Entity classes can be persons, objects, or events which we intend to describe in our database e.g. CUSTOMER, INVOICE, REGISTRATION, etc. Entities or instances of entities e.g. CUSTOMER or EMPLOYEE John Doe, etc. (Fig. 3-1) There are usually many instances of an entity in an entity class though the two terms are often used interchangeably.

3 CUSTOMER: Customer Number
Attributes or properties are used to describe an entity’s characteristics e.g. EMPLOYEE(EmployeeName, DateOfHire, JobSkillCode). Single, multiple valued (multivalued), and composite attributes Identifiers of entity instances are one or more of its attributes which can be used to identify it (key) e.g. CUSTOMER: Customer Number

4 Relationships associate different entities.
Degree of a relationship is the number of entities in it. (Fig. 3-2) Relationships of degree 2 are called binary relationships. Unary, Ternary etc. Maximum cardinality represents the maximum number of entities that can occur on one side of the relationship, i.e., 1:1, 1:N, N:1, N:M. (Fig. 3-3) Minimum cardinality (must and may) (Fig. 3-4)

5 Recursive relationships exist among entities of a single class. (Fig
Attributes in E-R diagrams (Fig. 3-6) Weak Entities. Their presence depends on the presence of another entity. Example:PATIENT and APPOINTMENT Weak Vs. ID-dependent Entities (Fig. 3-7)

6 Example of an Entity-Relationship Diagram in Fig. 3-9
Subtype Entities e.g. CLIENT and INDIVIDUAL-CLIENT, PARTNERSHIP-CLIENT, CORPORATE-CLIENT supertype; generalization hierarchies; IS-A relationships; inheritance. (Fig. 3-8) Example of an Entity-Relationship Diagram in Fig. 3-9

7 Examples of E-R diagrams
The Jefferson Dance Club (Fig. 3-10,11,12) San Juan Sailboat Charters (Fig. 3-13,14)


Download ppt "The Entity-Relationship Model"

Similar presentations


Ads by Google