Computing Students - Computer Science Degree Notes
Home Contact Shop Notes Questions Programming Links Dictionary Coursework FORUM Tutors
  Recommended Amazon Searches: Computer Science | Computing | Computer Systems | Database | Computing Revision  

Notes > Database Systems > Entities and Entity-Relationship (ER) Modelling

ER Modelling provides a fully scalable solution to modelling relationships between groups of data elements. These groups of data elements can be described as "entities" or "entity types". These entities are items (real or otherwise) that are of relevance to the business.

An ER model will contain the following concepts:

- Entity types
- Relationship types
- Attributes
 
An entity type describes a type of item which is distinctly identifiable. The identification of entities is typically open to the interpretative skills of the systems analyst or designer. There are no quick and easy rules which can be used to identify entities.

An ER model consists of an ER diagram or set of ER diagrams, as well as a set of normalised relations (tables) which correspond to the ER diagrams. Additional information that can be provided along with the ER model is as follows:

- written description of entities / relationships
- any assumptions
- additional constraints on the model

Entity-Relationship (ER) Diagrams

Entities are shown within a box. The entities "Student", "Book", "DVD" and "Staff" can therefore be represented as shown below:

Entities

Relationships between entities can be shown by joining the entities with a line:

Entity Relationships

As shown in the above diagram, the relationship can be named and given a direction (shown with a small arrow) to indicate which way the named relationship applies. This naming of relationships adds meaning and can reduce ambiguity.

Cardinality constraints show the number of instances of entities that can be involved in a relationship. For example, 1 member of staff can look after no books, 1 book, or many books. A book has to be assigned to some member of staff though. This is represented by the "1..1" cardinality constraint. One and only one member of staff must be assigned to each book.

Relationship Degrees

The degree of a relationship is the number of entities that participate in that relationship. A simple relationship involving two entities is known as a binary relationship. Relationships with three entities are known as ternary relationships. It is possible to have more entities involved in a relationship but this would lead to an increasing level of complexity.

Unary relationships involve a single entity which has a relationship with itself (i.e. the same entity type). Unary relationships are also known as recursive relationships.

See also Enhanced ER Modelling (EER)

Search for "Entities and Entity-Relationship (ER) Modelling" on: Google | Kelkoo | Amazon | eBay (UK) | eBay (US)

Search for "Entities and Entity-Relationship (ER) Modelling" on the rest of Computing Students: Entities and Entity-Relationship (ER) Modelling






Home | Contact | Shop | Notes | Questions | Programming | Links | Dictionary | Coursework | Tutors Sponsored Links: Affiliate Program Articles | Computer Science Definitions | CS Degree Notes
Copyright © 2005-2009 ComputingStudents.com
This site is to be used in accordance with the ComputingStudents.com User Agreement
High Wycombe Web Design