Database Reference
In-Depth Information
Figure 3: A sample model in Barker ER notation
tools. Although Oracle now supports UML class diagrams as an alternative to the traditional
ER notation, for database applications many modelers still prefer the Barker notation. A
representative sample model is shown in Figure 3.
Entity types are shown as named, soft rectangles with their attributes listed inside.
A “*” or “o” before an attribute indicates that it is mandatory or optional, respectively. A
“#” before an attribute indicates that is the primary identifi er for the entity type, or at least
part of the primary identifi er. All associations are binary, and are denoted by named lines.
Forward and inverse predicate readings may be supplied at the line end from which they
are to be read.
Each line-half depicts one of the two roles in the association. Like ORM, Barker ER
separates the concepts of optionality and cardinality. If the line-half is solid, this usually
means the role is mandatory. If the line-half is broken, this always means the role is optional.
The cardinality of a role is assumed to be 1 unless a crow's foot is used (indicating many).
In Figure 3, for example, each invoice is issued to exactly one person, and each person is
issued zero or more invoices.
The Barker notation uses an exclusive-arc to declare an exclusion constraint over a
set of roles played by the same object type. If the roles have solid lines, the roles are also
disjunctively mandatory. For example, in Figure 3 each line item is for a product or service
but not both (xor), and each person is allocated at most one of the bus pass and parking bay
options (possibly neither, so this is simple exclusion).
In a complete model, each entity type must have a primary identifi cation scheme in-
volving one or more attributes (marked #) or roles (marked by a stroke “|” across the role
line). For example, in Figure 3 a building is identifi ed by its building number, and a room is
identifi ed by combining its local room number with the fact that it is in a given building.
Search WWH ::




Custom Search