Advertisement

Representing Uniqueness Constraints in Object-Relational Mapping

The Natural Entity Framework
  • Mark J. Olah
  • David Mohr
  • Darko Stefanovic
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7304)

Abstract

Object-oriented languages model data as transient objects, while relational databases store data persistently using a relational data model. The process of making objects persistent by storing their state as relational tuples is called object-relational mapping (ORM). This process is nuanced and complex as there are many fundamental differences between the relational model and the object model. In this work we address the difficulties in representing entity identity and uniqueness consistently, efficiently, and succinctly in ORM. We introduce the natural entity framework, which: (1) provides a strong concept of value-based persistent object identity; (2) allows the programmer to simultaneously specify natural and surrogate key constraints consistently in the object and relational representations; (3) provides object constructors and initializers that disambiguate the semantics of persistent object creation and retrieval; and (4) automates the mapping of inheritance hierarchies that respect natural key constraints and allows for efficient polymorphic queries and associations.

Keywords

Uniqueness Constraint Relational Schema Primary Relation Natural Entity Session Manager 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Ambler, S.W.: Agile Database Techniques. Wiley, Indianapolis (2003)Google Scholar
  2. 2.
    Cabibbo, L., Carosi, A.: Managing Inheritance Hierarchies in Object/Relational Mapping Tools. In: Pastor, Ó., Falcão e Cunha, J. (eds.) CAiSE 2005. LNCS, vol. 3520, pp. 135–150. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  3. 3.
    Codd, E.F.: A relational model of data for large shared data banks. Communications of the ACM 13(6), 377–387 (1970)zbMATHCrossRefGoogle Scholar
  4. 4.
    Codd, E.F.: Extending the database relational model to capture more meaning. ACM Trans. Database Syst. 4(4), 397–434 (1979)CrossRefGoogle Scholar
  5. 5.
    Fowler, M.: Patterns of Enterprise Application Architecture. Addison-Wesley, Boston (2003)Google Scholar
  6. 6.
    Helman, P.: The Science of Database Management. Richard D. Irwin Inc., Burr Ride, IL (1994)Google Scholar
  7. 7.
    Holder, S., Buchan, J., MacDonell, S.G.: Towards a Metrics Suite for Object-Relational Mappings. In: Kutsche, R.-D., Milanovic, N. (eds.) MBSDI 2008. CCIS, vol. 8, pp. 43–54. Springer, Heidelberg (2008)Google Scholar
  8. 8.
    Ireland, C., Bowers, D., Newton, M., Waugh, K.: A classification of object-relational impedance mismatch. In: Proceedings of the 2009 First International Conference on Advances in Databases, Knowledge, and Data Applications, pp. 36–43. IEEE Computer Society (2009)Google Scholar
  9. 9.
    Khoshafian, S., Copeland, G.P.: Object identity. In: OOPSLA 1986, pp. 406–416 (1986)Google Scholar
  10. 10.
    Kowark, T., Hirschfeld, R., Haupt, M.: Object-relational mapping with SqueakSave. In: Proceedings of the International Workshop on Smalltalk Technologies, IWST 2009, pp. 87–100. ACM (2009)Google Scholar
  11. 11.
    Link, S., Lukovic, I., Mogin, P.: Performance evaluation of natural and surrogate key database architectures. Tech. rep., Victoria University of Wellington, Wellington, NZ (2010)Google Scholar
  12. 12.
    Mork, P., Bernstein, P.A., Melnik, S.: Teaching a Schema Translator to Produce O/R Views. In: Parent, C., Schewe, K.-D., Storey, V.C., Thalheim, B. (eds.) ER 2007. LNCS, vol. 4801, pp. 102–119. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  13. 13.
    O’Neil, E.J.: Object/relational mapping 2008: Hibernate and the entity data model (EDM). In: Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data, pp. 1351–1356. ACM (2008)Google Scholar
  14. 14.
    Wieringa, R., de Jonge, W.: Object identifiers, keys, and surrogates– object identifiers revisited. Theory and Practice of Object Systems 1(2), 101–114 (1995)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Mark J. Olah
    • 1
  • David Mohr
    • 1
  • Darko Stefanovic
    • 1
  1. 1.Department of Computer ScienceUniversity of New MexicoAlbuquerqueUSA

Personalised recommendations