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

  • SEARCH
  • Home
  • 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 8798695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:09:07+00:00 2026-06-14T00:09:07+00:00

I like to create two java applications with the same user information in my

  • 0

I like to create two java applications with the same user information in my DB, but some user related infos are just relevant for app A, others just for app B.

My question is, can I write the user class for A and ignore the fields for B and vice versa?

Or is the right approach to load fields lazy and leave the fields I’ll never used untouched?
Would that lead to larger objects in memory?

Or would it be better to store information redundantly and update in both tables/dbs if necessary?

Please tell me pros and cons or what could lead to errors.

I use eclipselink and postgres if this matters.

thx @Vikdor but your answer let more questions grow in my head 🙂

  1. So the main statement of your answer is, as long as I don’t violate the conditions of the table there is no problem right?

  2. Lets say at least one app, maybe both, are heavily used by a large amount of users.
    Would it be better to save information redundant to prevent performance issues?
    Or is it maybe a good idea to save A/B specific infos in separate object/table with a value that identifies the user like his e-mail, so that I have 3 DBs 1 for A with A-specific data, one for B with B-specific data and one for basic user information (mail, pw, username and so on)?

  • 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-14T00:09:08+00:00Added an answer on June 14, 2026 at 12:09 am

    As long as the applications are going to only read the information from the User table that is relevant to them, it is fine to define the entity with only those attributes that make sense for a given app.

    But, if you are going to create new user records through any of these applications, then it is required to define the entity with all the non-nullable attributes of user. Otherwise, the insertions would fail at the database layer.

    Regarding the size of objects in the memory, if your user table is quite large and if you don’t use most of the attributes and you only perform read operation, this might be a good optimization to have, to define the user entity with only required attributes.

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

Sidebar

Related Questions

I would like to create a multi-dimensional array with two variables but don't know
I have two java applications, one is web app and another is simple java
I'm gonna create two div tags with CSS that appear in the page like
I have two arrays that I create like this: public int GameBoard[][] = new
So I have two tables structured like so: CREATE TABLE #nodes(node int NOT NULL);
I would like to create a UIBarButtonItem on my iPhone application which has two
I'd like to create a function that calculates the distance between two pairs of
I have two models: Person and Address which I'd like to create in a
I'd like to create a form that includes fields from two separate models, along
I'm trying to create a two dimensional array like this... @transactions = {} @expenses.each

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.