Paperidiomslast
Paperidiomslast
modelling
1 Introduction
Idiom is a significative word in linguistical terms. It refers to a syntactical con-
struction (phrase or sentence) whose semantics is not in the word by word read-
ing. It is in the complete phrase only[1], for example:
2 Idioms in ER
– Basic
– Classification or Catalogue
– Composition
– Master Detail
– Reflexive
– Historical reflexive
– Is-a
Along the paper, this list is also refered as the Idiom Catalogue.
This idiom is the most frequently found. It is present in almost all visions of
the UoD, used to classify the entity types with a set of predefined values, for
example a city of birth (clasiffier or catalogue of values) of a person (classified or
catalogued). This is very useful to solve the first normal form. And allows that
at the rest of the design, the validations are done in terms of idioms instead of
plain ER. For example: how many type entities classify the city type entity?, can
I reuse this classificator? (Yes! reuse is intense with idioms), what is happening
if one classificator entity is deleted or added? These questions about the model
are similar to the ones posed for the UoD: how many persons classificate one
specific city? can I reuse a city? what happens if a city is removed or added?
The pattern template for Idiom Classification is shown in Fig. 1
Semantics: Some entities W are relationships with other any entity W (may
be the same!).
Characteristics: – The hierarchical structure do not have a deep limit.
– This idioms build a nice tree structure, the root node is the top famous,
the intermediate nodes are medium famous, and the leaf nodes are the
crazy fans.
Semantics: Some entities X are related together and the history of those re-
lations is kept in Y. However is posible register the history of relationships
between the actors.
Characteristics: – The Y entity type may be classiffied, and in this way has
the freedom to register anythings.
– The Historician Entity type Y, is made for X entities only.
The example, see Fig. 6, shows the relationship between employee entities,
one employee plays the monitor role and the other plays the monitored role.
The temporal attribute (period of monitoring) is for the historic registration
capability.
Example: Fig. 8 shows one example of multiple specialization and multiple gen-
eralization at the same time. The Document entity type has multiple specializa-
tion relationships and the Memorandum entity type has multiple generalization
relationships.
The central problem with ER is the excesive freedom given to the designer in
order to represent any aspects of the UoD with a reduced language. This ER
language has high representation power. This freedom results in many represen-
tations of the same observation, some of which may be correct. The different
representations will be relative to the point of view of each designer.
Idioms: a Pattern language for database modelling 7
From the idioms perspective, not all ER constructions are correct, can have
some ER constructions with wrong semantics, i.e. many to many relationships. In
the case of many to many relationships, the observer tries to model the associate
cardinality to the relationship instead of the relationship itself. Another example
is the case to model generalization or specialization relationships, it is frequent
the confusion between inheritance mechanism (from POO) with generalization
specialization concepts [5]. This problem is solved elegantly with the IS-A idiom.
Any other attempt to model generalization-specialization will not be accepted
in the idiom perspective.
If the modelling language is restricted to use just idioms, the result language
is an idiom language with well defined structures (in semantical and syntacti-
cal terms). Fortunately there is an idiom to model the different aspects of the
UoD [2], similar to the abstractions found in the OO paradigm. The discussion
of the surprising resemblance with OO abstractions will be delayed to the end
of the article.
The strategy to design the Idiom language is to build an extended language
starting from the native ER language, redefining and prunning some construc-
tions. The reference architecture is described in figure ??.
The idiom metamodel restricts some ER constructions in such a way that only
idiom structures are accepted. The metamodel extends, redefines, and creates
some ER components. The ER model [11] will be the starting point. The meta-
model in figure 10 defines the reference model for native ER structures, its
components and its relationships. The metamodel is described in terms of UML
language [4].
8 Idioms: a Pattern language for database modelling
6.1 Example
In this section a full ER model is build from small observations. Each observa-
tion is translated to idiom language. Then all small fragments of ER model are
assembled by overlapping entities.
10 Idioms: a Pattern language for database modelling
– UoD observation 1. There exists several types of work: part time work, full
time work, work by home, etc., which refer to activities or common tasks.
– idiom model 1. In figure 12:
1. Types of work is a clasiffier for activities
2. Types of work is a clasiffier for common tasks
By construction, Type of work is a candidate for second class entity type.
To conclude, the entire model is obtained by assembling and paste the small
pieces found with idioms as shown in figure 19.
Additionally, the entire model describes the relationships of Person entities
with its Person references, modeled by a master - detail idiom.
This process of composing ER models is surprisingly similar to design with
OO abstractions. By following this approach the designer can increment his self-
confidence, increasing dramatically the quality of the model and saving the time
to achieve it.
8 Conclusions
The idioms give a style of design to database modeler, so that his work repre-
sents the central element in order to validate the model. The improvements in
the process are: saving time in the design process, quality of the model, better
navigability, flexibility and self-confidence of the designer.
The semantic qualities of the idioms allow the description in terms of the
functionality associated to each idiom in terms of standard and generalized op-
erations.
References
1. Erin McKean (Editor). The New Oxford American Dictionary, Second Edition. Ox-
ford University Press, 2005.
2. Juan Marcelo Flores and Pablo Azero. Re-Composición de Modelos ER con Id-
ioms. Septimas Jornadas Iberoamericanas de Ingenierı́a de Software e Ingenierı́a del
conocimiento (JIISIC), Guayaquil, Ecuador, February 2008.
3. Juan Marcelo Flores Soliz. Idioms en ER, Quintas Jornadas Iberoamericanas de In-
genierı́a de Software e Ingenierı́a del conocimiento (JIISIC), Puebla, Mexico, March
2006. http://memi.umss.edu.bo/idiomsER
4. Grady Booch, Ivar Jacobson and James Rumbaugh. The Unified Modeling Lan-
guage. Addison-Wesley,1998.
5. Paul Dorsey, Joseph Hudicka. Diseño de Bases de Datos con UML. Oracle Press,
1999.
6. Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides. Design Patterns.
Addison-Wesley, 1995.
7. Roel Wieringa. Requirements Engineering: Frameworks for Understanding. Wiley,
1996.
8. Craig Larman. Applying UML and Patterns. Prentice-Hall, 2004.
9. Oracle Press. Oracle Designer-database Generator. OraclePress, 2001.
10. Ramez A. Elmasri, Shamkant B. Navathe. Fundamentos de Sistemas de Bases de
Datos, Tercera Edicion. Addison Wesley, 2002.
11. Peter Pin-Shan Chen. The Entity-Relationship Model - Toward a Unified View of
Data. ACM Transactions on DataBase Systems, Vol 1, N. 1, 1976.
12. Shamkant B. Navathe. Evolution of Data Modeling for Databases. Communications
of the ACM, Vol.35, N. 9, 1992.
13. Roel Wieringa. Design Methods for Reactive Systems: Yourdon, Statemate and
the UML. Morgan Kaufmann, 2003
14. Martin Fowler. Refactoring- Improving the design of existing code. Addison Wesley,
1999.
15. Martin Fowler. Analysis Patterns - Reusable Object Models. Addison-Wesley, 1999.
16. Martin Fowler. Patterns of enterprise application architecture. Addison Wesley,
2002.
16 Idioms: a Pattern language for database modelling