E-R diagram in Database
-
Upload
fatiha-qureshi -
Category
Education
-
view
1.415 -
download
6
description
Transcript of E-R diagram in Database
![Page 1: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/1.jpg)
E-R Diagram
![Page 2: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/2.jpg)
Presented by:
Fatiha Rashid
Javeria Rafeeq
![Page 3: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/3.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/4.jpg)
Advantages of E-R Model:
CONCEPTUAL SIMPLICITY:
VISUAL REPRESENTATION:
EFFECTIVE COMMUNICATION TOOL:
![Page 5: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/5.jpg)
Elements of E-R Model:
1: Entities
2: Attributes
3: Relationships
![Page 6: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/6.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/7.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/8.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/9.jpg)
Entity Class
Entity instance
![Page 10: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/10.jpg)
Entity class
Entity instance
![Page 11: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/11.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/12.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/13.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/14.jpg)
Doctor treats Patient
Teacher teaches students
![Page 15: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/15.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/16.jpg)
![Page 17: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/17.jpg)
Types of Attributes
1: Simple 2: composite 3: single valued4: multi-valued 5: stored6: derived7: identifiers
![Page 18: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/18.jpg)
SIMPLE ATTRIBUTE/ ATOMIC ATTRIBUTE:
*Cannot be subdivided into smaller components.
PERSON
GENDER
![Page 19: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/19.jpg)
Composite attribute:*Can be divided into smaller components.
EMPLOYEE
ADDRESS
streetcity
country
![Page 20: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/20.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/21.jpg)
Stored Attributes:*Stored in a database.
Derived attributes:*Not stored in database but derived from another value.
![Page 22: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/22.jpg)
IDENTIFIERS:Identifies an entity instance among other instances In entity class.
![Page 23: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/23.jpg)
ENTITIES:
**WEEK & STRONG ENTITIE
***ASSOCIATIVE ENTITIES
![Page 24: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/24.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/25.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/26.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/27.jpg)
Unary relationship:
![Page 28: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/28.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/29.jpg)
One to one:
One to many:
Many to many:
![Page 30: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/30.jpg)
Ternary relationships:
![Page 31: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/31.jpg)
Cardinality constraints:The maximum number of relationships.
![Page 32: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/32.jpg)
*Circle means zero
*Line means………..one
*Crow’s foot symbol means….many
![Page 33: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/33.jpg)
Past paper 2010
![Page 34: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/34.jpg)
employee
department
jobs
equipment
suppliers project
![Page 35: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/35.jpg)
name DOB
Phone no
Project no Project name
Project cost duration
name AddressDate of last meeting
number
![Page 36: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/36.jpg)
![Page 37: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/37.jpg)
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](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/38.jpg)
We hope you liked it.
![Page 39: E-R diagram in Database](https://reader034.fdocuments.net/reader034/viewer/2022051323/548449e4b47959d80c8b4b09/html5/thumbnails/39.jpg)