Wiley Professional Hibernate 978-0-7645-7677-5 Manuale Utente

Codici prodotto
978-0-7645-7677-5
Pagina di 14
Introduction to Mapping
Objects to Relational
Databases
In the computer industry, we commonly have discussions, disagreements, and even shouting
matches over which of the latest languages are the best and where they should be used.
Discussions turn to the best platform currently available and who’s suing whom. However, each
of us is also thinking about the latest project we’ve been given and its strict deadline. Overall, the
project isn’t complex, but we have to support numerous database backend systems. This means
we need to incorporate a persistence layer to handle the database differences. That part isn’t too
difficult, but what about the data itself? Do we just store it in some proprietary database and deal
with the details later? No, we need to have a strategy that works with our application and the lan-
guage the application is written in.
Today’s programming languages take advantage of the latest in object-oriented techniques. As you
know, an object is a construct to enforce encapsulation. The problem is how to store an object for
use by the same application at a later time or by another application. Some of the common solu-
tions to this problem are:
Serialization
XML
Object-oriented database systems mapping
Let’s consider these possible solutions and determine their advantages and disadvantage before
looking at the solution around which this book is written.
1
1
1
03_576771_c01.qxd  9/1/04  12:09 PM  Page 1
COPYRIGHTED MATERIAL