Friday, April 13, 2012

What are Entity Relationship Diagrams


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

Entity Relationship Diagram Notations


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

Entity

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.

Weak Entity

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.
Key attribute

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

Derived attribute
A derived attribute is based on another attribute. For example, an employee's monthly salary is based on the employee's annual salary.

Derived attribute
Relationships
Relationships illustrate how two entities share information in the database structure.
Relationships


Cardinality
Cardinality specifies how many instances of an entity relate to one instance of another entity.
Cardinality
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.


Recursive relationship
In some cases, entities can be self-linked. For example, employees can supervise other employees.


Recursive relationship

Stumble
Delicious
Technorati
Twitter

0 Comments:

Post a Comment