1 1 3 Understanding Entities Attributes and Elements

Visual LANSA Logical Modeler

1.1.3 Understanding Entities, Attributes and Elements

The Entity-Relationship (E-R) Model was developed by Chen in 1976. It attempts to structure data in a way which can be easily understood by the user. Some of the basic terms include:

Element: An element is the smallest piece of data within a system. An element cannot be divided into other pieces of information. Example: Age is an element. Name is not an element, as it can be broken into first name and last name.

Attribute: An element which is associated with (attached to) an entity becomes an attribute of that entity. Example: An age can be an attribute of entity Employee. An Employee entity has an attribute of last name. An Employee entity has an attribute of first name.

Entity: An entity is a group of elements which logically belongs together. Example: An Employee is an entity. An Order is an entity.

Value: A value might be a number or set of characters an attribute or element may be assigned. Example: The age of an Employee is 25 years. The Employees surname is 'Smith'.

Occurrence: A single example or instance of an entity (i.e. a row in a table) is called an occurrence.

Identifying or Key Attribute: A key attribute is one whose value uniquely identifies an occurrence within an entity. Example: An employee number identifies an Employee. An order number identifies an Order.

To summarize:

  • Age is an element.
  • Age becomes an attribute of the entity Employee.
  • The entity Employee is made up of attributes such as employee ID number, first name, last name, and age.
  • A specific Employee is identified by the employee ID number.
  • The age of an employee may have a value of 25 years.

An occurrence within the Employee entity is:

  • Employee number has value 123.
  • Employee first name is 'John'.
  • Employee last name is 'Smith'.
  • Employee age is 25 years.