Database management systems cs403 power point slides lecture 07

Post on 14-Feb-2017

62 views 2 download

Transcript of Database management systems cs403 power point slides lecture 07

DatabaseDatabaseManagement Management

SystemSystem

Lecture - 7

Entity-Relationship Data Model

E-R Data Model

A semantic data model, used for the graphical representation of the conceptual database design

Major Components

Entities

Attributes

Relationships

Entity

Term used to mean three different meanings Entity type Entity instance Entity set

Entity TypeA name/label assigned to

items/objects that exist in an environment and that have similar properties

It could be person, place, event or even concept

Entity TypeDistinguishable from other entity

types on the basis of properties Identified through abstraction

processDifferent from External Entity

Entity Instance & SetA particular object belonging to

a particular entity typeEntity Type: EmployeeEntity Instance: M. SharifEntity Set: All employees

Types of Entity Types

Entity types can be classified into regular/strong/independent ETs or weak/dependent ETs

Weak Entity Types An entity type whose instances

cannot exist without being linked with instances of some other entity type, i.e., they cannot exist independently

Strong Entity TypeA strong/regular entity type is the

one whose instances can exist independently, i.e., without being linked to other instances

Strong ETs have their own identity

Naming Entity Types Singular noun recommendedOrganization specific namesWrite in capitals Abbreviations can be used,

be consistent

SymbolsRegular Entity Type

Weak Entity Type

NAME

NAME

EMPPLOYEE DEPENDENTS

BOOK BOOKCOPY

Attribute An attribute of an entity type is a

defining property or quality of the instances of that entity type. Entity instances of same entity type have the same attributes. (e.g. Student Identification, Student Name)

Domain of an Attribute

Every attribute has a domainSet of possible values for an

attributeThe attributes in an entity set get

the values from the same domain

Types of Attributes

Single vs composite

Single valued vs multi-valued

Stored vs derived

Symbols for Attributes

Each represented as an oval, linked with an ET symbol

Symbols for Attributes

SimpleComposite

Multi-valued

Derived

Example

EMPLOYEE

empId empNameExperience

emp_Qual streetdateHired houseNo

address

Thanks

DatabaseDatabaseManagement Management

SystemSystem

Lecture - 7