p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 2.0 and Databases (http://p2p.wrox.com/forumdisplay.php?f=276)
-   -   Stored Procedure versus Data Access Logic Componen (http://p2p.wrox.com/showthread.php?t=69030)

AspNetGuy June 26th, 2008 05:25 PM

Stored Procedure versus Data Access Logic Componen
I have a form that contains 65 fields. The fields contain data related to the person applying to go on a trip, his parent, his church, and his abilities. I have created tables for Applicants, Parents, Churches and Abilities.

Next I created Stored procs for INSERT, UPDATE, DELETE and SELECT for each of the tables.

Before INSERTing the Applicant record, the other records must first be INSERTed. I have three directions I could go in.

1) Feed all of the data necessary to INSERT all of the records to the InsertApplicant stored proc and let it invoke the other stored procs (InsertParent, InsertChurch, InsertAbilities).

2) Create another stored proc and feed it all of the data and relieve the InsertApplicant stored proc of all of the parameters. Then have his new stored proc invoke the other stored procs (InsertApplicant, InsertParent, InsertChurch, InsertAbilities).

3) Create a C# Data Access Logic class that consumes all of the parameters and invokes each of the stored procs for the INSERTs.

What are the advantages and disadvantages of the three methods and do you have a better idea.

Thanks in advance for any guidance.

All times are GMT -4. The time now is 07:56 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.