Click here to Skip to main content
15,895,538 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am planning for a project that deals with all kinds of tax for multiple companies and users. I'll be using C# (winforms), layered architecture (UI, DAL, BLL and WebService) and SQL Server.

Application will be used by multiple users, where a single user will deal with hundreds (maximum thousands) records at a time, which will have to be loaded, updated and set.

I want your help in deciding if I have to load my data into objects on program's start-up or something, or go with loading data on demand. I'm not sure how to decide this, and in case data should be pre-loaded which is the best approach to use since data will have to be saved back to DB.

I know I don't have any code to post here yet, forgive me but I'm still in the planning phase so I'm asking a theoretical question.
Posted
Updated 7-Jan-15 0:18am
v2

You gave almost no information on how your application will be used - and that's the key for such a decision you ask for here...
In any case I would not advise to pre-load data. If you have huge data it will demand huge memory to contain it, and that should be a waste. If your data is small it will not be a performance issue to load them on demand only...
What you may consider is using SQL caching to improve performance, however in a simple CRUD application that move a few thousands of records maximum in one step you will need nothing, only well designed DAL...
 
Share this answer
 
Comments
saleem_deek 7-Jan-15 6:20am    
Sorry Kornfeld, I updated my question a little bit, I hope it clarified it. If not, please advise me what info to include in the question. Thank you.
I agree with Kornfeld Eliyahu Peter - don't pre-load, load data as you need it.

I'd be a little concerned if a user was dealing with hundreds of records "at a time" in a tax system but I think that is just me misunderstanding your requirements. However it sounds like you will definitely need to consider transactional processing ... e.g. see this CP article SQL Server Transactions and Error Handling[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900