Your SlideShare is downloading. ×
E r model
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

E r model

2,726
views

Published on

Published in: Education, Technology, Business

3 Comments
3 Likes
Statistics
Notes
No Downloads
Views
Total Views
2,726
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
3
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Entity Relationship Model Presented By Swati Patil
  • 2. Introduction
    • A model is an abstraction process that hides details not required
    • Data model is a collection of conceptual tools for describing data and data relationships
    • The abstraction levels : Physical Level, Logical level and View Level
    • There are three various types of models
    • Object Based Logical Model – Used for describing data at logical and view levels.
    • Record Based Logical Model
    • Physical Model
  • 3. Basic Concepts of E-R Model:
    • It is high level conceptual model which is based on perception of real world
    • It consists of set of basic objects called as entities and of relationships among these objects.
    • It helps in database design and also helps to represent the overall logical structure of a database
    • It helps to represent the meaning of data .
  • 4. Three notations of E-R Model – Entity sets, relationship sets and attributes
    • Entities:
    • It is the basic object of the ER model which is a “thing” in the real world and independent existence i.e it is distinguishable from other objects.
    • An entity may be an object with a physical existence, for e.g. a particular person–car, house or employee or it may be an object with a conceptual existence e.g a company, job or a university course.
    • An entity set is a set of entities of same type that share same properties or attributes.
    • For e.g - Employee Entity set
    • Customer entity set
    • Each individual member of an entity set is called extension of entity set.
  • 5.
    • Attributes
    • Each entity is described by a set of properties called as attributes. For e.g person entity described by person name, person age, person address.
    • Attributes are descriptive properties of each member of an entity set. A particular entity will have a value of its attributes. It is this value of the attribute of each entity that is stored in the database.
    • For each attributes, there is set of permissible values for that attributes called as domain of attributes. For e.g Domain for employee number attributes of employee entity is the set of all positive integers.
  • 6. Types of the attributes
    • Simple or atomic and composite attributes .
    • Those attributes that is not divisible into subparts. Composite attributes are opposite to simple which can be divided into smaller subparts. For e.g employee name is composite attributes as it can be divided into subparts as first name, middle name and last name. These sub parts are turned to simple attributes since they can not further sub divided.
  • 7. Composite attributes forms a hierarchy for e.g address
  • 8.
    • Single valued and multi valued attributes
    • Attributes that have single value for particular entitiy called as single valued attributes. For e.g Age is a single valued attribute of a person.
    • The attributes that have a set of values for particular entity are called as multi valued attributes. For e.g College degrees
  • 9.
    • Multi valued attributes may have lower and upper bound on the number of values for an individual entity.
    • For e.g in case of bank offering accounts to customers, if customer is allowed to hold maximum three accounts in the bank, then account no. becomes multi valued attribute with upper bound 3
  • 10.
    • Stored and derived attributes:
    • An attribute value can be derived from the value of another attributes, then it is said to be derived attributes.
    • For e.g From an attribute birth date. The age can be derived for an employee birth date so age is derived attributes and birth date is stored attribute,
    • E.g. no of employees of the department can be derived by counting the no. of employees related to that department.
  • 11.
    • Null attributes:
    • A null value is used when an entity does not have value for an attribute.
    • For e.g Telephone no.
  • 12.
    • Relationship and relationship sets:
    • It is association between several entities. For e.g we can define relationship between an employee E1 and the department in which he works say D1. So this becomes relationship between an entity set employee and entity set department.
  • 13. Mapping Cardinalities:
    • It represents the number of relationship instance that an entity can participate in. i.e the number of entities to which another entity can be associated via a relationship set.
    • It is useful for binary relationship.
  • 14. Types of Mapping Cardinalities:
    • one to one –
    • An entity in A is associated with at most one entity in B and entity B is associated with at most one entity in A .
    • For e.g employee, department two entities and manages is relationship among these entities
  • 15.
    • For e.g employee, department
  • 16.
    • One to Many :
    • An entity in A is associated with many entities of B and an entity in B can be associated with at most one entity in A. For e.g. Department and employees are two entity set and works in is relationship
  • 17.
    • One to Many
  • 18.
    • Many to one:
    • An entity in A is associated at most in entity B and entity in B can be associated any number of entities A.
    • For e.g Student and class are two entity sets and studying in is the relationship
  • 19.
    • Many to One
  • 20.
    • Many to Many:
    • An entity in A is associated with any no. of entities B and an entity in B is associated with any no. of entities in A.
    • For e.g Employees and project are two entity sets and works in is the relationship
  • 21.  
  • 22. Participation:
    • The participation of an entity set E in a relationship set R, is said to be total if every entity in E participates in at least one relationship in R.
    • If only some entities of E participates in R, then participation of entity set E in R is said to be partial.
    • For e.g Customer borrow Loan
  • 23.
    • Super key or Primary Key:
    • It is a set of one or more attributes that taken collectively allows us to identify uniquely and entity in the entity set for e.g customer no in customer entity
    • Weak entity set:
    • An entity may not have enough attribute that can uniquely identify each member of the set such entity set are called weak entity set.
    • An entity set that has a primary key is called is strong entity set.
    • The strong entity set corresponds to weak entity set is also called identifying owner. The relationship that a weak entity type to its owner or strong entity is called identifying relationship of weak entity.
  • 24. Notations used for E-R diagram:
  • 25.  
  • 26.  
  • 27.
    • Mapping cardinality is indicated by direct line
    • Or undirected line
    • Foe e.g Consider Customer ( Cust –name, SSN, address)
    • Account ( acc-no, balance)
  • 28.  
  • 29.  
  • 30.  
  • 31.  
  • 32.  
  • 33.
    • Thank You

×