Skip to main content

Representing Uniqueness Constraints in Object-Relational Mapping

The Natural Entity Framework

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Ambler, S.W.: Agile Database Techniques. Wiley, Indianapolis (2003)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  3. Codd, E.F.: A relational model of data for large shared data banks. Communications of the ACM 13(6), 377–387 (1970)

    Article  MATH  Google Scholar 

  4. Codd, E.F.: Extending the database relational model to capture more meaning. ACM Trans. Database Syst. 4(4), 397–434 (1979)

    Article  Google Scholar 

  5. Fowler, M.: Patterns of Enterprise Application Architecture. Addison-Wesley, Boston (2003)

    Google Scholar 

  6. Helman, P.: The Science of Database Management. Richard D. Irwin Inc., Burr Ride, IL (1994)

    Google Scholar 

  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. 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. Khoshafian, S., Copeland, G.P.: Object identity. In: OOPSLA 1986, pp. 406–416 (1986)

    Google Scholar 

  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. 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. 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)

    Chapter  Google Scholar 

  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. 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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Olah, M.J., Mohr, D., Stefanovic, D. (2012). Representing Uniqueness Constraints in Object-Relational Mapping. In: Furia, C.A., Nanz, S. (eds) Objects, Models, Components, Patterns. TOOLS 2012. Lecture Notes in Computer Science, vol 7304. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-30561-0_17

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-30561-0_17

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-30560-3

  • Online ISBN: 978-3-642-30561-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics