Abstract
Most significant development projects involve a relational database. The mainstay of most commercial applications is the large-scale storage of ordered information, such as catalogs, customer lists, contract details, published text, and architectural designs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
A relational database is a collection of sets of data items, each of which is formally described and organized. Rules can be put into place for the data such that it can be validated, and indexes can be created such that the data can be queried and updated quickly and safely.
- 2.
Well, perhaps an ideal world in which an ORM is used for data access. But in this book this can be assumed to be the case.
- 3.
See http://docs.jboss.org/hibernate/orm/5.2/quickstart/html_single/#hibernate-gsg-tutorialbasic-entity for more details. Short form: Hibernate uses reflection to construct an object before data population. The shortest (and quickest) path to doing that is with a no-argument constructor.
- 4.
For more on automatic resource management, introduced in Java 7, see the Java tutorial’s reference on it: http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html .
- 5.
Incidentally, if you’re interested, “immeasurably” works out to thirty-two lines. The old way, without ARM, had thirty-two lines of code dedicated to safe cleanup. I don’t know about you, but I like this code better. Not only is it shorter, but it’s harder to mess up.
- 6.
A common criticism of Java is that a “Hello, World” application can take seconds to run, because the VM startup is part of the running time. However, VM startup itself is a rare occurrence for most apps – it happens only once per run, after all – and in an app that runs for hours, days, or months, the time the VM takes to start is not relevant. The criticism is misplaced, unless your business’s purpose is running “Hello, World” in the shortest time possible.
- 7.
Go figure; who knew coders like for things to be code? (Besides coders, I mean.)
Author information
Authors and Affiliations
Electronic Supplementary Material
Below is the link to the electronic supplementary material.
Rights and permissions
Copyright information
© 2016 Joseph B. Ottinger, Jeff Linwood and Dave Minter
About this chapter
Cite this chapter
Ottinger, J.B., Linwood, J., Minter, D. (2016). An Introduction to Hibernate 5. In: Beginning Hibernate. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2319-2_1
Download citation
DOI: https://doi.org/10.1007/978-1-4842-2319-2_1
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-2318-5
Online ISBN: 978-1-4842-2319-2
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books