Database Programming with Java
While the marriage of Java and database programming is beneficial to Java programmers, Java also helps database programmers. Specifically, Java provides database programmers with the following features they have traditionally lacked:
Easy object to relational mapping
Database independence
Distributed computing
If you are interested in taking a pure object approach to systems development, you may have run into the cold reality that most of the world runs on relational databases into which companies have often placed hefty investments. This leaves you trying to map C++ and Smalltalk objects to relational entities. Java provides an alternative to these two tools that frees you from the proprietary interfaces associated with database programming. With the “write once, compile once, run anywhere” power that JDBC offers you, Java’s database connectivity allows you to worry about the translation of relational data into objects instead of worrying about how you are getting that data.
A Java database application does not care what its database engine is. No matter how many times the database engine changes, the application itself need never change. In addition, a company can build a class library that maps its business objects to database entities in such a way that applications do not even know whether or not their objects are being stored in a database. Later in the book I discuss building a class library that allows you to map the data you retrieve through ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access