Upload
wwwmyassignmenthelpnet
View
144
Download
0
Embed Size (px)
Citation preview
Entity Relationship Diagrams
Introduction to Entity-Relationship
Modeling
• Notation makes use of three primary constructs
– Data entities
– Relationships
– Attributes
• Entity-Relationship (E-R) Diagram
– The detailed, logical representation of the entities,
associations and also data elements with an organization
or business.
3 Level Database Design
Key Terms
• Entity
– The person, place, object, event or even
concept within the user environment
regarding that the organization wishes in
order to maintain data.
– Symbolized with a rectangle within E-R diagrams.
• Entity Type
– A collection of entities that share typical properties oreven characteristics.
Depicting Entities and Attributes
Attribute
• Attribute : A named property or even characteristic of an
entity that's associated with interest for an organization.
Other Attribute Types
• Composite attribute
– An attribute that may be further divided into much
more attributes
• For example: Name, Address, and so on.
• Multi-Value Attribute
– An attribute which permit several values
• For example: skills, phone numbers, and so on.
Cont..
• Derived attribute
– Attributes that may be calculated (derived) through
additional attributes
• For example: age, total, interest, due date, etc
• Unlike the relational model, these types of attribute tend
to be permitted within conceptual models.
Relationship
• Relationship explains how entities tend to beassociated.
• Relationship features
– Cardinality
• Entity instance’s participation count
– Degree of relationship
• How many entities are involved in a relationship?
One-to-One Relationship
• One-to-One (1:1)
A governor governs (only) one state; a statehas (only) one governor.
One-to-Many Relationship
• One-to-Many (1:N) : A single entity instance in a single
entity class (parent) relates to several entity instances
within an additional entity class (child).
Many-to-Many Relationship
• Many-to-Many (N:M) : Every entity instance in a single
entity class relates to several entity instances within an
additional entity class and vice versa.
Naming and Defining Relationships
• Relationship name is a verb phrase.
• Avoid vague names
• Guidelines with regard to determining associations
– Definition explains what action is being taken as well
as the reason why it is necessary
– Provide good examples in order to clarify the action
– Optional participation should be described
– Clarify causes of any kind of explicit maximum
cardinality
Naming and Defining Relationships
• Guidelines with regard to determining relationships
– Clarify any kind of restrictions on participation within
the relationship
– Clarify extent of the history that is kept within the
relationship
– Clarify whether an entity instance involved with the
relationship instance can transfer participation to
another relationship instance