Connecting to SQL Databases Using JDBC

Managing information means performing operations such as storing, modifying, removing, sorting, arranging, linking, and matching data in a data store. Database management systems provide the means to perform these operations and relational databases are the most common type of data store used with web applications.

This chapter starts by briefly discussing the fundamental Java technology for persistence, Java Database Connectivity (JDBC). We will learn how to connect and how to consume data from a relational database using connection pools and SQL queries. We will also describe the concept of a data repository, a way of encapsulating persistence implementation details.

We will develop a very simple web UI that lists data from a database. The purpose of the example is to show you the very fundamentals of database connectivity. Chapter 6, Connecting to SQL Databases Using ORM Frameworks, will focus on more advanced database operations with basic data binding.

This chapter covers the following topics:

  • JDBC technology
  • JDBC drivers
  • Connection pools
  • SQL query execution
  • Data repositories
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset