Java Reference
In-Depth Information
Codd's Distribution Independence Rule (Rule 11) states that existing applications
should continue to operate successfully when a distributed version of the DBMS is
introduced or when existing distributed data is redistributed around the system. The
need for distributed systems was seen even in the early days of computing.
In modern systems, distribution is accomplished in several different ways. The type of
distribution Codd was talking about would now be considered internal to the RDBMS,
so a database might be distributed across a sizeable cluster of systems and yet its
distribution would be transparent to the Java database programmer, who would
access it as a single RDBMS. From the perspective of the Java database
programmer, a multitier architecture is a far more common form of distribution.
The system architectures that are most common in database applications are the
two-tier and three-tier models. In other words, the Java application either accesses
the database directly or as part of a middle tier server application. A new variation,
which might be called single tier , is the Java Data Objects (JDO) based application, in
which JDO supplies persistence, with no specific persistence code being written by
the Java programmer. Container managed persistence in Enterprise JavaBeans
Applications also abstracts the persistence code, though in a fundamentally different
way, and as part of a multi-tier architecture.
Java Data Objects
In Java, as in any other object-oriented language, the programmer is accustomed to
working primarily with objects. Relational databases, on the other hand, are
organized around smaller data items, which might be considered similar to object
attributes. For example, a customer object in Java might have a number of attributes
such as firstName and lastName, stored individually in separate columns in a
database record.
The JDO architecture supports the concept of transparent persistence , which is
intended to hide the details of the underlying persistence mechanism from the
application. The Java business logic is simply developed in the customary way. The
business logic classes are then enhanced at the byte-code level to generate a
persistence-capable version of the class. Almost all user-defined classes can be
made persistent in this way.
Once the business logic classes have been compiled and enhanced, the application
that uses the enhanced business classes can be developed. The persistence
management of the business objects is transparent. In other words, the application
developer never needs to fetch and store objects or their attributes at the JDBC/SQL
level.
Although a JDO application looks and behaves like a single-tier
application, the underlying persistence mechanism can be implemented
Note
Search WWH ::




Custom Search