Intended learning outcomes: Differentiate between binary association and reflexive association. Explain Abrial’s access function and the example of the association of the classes “book” and “customer” in library systems. Identify the (association) role.
An association is, according to [MeWe18], a relationship, link, connection, or uniting. In data-oriented and object-oriented modeling, an association is a relationship among classes, more precisely among the objects or entities of these classes.
A binary association or two-sided association is a relationship between exactly two classes, or more precisely between one object of each of two classes.
A reflexive association relates a class to itself; more precisely, it relates an object of a class to another object in the same class.
There are also associations among three or more classes. These are found rarely and moreover can always be traced to relevant binary associations. Reflexive associations are also found rarely, but some are typical. An important case is discussed in Section 20.3.8 below.
An association finds expression in the mutual assignment of the elements of classes. We perform data modeling and object modeling to identify these relationships and to depict them graphically to enhance understanding of the system. For this, formally, the Abrial’s access function can be suitable.
Abrial’s access function (see [Abri74]) is a binary relation (a mathematical relation!) that leads from the initial to the target class.
The formalism is shown in the case of binary association between classes X and Y in Figure 20.3.3.1. Here, f and g are binary relations, whereby g is the reverse relation to f. f leads from class X to class Y, and g leads in the reverse direction from Y to X.
Fig. 20.3.3.1 Abrial’s access function
To exemplify the use of Abrial’s access function, Figure 20.3.3.2 shows the association between the classes book and library customer in library systems.
The content depicted by the two Abrial’s access functions is intuitively understandable: For one, a book can be lent to at most one library customer, but it can also be not lent out. For another, a library customer can borrow at most four books at a time. At a given point in time, however, a customer may have no books checked out. Therefore, the two Abrial’s access functions stand for the two roles of a binary association.
Fig. 20.3.3.2 The association of the classes book and customer in library systems.
An (association) role is a statement about the manner or reason for combining an object or entity of the initial class in an association with an object or entity of the target class.
The role name or description of the access function is the part of a role description that connects the subject of the sentence (namely, the object or entity of the initial class) with the object of the sentence (namely, the object or entity of the target class).
The role name, or description of the access function, thus contains at the minimum a verb and mostly contains the preposition used with that verb for the particular object. In the example of Figure 20.3.3.2, the role that corresponds to the access function f is called “is lent to,” and the role that corresponds to the access function g is called “borrows.”
Course section 20.3: Subsections and their intended learning outcomes
20.3 Modeling Information Systems in the Data View and Object View
Intended learning outcomes: Present terms such as object, attribute, object class, view, primary and secondary keys. Explain basic concepts such as association, association role and type. Describe the breaking up of an n-to-n association – in particular a reflexive one – and the association class. Disclose the use of the hierarchical constructs for developing a company-wide generic object model.
20.3.1 Object, Attribute, and Object Class
Intended learning outcomes: Differentiate between entity, object, and data record. Differentiate between attribute and data field. Differentiate between object class, file, and table. Explain the class customer as a table in the relational database model.
20.3.2 View and Primary and Secondary Keys
Intended learning outcomes: Produce an overview on the view on a class. Differentiate between primary key and secondary key. Describe characteristics for a “good” primary key. Explain the representation of a class in an object-oriented approach (with example) and the representation of an object.
20.3.3 Association and (Association) Role
Intended learning outcomes: Differentiate between binary association and reflexive association. Explain Abrial’s access function and the example of the association of the classes “book” and “customer” in library systems. Identify the (association) role.
20.3.4 Single-Valued and Multivalued Roles, and Total and Partial Roles
Intended learning outcomes: Differentiate between a single-valued role and a multivalued role. Differentiate between a total and a partial role, or access function.
20.3.5 Association Types
Intended learning outcomes: Differentiate between the 1-to-1 association, the 1-to-n association, the n-to-1 association, and the n-to-n association. Explain various examples of different binary associations.
20.3.6 Breaking up an n-to-n Association; Association Class
Intended learning outcomes: Explain the association class formed by breaking up an n-to-n association into a 1-to-n association and an n-to-1 association.
20.3.7 The Crow’s-Foot Notation and the Common Entity-Oriented Notation
Intended learning outcomes: Describe the commonly used crow’s-foot notation for depicting associations in the entity-oriented approach. Identify the common notation for associations in the entity-oriented approach.
20.3.7b The Reidentification Key and the Object-Oriented Notation
Intended learning outcomes: Explain the Representation of associations in an object-oriented form, as well as the concept of the reidentification key.
20.3.8 Breaking Up a Reflexive n-to-n Association, Step 1: Duplicate, and Step 2: Breakdown
Intended learning outcomes: Explain Breaking up a reflexive n-to-n association, step 1: Duplicate the class to create its two subclasses, and step 2: Classical breakdown of the n-to-n association.
20.3.8b Breaking Up a Reflexive n-to-n Association, Step 3: Merge
Intended learning outcomes: Explain Breaking up a reflexive n-to-n association, step 3: Merge the generating classes.
20.3.9 Using the Hierarchical Constructs Based on Basic Object Classes: The Company-Wide Generic Object Model
Intended learning outcomes: Explain the basic object classes and possible subclasses (specializations) of an industrial company. Describe the concept of a company-wide data model, or generic model.