When looking at different kinds of ERD notations, it is hard not to come across Barker’s ERD notation, which is commonly used to describe data for Oracle. Richard Barker and his coworkers developed this ERD notation while working at the British consulting firm CACI around 1981, and when Barker joined Oracle, his notation was adopted.
Let’s take a closer look at Barker’s syntax.
The most important components in the ERD diagram are:
- entities, which can be thought as physical objects or elements that can be uniquely identified, and
- relationships, which capture how entities are related to one another.
When drawing elements in the Barker notation, some rules should be followed.
Entity – is represented by a rounded corner rectangle. The entity name should be in the upper part of rectangle and in singular form.
Attributes – describe the characteristics of a particular entity instance. An attribute can be of three types:
- Unique Identifier – uniquely identifies an entity instance
- Mandatory – its value cannot be null
- Optional – its value can be null
as presented in the diagram below.
A relationship links two or more entity instances together. A relationship is commonly represented by a straight line.
Optionality of a relationship
A mandatory relationship is represented by a straight line, which specifies that each instance of an entity must be related to another instance.
An optional relationship is represented by a dashed line, which specifies that each instance of an entity may be related to another instance.
It’s important to note that only binary relationships are allowed in a Barker notation.
Degree of relationships:
one-to-one – each entity instance is related to just one entity instance.
one-to-many – each entity instance is related to multiple entity instances.
many-to-many – multiple entity instances are related to multiple entity instances
A relationship is always made up of two perspectives using the following notation:
One or more employees may work in each department; each employeer must work in one department.
A bar “|” across one end of a relationship line indicates that the relationship is a component of the primary identifier for the entity type at that end.
Each individual UID Bar in the
ORDER ITEMrepresents the fact that the foreign key represented by the relationship is also a primary key of the
Non-Transferability of Relationships
In certain situations, once a relationship is set it can never change. For example,
CHAPTERin the example below. Chapter can’t be moved to a different book. We call this the non-transferability of a relationship and it is represented by a rhombus.
There are situations where different entities can be grouped together under one common entity called a super type entity. The nested entities would be the subtype entities.