Re: A philosophical question about inserts



Stored Procedures are the ideal -for all the benefits mentioned above. But
in reality , some sort of Object method whereby the
user can dynamically SELECT the columnns can be more effective. A typical
example , might be an application that stores
matterials information , for example the airlines industry. In that
situation, you've potentially got hundreds of attributes that could be
assigned
to a given material, which then need to be selected from different
perspectives.

--

Jack Vamvas
___________________________________
Search IT jobs from multiple sources- http://www.ITjobfeed.com




"Mike Husler" <Michael.P.Husler@xxxxxxxx> wrote in message
news:fmiq44$tin$1@xxxxxxxxxxxxxxxxxxxxx
We have a SQL Server database that can accept data from several different
projects throughout our lab. Is it better to (1) let each developer
create their own prepared SQL statements for inserts or to (2) hide the
schema from them and have them call stored procedures or views to get the
data into the database?
So for example, in the 1st case, the developer's code (e.g. PERL w/
DBI/DBD) would prepare/execute:

INSERT INTO table (col1,col2,col3) VALUES (1,2,3)

and in the 2nd case they would prepare/execute:
EXEC sp_insertdata, @val1 = 1, @val = 2, @val3 = 3

.. and the stored procedure does the insert.

The main goal here is to isolate the developer from knowing the database
schema. Only the 'database team' knows the schema and then any changes
are done in one place (i.e. the view/stored procedure) instead of one or
many external applications.

In the 2nd case, the schema is invisible to him/her but if a column was
added to 'table', they would have to change their stored procedure call
all the same.

If there is there an easier way to do this please advise. Some of our
inserts are into tables of 100 or more columns (time-based data) and the
cadence can be sub-second.

Any help appreciated.

Michael Husler


.



Relevant Pages

  • Re: Problem with Stored Procedure that conatins several select statements
    ... If you test the stored procedures from the SQL Analyser, ... The Problem is that everytime I create a generated schema there is only ... one element in the response node called "Success" and not the two columns ... the final SELECT then the response elements are created as I expected. ...
    (microsoft.public.biztalk.general)
  • Re: SQL Best Practices Analyzer Rule: Use of Schema Qualified Tables/Views
    ... > How important is to specify the schame (dbo. ... > application may be improved by specifying schema names." ...
    (comp.databases.ms-sqlserver)
  • Re: One message should result into inserts into several sql-tables
    ... But I'll have to use several stored procedures it seems. ... Since there is a header-line structure ... (even without using transaction in the SP) ... You need to design you schema in the way you capture all the required data. ...
    (microsoft.public.biztalk.general)
  • Execute Immediate and bind variables
    ... I'm translated SQL Server stored procedures into Oracle. ... The schema name is passed into the stored procedure. ... We concatenate the ... Can I use bind variables in this ...
    (comp.databases.oracle.misc)
  • Re: Database Model - Class, objects and interaction
    ... I was just proving stored procedures can call views. ... stuff like security and logging. ... So given 100,000 users, you would create database accounts for each? ... Part of our system's integrity was its reliability, and reliability is often assisted by simplicity. ...
    (comp.object)