Skip to main content

Adding a Database with JPA

  • Chapter
  • First Online:
Beginning Jakarta EE
  • 1022 Accesses

Abstract

JPA (Java Persistence API) is the dedicated technology for accessing relational databases from inside Jakarta EE. Its aim is to provide a bridge between SQL tables and Java objects. This is a task that is far from simple for other than the most basic data schemes. The reason for this is that in relational database schemes there are associations between different tables: one row from one table may refer to one or many rows from another table or the other way around, and there could be references spanning three or more tables. And think of column-type conversions—a database may have different ideas about numbers, Boolean indicators, dates, and times compared to Java, and also null values in database tables require increased attention if used in table references and while converting to Java values.

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 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight 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

© 2019 Peter Späth

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Späth, P. (2019). Adding a Database with JPA. In: Beginning Jakarta EE. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5079-2_6

Download citation

Publish with us

Policies and ethics