Wednesday, January 21, 2009

Hibernate in Action (notes)

- Two paradigms: SQL/JDBC relational model vs. object-oriented domain model
SQL operations such as projection and join always result in a tabular representation
of the resulting data. This is quite different than the graph of interconnected
objects used to execute the business logic in a Java application.

  • Granularity
  • Subtype
  • Identity
  • Associations
  • Object graph navigation

* PK update issue: not only update PK, but also FK in reference tables if using a column like USERNAME as PK. It is recommended to use surrogate keys (with no meaning to the user) as PK wherever possible.

No comments: