Click here to Skip to main content
16,004,653 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all I am building an windows application which makes use of sql server express edition. The scenario is sql server express will not be running on dedicated servers but on regular desktops(may be a dedicated desktop).

should I use stored procedures in this scenario or should I offload the stored proc related tasks to the Business logic layer which runs on the client machine which makes the call to the sql express.

when can I expect good performance
while using sp or while running the code from the BL layer.
Posted

If you don't use stored procs, it shouldn't affect performance, but if you don't, then at least write a data layer to hold and abstract out all your database access.
 
Share this answer
 
If you are running SQL Server on the client machine, I recommend you use SQL Server CE, as it does not require an installation beyond the .Net Framework. Since SQL Server CE does not support stored procedures, I would then not use them.

If, however, you really do plan on using SQL Server Express, then I'd say there are few disadvantages to using stored procedures, so you might as well use them. For one, you get optimizations (e.g., cached query plans) that are sometimes not there with plain queries. However, if performance is not a much of a concern, then plain queries may be just fine.

Naturally, you should write a data access layer around your SP's or your queries... either way, the caller of your data access layer should not be aware of the underlying SQL.
 
Share this answer
 

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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