Erm

15
The Entity Relationship Model Prepared by: Jane L. Garay

Transcript of Erm

Page 1: Erm

The Entity Relationship Model

Prepared by:Jane L. Garay

Page 2: Erm

Entity The word entity in the ERM correspond to a table-not a row- in a relational environment.The ERM refers to a table row as an entity instance or entity occurrence.

Page 3: Erm

Attributes Required attributes- an attribute that must have a value, , it cannot be left empty. STUDENT

STU_LNAME

STU_FNAME

STU_INITIAL

STU_EMAIL

STU_PHONE

Page 4: Erm

Optional attributes- attribute that does not require a value, it can be left empty. STUDENT

STU_LNAME

STU_FNAME

STU_INITIAL

STU_EMAIL

STU_PHONE

Page 5: Erm

Domains- is the set of possible values for a given attribute.

Identifiers (Primary key)- one or more attributes that uniquely identify each entity instance.Composite identifiers- a primary key composed of more than one atribute.

Page 6: Erm

Composite attributes- can be further subdivided to yield additional attributes.For example the attribute ADDRESS can be subdivided into street, city, state, zip code.

Simple attributes- cannot be subdivided.For example, age, sex, marital status.

Page 7: Erm

Single-valued attributes- can have only a single value.For example, a person can only have one SSS Number.

Multivalued attributes- can have many values.For instance, a person may have a several college degrees, and a household may have different phones, each with its own number.

Page 8: Erm

CAR

MOD_CODE

CAR_YEAR

CAR_COLOR

CAR_VIN

CAR

PK

CAR_VIN

MOD_CODE

CAR_YEAR

CAR_COLOR

Page 9: Erm

Derived attributes – whose value is calculated (derived) from other attributes.It is derived by using an algorithm.Sometimes referred to as computed attributes.

Page 10: Erm

RelationshipsThe entities that participate in a relationship are also known as participants, and each relationship is identified by a name that describes the relationship.

Page 11: Erm

Relationship name is an active or a

passive verb.

Relationship name is an active or a

passive verb.

Author Book

Relationship name: writes

An author writes one or more booksA book can be written by one or more authors.

Page 12: Erm

Connectivity and CardinalityConnectivity used to describe the relationship classification.Cardinality expresses the minimum and maximum number of entity occurrences associated with one occurrence of related entity.The first value represents the minimum no. of associated entities. The second value represents the maximum no. of associated entities

Page 13: Erm

PROFESSOR

CLASS

(1,

1)

(1, 4)

Cardinalities

Connectivities

Page 14: Erm
Page 15: Erm