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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:53:58+00:00 2026-05-28T02:53:58+00:00

When we developers write data access code what should we really worry about if

  • 0

When we developers write data access code what should we really worry about if the application should scale well and handle the load / Hits.

Given this simple problem , how would you solve it in scalable manner.

1.ProjectResource is a Class ( Encapsulating resources assigned to a Project)

2.Each resource assigned to Project is User Class

3.Each User in the Project also has ReportingHead and ProjectManager who are also instance of User

4.Finally there is a Project class containing project details

Legend of classes used

  • User

  • Project

  • ProjectResource

Table Diagram

  1. ProjectResource

    • ResourceId

    • ProjectId

    • UserId

    • ReportingHead

    • ProjectManager

Class Diagram

  1. ProjectResource

    • ResourceId : String / Guid

    • Project : Project

    • User : User

    • ReportingHead : User

    • ProjectManager : User

note:

All the user information is stored in the User table

All the Project information is stored in the project table

Here’s the Problem

When the application requests for Resource In a Project operations below are followed

  • First Get the Records for the Project

  • Get the UserId , make the request(using Users DAL) to get the user instance

  • Get the ProjectId, make the request(using Projects DAL) to get the project information

  • Finally assign Users and Project to instance of ProjectResource

clearly you can see 3 Db Calls are made here for populating single ProjectResource but the concerns and who manages the objects are clearly defined. This is the way i have planned to , since there is also connection pooling available in Sql Server & ADO.net

There is also another way where all the details are retrieved in single hit using Table Inner Joins and then Populating.

Which way should i really be taking and Why?

Extras:

.NET 2.0,ASP.net 2.0,C#,Sql Server 2005,DB on same machine hosting application.

  • 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-05-28T02:53:58+00:00Added an answer on May 28, 2026 at 2:53 am

    For best performance and scalability, you should minimize the number of round-trips to the DB. To prove that to yourself, just run some benchmarks; it becomes clear very quickly.

    One approach to a single round-trip is to use joins. Another is to return multiple result sets. The latter can be helpful in eliminating possible duplicate data.

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

Sidebar

Related Questions

My application has a plug-in model that allows third-party developers to write assemblies that
I'm writing a program that allows developers to write AddIn's for it and I'd
I'm trying to put together a fun 'contest' of sorts. Developers will write a
So right now I've developed an application that I'm trying to write an API
I'm faced with needing access for reporting to some data that lives in Oracle
I need to be able to handle data that can look like: set setting1
I am planning to implement a small-scale data acquisition system on an RTOS platform.
I want to access folder where i can read write and delete files in
I developed an application (100% local, no access to servers) using SQL Server Compact
I need to get write permissions to the lib directory of my application (i.e.

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.