Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8987785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:52:27+00:00 2026-06-15T21:52:27+00:00

I’m about to write a JPA based web application in Java and since it’s

  • 0

I’m about to write a JPA based web application in Java and since it’s my first time seriously working with persistent classes and databases in general, I would like to learn if I have to make specific considertions f.i. while designing the overall class structures like building it as flat as possible to keep the count of persistent classes low and the database structure simple. I really don’t expect long explanations but would like to get a short overview of general considerations which might not appear to be that obvious to one who is unexperienced with database applications.
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:52:29+00:00Added an answer on June 15, 2026 at 9:52 pm

    general considerations which might not appear to be that obvious to
    one who is unexperienced with database applications

    Using an ORM is superficially easy and transparent, but there are many small issues to consider:

    • Object identity. Understand the root mismatch that relational database work with rows and keys, while in the object world, each object has one identity. There various ways to handle identity correctly, or incorrectly.

    • Mapping Data. First understand how you map simple data types (string, number, URL, etc.). See and understand techniques to handle convertion problems (URL or string, byte or blob).

    • Mapping Relations. Understand how you map relations (uni- and bi-directional), how to maintain the invariants with proper encapsulation, the issue of “orphans” objects who lost their parent, and how to map several relations to the same class differently, how to load eagerly or lazily and the link with the “N+1” select issue.

    • Mapping Inheritance. Understand the mismatch between object, class, and tables. Understand how far you can support inheritance with ORM.

    • Working with Sessions. Understand working with sessions: when an object is attached or detached, what’s the impact on lazy loading, how to deal with optimistic locking, the link between transaction and session.

    There is an abundant literature on JPA and ORM in general. The list above is just what came to my mind.

    Ideally, ORM should not impose constraints on your design. However, my advice would be keep it flat and simple.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I have a small JavaScript validation script that validates inputs based on Regex. I
I'm interested in microtypography issues on the web. I want a tool to fix:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I don't have much knowledge about the IPv6 protocol, so sorry if the question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.