Java and Relational Databases
Since Java is an object-oriented language, it does not manage data as a relational database does. Data is modeled as objects in Java application design. These objects contain attributes (also referred to as members), which represent the details of the object. From an object design perspective, an object is not storedit persists. Its life extends over multiple invocations of the application. These objects are manipulated using a procedural language with syntax similar to the C programming language.
All of this differs markedly from relational databases, which represent data with tables and columns and manipulate the data using the non-procedural SQL. What we are left with is an impedance mismatch between the object-oriented model of Java and the relational model of relational databases. Ultimately, we must reconcile this difference with our class design. This is a process known as object-relational (OR) mapping and can be done manually by applying certain design patterns, as we do later in this text, or can use various OR-mapping tools (for example, TopLink - www.objectpeople.com, CocoBase - www.thoughtinc.com).