Entity Relationship
Diagrams
www.myassignmenthelp.net
Entity-Relationship Diagram
• Entity-Relationship (E-R) Diagram
– A detailed or logical representation of the
entities, associations as well as data
components to have an organization or
maybe small business.
• Notation works by using several key
constructs.
– Data entities
– Relationships
– Attributes
www.myassignmenthelp.net
Entity
• An entity can be a enterprise object which
signifies an organization, or even group of
data.
• A person, place, object, event or even idea within the
user environment about which the business wants in
order to maintain data
• Symbolized with a rectangle in E-R diagrams
• Notation:
www.myassignmenthelp.net
Attribute
• An attribute is a sub-group associated with
information within an entity.
• A named property or even attribute of an entity that is
associated to an organization
• Notation:
www.myassignmenthelp.net
ER Diagram Notations
• Week entity
Relationship
Multivalued
attribute
Key attribute
Strong Weak
Relationship
www.myassignmenthelp.net
Example:
carry
books indexwrote subjectauthor
s
SS#
name
title
librariesaddress
isbn
Subject
matter
www.myassignmenthelp.net
Binary Relationship
The binary relationship between entity set A as
well as B may be:
• 1:1 Women marrying Men (function)
• N:1 Children having mothers (function)
marry men
having mothers
1n
A B
A B
www.myassignmenthelp.net
Cont….
• 1:N Mothers having children (inverse
function)
• M:N Students enrolled in a class
having children
n1
A B
enrolled classes A B
www.myassignmenthelp.net
Key
• Identification associated with any kind of data
type.
• The various kinds of KEY attribute are:
– Super Key
– Candidate Key
– Primary Key
– Foreign Key
– Composite Key
– Alternate Key
– Secondary Key
www.myassignmenthelp.net
Super Key:
• An attribute as well as combining attribute that is used to
identify the records uniquely. A table can have a lot of
Super Keys.
– For example:
(ID), (ID,Name), (ID,Address), (ID,Department_ID),
(ID,Salary),
The like because any kind of mixture which could
determine the actual records uniquely would have been
a Super Key.
www.myassignmenthelp.net
Candidate Key:
• Is a column in a table that is able to be a primary key.
– For example:
1)ID
2)Name, address
We have only two Candidate Keys used to determine the
actual records from the table uniquely. “ID” Key may
determine the actual record uniquely and combined of
Name and Address can identify the record uniquely,
however nor "Name" neither "Address" may be used
to determine the actual "records uniquely“ as it might
be possible that we have two employees with similar name
or two employees from the same house.
www.myassignmenthelp.net
Primary Key:
• The attribute or as well as combined attributes
that uniquely define the record.
• For example:
Database custom may use among the Candidate Key
like Primary Key. In this instance we now have “ID” as
well as “Name, Address” as Candidate Key, Consider
“ID” Key as a Primary Key as the other key is the
combination of more than one attribute.
www.myassignmenthelp.net
Foreign Key:
• An attribute or combined attribute in a table whose value
match a primary key in another table.
 Composite Key:
A primary key which includes several attributes is called
 For example: if we have used “Name, Address” as a
Primary Key then it will be our Composite Key.
www.myassignmenthelp.net
Alternate Key:
 The candidate keys that is not the main primary key is
called an alternate key.
 For example: “Name, Address” as it is the only other
Candidate Key that is not a Primary Key.
 Secondary Key:
Alternative associated with primary key.
 For example: Name, Address, Salary, Department_ID
etc. as they can determine the records but they might
not be unique.
www.myassignmenthelp.net
For getting help with any
database related assignments
Contact:
http://www.myassignmenthelp.net/databa
se-system-assignment-help.php
www.myassignmenthelp.net

Entity relationship diagram for dummies

  • 1.
  • 2.
    Entity-Relationship Diagram • Entity-Relationship(E-R) Diagram – A detailed or logical representation of the entities, associations as well as data components to have an organization or maybe small business. • Notation works by using several key constructs. – Data entities – Relationships – Attributes www.myassignmenthelp.net
  • 3.
    Entity • An entitycan be a enterprise object which signifies an organization, or even group of data. • A person, place, object, event or even idea within the user environment about which the business wants in order to maintain data • Symbolized with a rectangle in E-R diagrams • Notation: www.myassignmenthelp.net
  • 4.
    Attribute • An attributeis a sub-group associated with information within an entity. • A named property or even attribute of an entity that is associated to an organization • Notation: www.myassignmenthelp.net
  • 5.
    ER Diagram Notations •Week entity Relationship Multivalued attribute Key attribute Strong Weak Relationship www.myassignmenthelp.net
  • 6.
  • 7.
    Binary Relationship The binaryrelationship between entity set A as well as B may be: • 1:1 Women marrying Men (function) • N:1 Children having mothers (function) marry men having mothers 1n A B A B www.myassignmenthelp.net
  • 8.
    Cont…. • 1:N Mothershaving children (inverse function) • M:N Students enrolled in a class having children n1 A B enrolled classes A B www.myassignmenthelp.net
  • 9.
    Key • Identification associatedwith any kind of data type. • The various kinds of KEY attribute are: – Super Key – Candidate Key – Primary Key – Foreign Key – Composite Key – Alternate Key – Secondary Key www.myassignmenthelp.net
  • 10.
    Super Key: • Anattribute as well as combining attribute that is used to identify the records uniquely. A table can have a lot of Super Keys. – For example: (ID), (ID,Name), (ID,Address), (ID,Department_ID), (ID,Salary), The like because any kind of mixture which could determine the actual records uniquely would have been a Super Key. www.myassignmenthelp.net
  • 11.
    Candidate Key: • Isa column in a table that is able to be a primary key. – For example: 1)ID 2)Name, address We have only two Candidate Keys used to determine the actual records from the table uniquely. “ID” Key may determine the actual record uniquely and combined of Name and Address can identify the record uniquely, however nor "Name" neither "Address" may be used to determine the actual "records uniquely“ as it might be possible that we have two employees with similar name or two employees from the same house. www.myassignmenthelp.net
  • 12.
    Primary Key: • Theattribute or as well as combined attributes that uniquely define the record. • For example: Database custom may use among the Candidate Key like Primary Key. In this instance we now have “ID” as well as “Name, Address” as Candidate Key, Consider “ID” Key as a Primary Key as the other key is the combination of more than one attribute. www.myassignmenthelp.net
  • 13.
    Foreign Key: • Anattribute or combined attribute in a table whose value match a primary key in another table.  Composite Key: A primary key which includes several attributes is called  For example: if we have used “Name, Address” as a Primary Key then it will be our Composite Key. www.myassignmenthelp.net
  • 14.
    Alternate Key:  Thecandidate keys that is not the main primary key is called an alternate key.  For example: “Name, Address” as it is the only other Candidate Key that is not a Primary Key.  Secondary Key: Alternative associated with primary key.  For example: Name, Address, Salary, Department_ID etc. as they can determine the records but they might not be unique. www.myassignmenthelp.net
  • 15.
    For getting helpwith any database related assignments Contact: http://www.myassignmenthelp.net/databa se-system-assignment-help.php www.myassignmenthelp.net