An Entity-Relationship model has three main concepts:
- Entities: and their types / sets
Entity
Entities are specific objects or things in the mini-world that are represented in the database. They may be either physical or non-physical objects.
For example:
- an
EMPLOYEE - the research
DEPARTMENT - the product
PROJECT
- an
- Attributes: simple, composite, single-valued, multi-valued
Attribute
Attributes are properties used to describe an entity, a specific entity will have a value for each of its attributes. Each attribute has a value set (data type) associated with it, e.g. integer, string, date, etc.
Types of attributes:
Simple attribute
Simple attribute: each entity has an atomic value for this attribute. Example: ID
Link to originalComposite attribute
Composite attribute: the attribute may be composed of several components, it may form a hierarchy where some components are themselves composite. Example: Name(First, Middle, Last)
Link to originalSingle-valued attribute
Single-valued attribute: each entity can have a single value for this attribute. Example: Age attribute for each
Link to originalPerson.
An attribute may be both composite and multi-valued.Multi-valued attribute
Multi-valued attribute: an entity may have multiple values for this attribute. Example: Current Courses of a
Link to originalSTUDENT.
- Relationships: and their types / sets