The Database
The database is the heart of any enterprise system. The shared business objects that make up an enterprise need some way to make sure they are saved across time. The database provides that storage mechanism. Any language that is going to claim to be an enterprise language therefore needs to have strong, reliable database connectivity.
How Java Interacts with a Database
Several important database concepts form the core of this book’s discussion. This book assumes some basic familiarity with Java and databases. You should have a basic understanding of SQL and transaction management. Building on this foundation, we will discuss JDBC and how it can be used to execute SQL against any potential database engine.
SQL
The Java database API, JDBC, requires that the database being used
support ANSI SQL2 as the query language. The SQL language itself is worthy of a tiny
mini-industry within the publishing field, so covering it is well
beyond the scope of this book.[1] The SQL in this book,
however, stays away from the more complex areas of the language and
instead sticks with basic DELETE,
INSERT, SELECT, and
UPDATE statements. For a short overview of SQL,
check out Chapter 2.
The only additional level of complexity I use consists of stored procedures in the later chapters. Stored procedures are precompiled SQL stored on the database server and executed by naming the procedure and passing parameters to it. In other words, a stored procedure is much like a database server function. ...
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