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 8299229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:04:50+00:00 2026-06-08T16:04:50+00:00

I try to abstract my specific domain problem to a banking account, assume the

  • 0

I try to abstract my specific domain problem to a banking account, assume the following situation:

  • I have an Banking Login of a certain customer.
  • Each Customer can have multiple banking accounts which belong to the same login.
  • Each banking account can have thousands of transactions.

I designed the class structure as folows (simplified):

public class Login
{
    private List<Account> _bankingAccounts;
    ....more fields, ctor, getters, setters...
}

public class Account
{
   private List<Transaction> _transactions;
    ....more fields, ctor, getters, setters...
}

public class Transaction
{
   String _comment;
    ....more fields, ctor, getters, setters...
}

Well, but If I have let’s say 20 Account and each has 10000 transaction and I load the entire model from the database there would be a large amount of memory, even I don’t know if the customers needs all these transactions.

I thought to build a more simplified model like this:

public class Login
{
    private List<SimpleAccount> _bankingAccounts;
    ....more fields, ctor, getters, setters...
}

public class SimpleAccount
{
    ....more fields, ctor, getters, setters...
}

public class Account
{
   private List<Transaction> _transactions;
    ....more fields, ctor, getters, setters...
}

public class Transaction
{
   String _comment;
    ....more fields, ctor, getters, setters...
}

Then I would load a account model with simplified Account (which does not contain all the transaction) and only i the user requests to see the transaction of a specific account I will load this single entire Account object.

Would that way be ok? Is there a better approach?

  • 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-08T16:04:52+00:00Added an answer on June 8, 2026 at 4:04 pm

    From your question I found that your basic need is ORM because (if I am not wrong) you want to two things
    domain model mapping
    but
    with lazzy loading
    By lazy loading We mean that relational objects only load when we try to access them.Simply When you want to see a specific student data that you never want to load automatically all courses of a student(which could be a collection) unless to don’t want to see his/her courses(in case a student and courses has a relation).
    So for your problem you should use ORM which will provide you both solutions 🙂
    Here is the list of some ORM provided by .Net

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

Sidebar

Related Questions

I try to override my parametrized method in scala, I have an abstract class
i have the following problem. The 1st step is to implement a program, which
I have the following classes: abstract class DTO{ } class SubscriptionDTO extends DTO {
I have the following classes: public abstract class CommandBase { ... Stuff } public
I have this in my base class: protected abstract XmlDocument CreateRequestXML(); I try to
I try to achive the opposite of here . I have an abstract class,
Try executing the following in JavaScript: parseInt('01'); //equals 1 parseInt('02'); //equals 2 parseInt('03'); //equals
Lets supose that I have 3 abstract super classes: SuperA , SuperB and SuperC
At the moment I am experiencing a very frustrating problem. I will try to
I have an abstract parent class(Product) and two child classes that inherit from it(Book,Software).

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.