There are two different software worlds: one is the Java world, where none other than objects are known, while the other is the relational database world, where data is king. Java developers always work with objects that represent state and behavior modeling real-world problems. Object persistence is a fundamental requirement of Java applications. The state is modeled to be persisted in durable storage so it will be permanent. On the other hand, when it is time to store the data, we have to rely on relational databases, where the data is traditionally represented in a row-column format with relationships and associations. Bringing Java objects to the relational world is always a challenging and complex task for Java developers. This process is often referred to as object-relational mapping (ORM). This chapter sets the tone for our Hibernate discussion by first looking at the problem domain of object persistence. We will explore the technologies and tools, such as JDBC and Hibernate, that assist us in facing this challenge. We will compare and contrast both of these technologies and learn how Hibernate achieves object-relational-model persistence with ease and comfort. Birth of Hibernate Say we are designing an online banking system. We expect the bank to keep a safe copy of our accounts, personal details, preferences, and transactions. This means, in order to be durable, the application data must be persisted to a permanent storage space. In the context of this bank application, by persistent data I mean the customer, address, account, and other domain objects that we may have modeled in our design. The data that’s been persisted by our application will outlive the application itself—for example, we may have moved away from online to phone banking, but the data created by our bank application should still be visible or available if required.
TOP 10 Cărți
Acum câțiva ani, am pățit o chestie ciudată. Eram în liceu și eram foarte îndră...
Colegiul păruse dintotdeauna ceva de o importanţă capitală, o parte esenţială care descrie valoar...
A plecat din Paris să se uite pe sine. Dragostea pe care o va întâlni va schimba totu...
O carte tulburatoare, fascinanta, ce redeschide vechea discutie despre esenta raului uman. Desi d...
Romanul este specia literara a gneului epic in proza de mare intindere cu personaje numeroase, co...
Frustrată, mă încrunt la imaginea mea din oglindă. Fir-ar el de păr — nu vrea să se a...
Nu reușeam să respir. Am avut încredere în acel om, am parcurs atâția kilometri...
n încăpere, totul urla că n‑aveam ce să caut acolo. Scările erau pe
cale să se năruie,...
Din taciunii secretelor, pasiunea se aprinde mistuitoare. Calma, rece, serioasa, Gisele Whitby st...
De ce apare aceastã carte? De ce se simte nevoia unei discuþii ample având ca...
JET LUELLYN răsuci volanul somptuoasei sale limuzine argintii la intersecţia Telford şi ieşi de p...
Tot ceea ce faceți implică activitatea creierului - modul de a gândi, de a simţi sau de a a...