Click here to Skip to main content
15,906,455 members
Please Sign up or sign in to vote.
0.00/5 (No votes)

I am new to web development. Read about n tier architecture and have a very basic doubt. My project uses SQL Server with stored procedures and sql functions to access the data. The code for accessing these stored procedures and functions and the business logic are combined into a single dll. The aspx code behind calls the dll. Is this a 3 tier or 2 tier architecture? Since we are using stored procedures , what would be the advantages of having a separate DB access layer. Will having a separate DB access layer improve the performance?


The senario you explained is of 2-tier architecture.

If the business logic is separated then it is 3-tier one.

"what would be the advantages of having a separate DB access layer"

It will surely make your application reusable and very much simple for others who will work on your project.

Sometimes you require the same procedure to call at different pages, for that you can directly go to that layer and search for that procedure and reuse that.

Suppose you need to do certain changes to the coding in the procedure or you added new parameter to the procedure, then you will just have to add some codings to the existing function calling the procedure in that layer;

But suppose if you don't have the layer, it will be difficult for you to search everywhere in the project whereever the procedure is used and need to do the changes in coding at many places.

So, it simply lessens your future modifications and adds value to maintainance...
Share this answer
Member 8588833 23-Jan-12 4:18am    
Is there a security risk with the above architecture?
There is no risk, instead it adds more security in terms of layers.
Design pattern can't improve the performance.But it's stronger.
Share this answer
Sergey Alexandrovich Kryukov 23-Jan-12 3:16am    

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