Section 2.12. SQL Statements Mirror Business Logic


2.12. SQL Statements Mirror Business Logic

Most database systems provide monitoring facilities that allow you to check statements currently being executed , as well as to monitor how many times they are executed. At the same time, you should have an idea of how many "business units" are being processedactivities such as orders or claims to be processed, customers to be billed, or anything else that makes sense to the business managers. You should review whether there is a reasonable (not absolutely precise) correlation between the two classes of activities. In other words, for a given number of customers, is the same number of activities being initiated against the database? If a query against the customers table is executed 20 times more than the number of customers being processed at the same time, it is a certainty that there is a problem somewhere. This situation would suggest that instead of going once to the table to find required information, repeated (and superfluous) visits are being made to the same rows in the same table.

Check that your database activity is reasonably consistent with the business requirements currently being addressed.




The Art of SQL
The Art of SQL
ISBN: 0596008945
EAN: 2147483647
Year: N/A
Pages: 143

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net