Sie sind auf Seite 1von 11

ENTITY RELATIONSHIP DIAGRAM

PRESENTED BY:BY:MANJARI KUMARI ROLL NO.- 10/MBA/07 NO.-

INTRODUCTION:INTRODUCTION:y

Entity: An entity is a thing or object in the real world that is distinguishable from all other objects, such as person, places, things, or events. Entity set:It is a set of entities of the same type that share the same properties.For eg.entity set customer consists of the set of all person who are customers at a given bank. Attribute:Attributes describe the entity of which they are associated.Possible attributes of the customer entity set are customer name,social security,customer street,customer city,etc.possible attributes of the loan entity set are loan number and amount.

Types of Attributes:
y y

Simple Attributes:Those which are not divided into subparts.for eg. customer city or customer street. Composite Attributes: Those which can be further divided into sub-parts.for eg. A customer name can be divided into first name,middle name and last name. Single-valued Attributes: These attributes have a single value for a particular entity. For instance loan_number attribute for a specific loan entity refers to only one loan number. Multi-valued Attributes: If for a particular entity,the attribute is having multiple values,it is called multi-valued attribute.for eg.an employee may have zero,one, or several phone numbers. Derived Attributes:Any attribute which is derived from the values of other related attributes or entities are called derived attributes.For eg. Age of a person is derived from his Date of birth.

Relationships: A Relationship represents an association between two or more entities. y It is of following types: one-to-one: When one instance of a particular entity type relates with one instance of another entity type , it is one-to-one relationship. one-to-many: When one instance of a particular entity type relates with one or more instances of another entity type , it is one-to-many relationship. many-to-one: When one or more instances of a particular entity type relates with one instance of another entity type , it is many-to-one relationship. many-to-many: When one or more instances of a particular entity type relates to one or more instances of another entity type , it is many-to-many relationship.
y

EntityEntity-relationship diagrams
An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database. y E-R diagram can express the overall logical structure of a database graphically. y ER diagrams often use symbols to represent different types of information.  Rectangles , which represent entity sets.  Ellipses , which represent attributes.  Diamonds,which represent relationship sets.  Lines,which link attributes to entity sets and entity sets to relationship sets.
y

 Double

ellipses , which represents multivalued attributes.  Dashed ellipses, which represent derived attributes.  Double lines , which indicate total participation of an entity in a relationship set.  Double rectangles,which represent weak entity sets.

E-R Diagram for a Banking Enterprise


Entity sets used:  The customer entity set , with attributes customer_id,customer_name,customer_stre et,customer_city.  The loan entity set , with attributes loan_number,loan_amount.  A weak entity set , loan_payment with attributes payment_number,payment_date,payment_am ount.
y

 The

Branch entity set , with attributes branch_name,branch_city,assets.  The employee entity set , with attributes employee_id,employee_name,phone_num ber,start_date(base attribute),employment_length(derived attribute).  Account entity set with attribute account_number,balance.

Relationship sets used:  Borrower ( a many_to_many

relationship set

between customer and loan).  Loan_payment ( a one_to_one relationship set from loan to payment).  Loan_branch ( a many_to_many relationship set indicating in which branch the loan originated).  Depositor ( a many_to_many relationship set between customer and account).  Account_brabch ( a many_to_one relationship set between account and branch).  Cust_banker ( a many_to_one relationship set that indicates one or more customers can be advised by a bank employee).  Works_for ( a relationship set with role indicators managers and workers).

E-R diagram for a banking enterprise

THANK YOU...

Das könnte Ihnen auch gefallen