Sie sind auf Seite 1von 15

ERD

22-May-2014

Entity Relationship Diagram (ERD)


Entity Relationship Diagrams (ERDs)
illustrate the logical structure of
databases.

ERD Notations
Entity
An entity is an object or concept about
which you want to store information.

ERD Notations
Weak Entity
A weak entity is an entity that must
defined by a foreign key relationship
with another entity as it cannot be
uniquely identified by its own attributes
alone.

ERD Notations
Key attribute
A key attribute is the unique,
distinguishing characteristic of the
entity. For example, an employee's
social security number might be the
employee's key attribute.

ERD Notations
Multivalued attribute
A multivalued attribute can have more
than one value. For example, an
employee entity can have multiple skill
values.

ERD Notations
Derived attribute
A derived attribute is based on another
attribute. For example, an employee's
monthly salary is based on the
employee's salary and bonus.

ERD Notations
Relationships
Relationships illustrate how two entities
share information in the database
structure.

ERD Notations
Cardinality
Cardinality specifies how many instances of an
entity relate to one instance of another entity.
Ordinality is also closely linked to cardinality.
While cardinality specifies the occurences of a
relationship, ordinality describes the
relationship as either mandatory or optional.
In other words, cardinality specifies the
maximum number of relationships and
ordinality specifies the absolute minimum
number of relationships.

ERD Notations
Cardinality

ERD Notations

ERD Notations
Recursive relationship
In some cases, entities can be selflinked. For example, employees can
supervise other employees.

EXAMPLE
Draw ERD for the given situation

Salespersons in FUI contact the


customers to sell the products.
Salespersons try to get some order for
the products. Each product has several
parts and a customer can place order for
the complete product or some specific
parts of that product.
Employee in FUI assemble the products
and make them available for the
customers. When an order is placed an
employee check the product availability
and confirm the shipment. If the required
product is not available then a new order

Expected Final Exam Pattern

Situation will be given


Draw ERD
Normalization
Tables
Constrains, views, keys

SQL
Relational Algebra

Das könnte Ihnen auch gefallen