Skip to main content

Java and the Database (JDBC)

  • Chapter
  • First Online:
Foundational Java
  • 7761 Accesses

Abstract

The data in Java programs does not last beyond a single run of a program. Most applications require some more persistent storage of state than this, and in most cases we will use a database. While streaming data to and from a sequential file can be useful in some contexts, it does not allow the querying, performance, availability, and accessibility of database storage. Therefore, we need to know how to get data in and out of a database so we can use it in our applications. Although there are several different types of database available, including hierarchical, object-oriented, and XML, most current commercial databases are relational. The focus of this chapter is on how to bridge between the table schemas of a relational database and Java code using JDBC (Java Database Connectivity).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 74.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 99.00
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag London Limited

About this chapter

Cite this chapter

Parsons, D. (2012). Java and the Database (JDBC). In: Foundational Java. Springer, London. https://doi.org/10.1007/978-1-4471-2479-5_15

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-2479-5_15

  • Published:

  • Publisher Name: Springer, London

  • Print ISBN: 978-1-4471-2478-8

  • Online ISBN: 978-1-4471-2479-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics