sql - Should stored procedures check for potential issues when executing? -


I have explained this question a bit :)

I write a bunch of stored procedures I am writing a new product they have been written by developers called by C # application, which I have been following the same technical imagery. I can not go into the real technique imagination, so I'll give a closer enough example:

In the sample of technology, we have to store the file data in the database with some proprietary zip files, each within the zip To store file names and locations (for example, a database for each zip file)

Now, you can say that in this Tech Speak, to do "Operation A" , Hum Steps should be done:

1: Calculate the requirements of the file to be added

2: Get a list of zip files and their database connection string ( Call stored proc "GetZips")

2: Search for a suitable location within the zip file to store the file (call "GetSuitableFileLocation" procured call against each database connection until the appropriate database is received)

3: In step 2, you have to To add a file, a start / end point will be provided within the zip. Pass these values ​​into the "Allocation Location" file, then add your file to Zip.

OK - the question is, should the "AlloclonationToFile" specify start / end points again "free", and if not, raise exceptions?

There was little discussion about this in this office, and I believe that it should be examined and extended, others believe that it should not be

Can I ask for some valuable news? Generally, it is better to be as safe as possible. A calling code should not be dependent on external code.

(SPS is of the external type) The idea is that you can not predict what will happen in the future. Newcomers come to the company ... SPS is given to the other team and likewise ...

Individually, it is true that after B (A) right there is no guarantee gives. For any reason it can not be considered impossible to change

Decision making decision on a team based on "We are going to maintain it, there is no problem" Because they can be removed, the company can sell the product and in the same way.

P> Checking my suggestion is to profile the code, and if there is really an obstacle to removing it, but write it somewhere that it can happen !.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -