473,386 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

calling Philip Morris, errrrrr, Mr. Adamanche

i grab quotes now and again for use as footers to e-mail
here in CubeLand. found this one in the stash:

the logic exercised by the database to maintain referential
integrity is not free, but if the rdbms does not do
it, it gets done in the application, where it costs the
same if not more - just now the application becomes
"slower" versus the rdbms.
-- Blair Adamanche/2003

while i certainly agree, i've been looking, without success,
for some numbers that confirm the assertion. if Mr. A is
lurking, can you provide a reference?

thx,
btdb

Nov 12 '05 #1
3 1433
BobTheDatabaseBoy wrote:
i grab quotes now and again for use as footers to e-mail
here in CubeLand. found this one in the stash:

the logic exercised by the database to maintain referential
integrity is not free, but if the rdbms does not do
it, it gets done in the application, where it costs the
same if not more - just now the application becomes
"slower" versus the rdbms.
-- Blair Adamanche/2003

while i certainly agree, i've been looking, without success,
for some numbers that confirm the assertion. if Mr. A is
lurking, can you provide a reference?

thx,
btdb

That really doesn't require numbers, just horse sense.
Teh app sits on the client. Why make another network trip to confirm
soemthing that thr DBMS can confirm directly?
Also if more than one row is affected the DBMS can parallelize the effort.
In general the app is single threaded...

What soemtimes happes is that the App verifies check and RI "anyway" or
certain properties ar eenforced on a different plane.
In this case DB2 can be taught to trust the app using NOT ENFORCED
ENABLE QUERY OPTIMIZATION properties for check and RI constraints.

Cheers
Serge
Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2

Serge Rielau wrote:
BobTheDatabaseBoy wrote:
i grab quotes now and again for use as footers to e-mail
here in CubeLand. found this one in the stash:

the logic exercised by the database to maintain referential
integrity is not free, but if the rdbms does not do
it, it gets done in the application, where it costs the
same if not more - just now the application becomes
"slower" versus the rdbms.
-- Blair Adamanche/2003

while i certainly agree, i've been looking, without success,
for some numbers that confirm the assertion. if Mr. A is
lurking, can you provide a reference?

thx,
btdb
That really doesn't require numbers, just horse sense.
Teh app sits on the client. Why make another network trip to confirm
soemthing that thr DBMS can confirm directly?
Also if more than one row is affected the DBMS can parallelize the

effort. In general the app is single threaded...

What soemtimes happes is that the App verifies check and RI "anyway" or certain properties ar eenforced on a different plane.
In this case DB2 can be taught to trust the app using NOT ENFORCED
ENABLE QUERY OPTIMIZATION properties for check and RI constraints.

Cheers
Serge
Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab


the arguement i most often get, without numbers on either side, is
that the DB2 engine is an interpreter, while the COBOL code is fully
compiled, and thus "must" be faster. clearly, RI has to be faster
than app code. the question comes down to db code vs. app code for
check constraints, triggers, SP and the like. since, presumably, a
cycle is a cycle is a cycle, the closer to the metal the better. and
since the SPs are compiled through C, they should be just as close
to the metal as compiled COBOL. i have this recollection that some
COBOL compilers are now just C preprocessors. probably not on z/OS,
though.

it sure would make for a fascinating study. CubeLand does have more
of some horse stuff than horse sense.

thx,
btdb

Nov 12 '05 #3
BobTheDatabaseBoy wrote:
Serge Rielau wrote:
BobTheDatabaseBoy wrote:
i grab quotes now and again for use as footers to e-mail
here in CubeLand. found this one in the stash:

the logic exercised by the database to maintain referential
integrity is not free, but if the rdbms does not do
it, it gets done in the application, where it costs the
same if not more - just now the application becomes
"slower" versus the rdbms.
-- Blair Adamanche/2003

while i certainly agree, i've been looking, without success,
for some numbers that confirm the assertion. if Mr. A is
lurking, can you provide a reference?

thx,
btdb


That really doesn't require numbers, just horse sense.
Teh app sits on the client. Why make another network trip to confirm
soemthing that thr DBMS can confirm directly?
Also if more than one row is affected the DBMS can parallelize the


effort.
In general the app is single threaded...

What soemtimes happes is that the App verifies check and RI "anyway"


or
certain properties ar eenforced on a different plane.
In this case DB2 can be taught to trust the app using NOT ENFORCED
ENABLE QUERY OPTIMIZATION properties for check and RI constraints.

Cheers
Serge
Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

the arguement i most often get, without numbers on either side, is
that the DB2 engine is an interpreter, while the COBOL code is fully
compiled, and thus "must" be faster. clearly, RI has to be faster
than app code. the question comes down to db code vs. app code for
check constraints, triggers, SP and the like. since, presumably, a
cycle is a cycle is a cycle, the closer to the metal the better. and
since the SPs are compiled through C, they should be just as close
to the metal as compiled COBOL. i have this recollection that some
COBOL compilers are now just C preprocessors. probably not on z/OS,
though.

it sure would make for a fascinating study. CubeLand does have more
of some horse stuff than horse sense.

thx,
btdb

It is tru that computing an expression in COBOL or C will be faster that
doing so in SQL PL. Whiel DB2 for zOS SQL PL is cross compiled SQL PL in
DB2 for LUW is indeed interpreted.
The major problem here si not so much teh qualit of the compiler. It is
teh complexity of SQL semantics. E.g. three state logic, error handing,
etc. If all this baggage were added to C or Cobol that too woudl slow down.
Having said that. This may be an argument fro checking CHECK constraints
in the APP, but it sure isn't one for RI constraints because now we
are doing joins beween parents rows and children rows and that the DBMS
can definitely do better close to the iron than the App via cursors.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: googlegroups111 | last post by:
This is an EXCERPT from the story of the Philip Bartlett the Knight in Shining Armour from the days of hoary olde England, a story adapted by an author who shall remain nameless..... One day...
3
by: mdaetwyler | last post by:
Hi all I am trying to call a DB/2 v8.2 stored procedure from Perl DBI and am getting an error message telling me, that the routine could not be found in the library path. SQL0444N Routine...
2
by: Phil Matish | last post by:
I would like to know if the following is possible: I have a form and a subform. In the subform, there are records summarized. (For ex, instead of showing all 19 fields, I only show 3 to save...
4
by: Daisy | last post by:
What I want to do is this: Object1 list = (Object1)this.MyMethod(typeOf(Object1), "Object1", "string1", "string2"); and Object2 list = (Object2)this.MyMethod(typeOf(Object2), "Object2",...
3
by: Scott Schade | last post by:
I have a form onto which I add a control during execution. The control is a control that I wrote. The control has a number of controls on it. I would like to click on a button on the control and...
4
by: Jan Schoenrock | last post by:
Hello, I have a solution with mixed Code (VB.net and C#-Projects). When I'm trying to build an instance of a C#-Class in a VB.Net-Project there will not be a problem. But if I further try to hand...
6
by: priyanka | last post by:
Hi there, I want to learn about the calling convention that is adopted by the gcc compiler for C programs ? I need to learn about it immidiately for finding out the parameters passed to...
4
by: Alchemist | last post by:
I am using Python 2.4 and Postgresql 8.2 database server. On the database I have created a stored function, example, CREATE OR REPLACE FUNCTION calculateaverage() I created a new python script...
9
by: Catherine Moroney | last post by:
I have one script (Match1) that calls a Fortran executable as a sub-process, and I want to write another script (Match4) that spawns off several instances of Match1 in parallel and then waits...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.