+ All Categories
Home > Education > E-R diagram in Database

E-R diagram in Database

Date post: 05-Dec-2014
Category:
Upload: fatiha-qureshi
View: 1,413 times
Download: 6 times
Share this document with a friend
Description:
 
39
E-R Diagram
Transcript
Page 1: E-R diagram in Database

E-R Diagram

Page 2: E-R diagram in Database

Presented by:

Fatiha Rashid

Javeria Rafeeq

Page 3: E-R diagram in Database

Logical representation of data in an organization.

Views the entire system as a collection of entities related to one another.

Introduced by peter chen in 1976.

Introduction:

Page 4: E-R diagram in Database

Advantages of E-R Model:

CONCEPTUAL SIMPLICITY:

VISUAL REPRESENTATION:

EFFECTIVE COMMUNICATION TOOL:

Page 5: E-R diagram in Database

Elements of E-R Model:

1: Entities

2: Attributes

3: Relationships

Page 6: E-R diagram in Database

Entities:An Entity is a Person,Place,Thing or Event for which data is collected and maintained.

•Represented by a rectangle

Entity name symbol

Page 7: E-R diagram in Database

Entity type / Entity class:A set of entities with same attributes

Exmaple: Student entity class is a set of All students.

Book entity type is for all Books etc.

Page 8: E-R diagram in Database

Entity instance

A member of an entity class is known as entity instance .

Also known as entity occurrence.

Page 9: E-R diagram in Database

Entity Class

Entity instance

Page 10: E-R diagram in Database

Entity class

Entity instance

Page 11: E-R diagram in Database

ATTRIBUTES:

** The characteristics of an entity are called attributes or properties.

Example: Name, address,Class and Email of a students are his attributes.

Attribute name

Symbol

Page 12: E-R diagram in Database

Attribute Domain:

*A set of possible values for an attribute

*All atributes have domain

Example : The domain for Grade point average (GPA) can be from 0 to 4.

Similarly, domain for Gender attribute can be Either male or female.

Page 13: E-R diagram in Database

Relationships:*A logical connection between different enities.* Established on the basis of interaction between these entities.

Participents: entities participating In a relationship are called participents.

Relationship nameSymbol

Page 14: E-R diagram in Database

Doctor treats Patient

Teacher teaches students

Page 15: E-R diagram in Database

Total Relationship:

Partial relationship:

If all entities of that entity set may be participant in the relationship.Example: In supplier_part relationship,the relationship is total if every part is supplied by a supplier.

If some of the entities of that entity set may be participant in the relationship.Example: If certain parts are available without a supplier.

Page 16: E-R diagram in Database
Page 17: E-R diagram in Database

Types of Attributes

1: Simple 2: composite 3: single valued4: multi-valued 5: stored6: derived7: identifiers

Page 18: E-R diagram in Database

SIMPLE ATTRIBUTE/ ATOMIC ATTRIBUTE:

*Cannot be subdivided into smaller components.

PERSON

GENDER

Page 19: E-R diagram in Database

Composite attribute:*Can be divided into smaller components.

EMPLOYEE

ADDRESS

streetcity

country

Page 20: E-R diagram in Database

Single-valued Attributes:Contain single valued value.

Employee

Gender

Multi-valued Attributes:

Contain two or more values.

person

namecity hobies

Page 21: E-R diagram in Database

Stored Attributes:*Stored in a database.

Derived attributes:*Not stored in database but derived from another value.

Page 22: E-R diagram in Database

IDENTIFIERS:Identifies an entity instance among other instances In entity class.

Page 23: E-R diagram in Database

ENTITIES:

**WEEK & STRONG ENTITIE

***ASSOCIATIVE ENTITIES

Page 24: E-R diagram in Database

Weak entity& strong entity week entity Can exist only if any other entity exist, also called child ,dependent .Strong entity Can exist without depending

upon the existance of another entity .

PERSON HAS CHILDCHILD

Owner/ identifying owner: entity on which the weak entity depends.Example

Page 25: E-R diagram in Database

ASSOCATIVE ENTITIES:

Type of entity that associates the instances of one or many entity type with one another.

Page 26: E-R diagram in Database

Degree of relationships:

•The number of entities in a relationship .

•Types:•1: unary relationship•2: binary relationship•3: ternary relationship

Page 27: E-R diagram in Database

Unary relationship:

Page 28: E-R diagram in Database

Binary relationships:Exist between the instances of two entity types.Types:1: one-to-one

2:one-to-many

3:many –to-many

Page 29: E-R diagram in Database

One to one:

One to many:

Many to many:

Page 30: E-R diagram in Database

Ternary relationships:

Page 31: E-R diagram in Database

Cardinality constraints:The maximum number of relationships.

Page 32: E-R diagram in Database

*Circle means zero

*Line means………..one

*Crow’s foot symbol means….many

Page 33: E-R diagram in Database

Past paper 2010

Page 34: E-R diagram in Database

employee

department

jobs

equipment

suppliers project

Page 35: E-R diagram in Database

name DOB

Phone no

Project no Project name

Project cost duration

name AddressDate of last meeting

number

Page 36: E-R diagram in Database
Page 37: E-R diagram in Database

To conclude E-R diagram is a graphical representation

Of data in an organization.It includes entities,attributes

and relationships.

Conclusion:

Page 38: E-R diagram in Database

We hope you liked it.

Page 39: E-R diagram in Database

Recommended