Top Banner
Database Database Management Management System System Lecture - 7
21
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture 07

DatabaseDatabaseManagement Management

SystemSystem

Lecture - 7

Page 2: Lecture 07

Entity-Relationship Data Model

Page 3: Lecture 07

E-R Data Model

A semantic data model, used for

the graphical representation of

the conceptual database design

Page 4: Lecture 07

Major Components

Entities

Attributes

Relationships

Page 5: Lecture 07

Entity

Term used to mean three

different meanings Entity type

Entity instance

Entity set

Page 6: Lecture 07

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

Page 7: Lecture 07

Entity TypeDistinguishable from other

entity types on the basis of

properties

Identified through abstraction

process

Different from External Entity

Page 8: Lecture 07

Entity Instance & Set

A particular object belonging to

a particular entity type

Entity Type: Employee

Entity Instance: M. Sharif

Entity Set: All employees

Page 9: Lecture 07

Types of Entity Types

Entity types can be classified into

regular/strong/independent ETs or

weak/dependent ETs

Page 10: Lecture 07

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

Page 11: Lecture 07

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

Page 12: Lecture 07

Naming Entity Types Singular noun recommended

Organization specific names

Write in capitals

Abbreviations can be used,

be consistent

Page 13: Lecture 07

SymbolsRegular Entity Type

Weak Entity Type

NAME

NAME

EMPPLOYEE DEPENDENTS

BOOK BOOKCOPY

Page 14: Lecture 07

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)

Page 15: Lecture 07

Domain of an Attribute

Every attribute has a domain

Set of possible values for an

attribute

The attributes in an entity set get

the values from the same domain

Page 16: Lecture 07

Types of Attributes

Single vs composite

Single valued vs multi-valued

Stored vs derived

Page 17: Lecture 07

Symbols for Attributes

Each represented as an oval,

linked with an ET symbol

Page 18: Lecture 07

Symbols for Attributes

Simple

Composite

Multi-valued

Derived

Page 19: Lecture 07

Example

EMPLOYEE

empId empNameExperience

emp_Qual streetdateHired houseNo

address

Page 20: Lecture 07

Thanks

Page 21: Lecture 07

DatabaseDatabaseManagement Management

SystemSystem

Lecture - 7