One of the primary reasons you need to implement proper SQL code is network access. SQL database applications are inherently distributed between two or more computers. Currently, it is pretty rare to have a single user SQL database where the user works on the same computer as the data is located on. While this may not always be true (with SQL Server 2000 having its Microsoft Data Engine and CE versions to enable single user systems) the focus of our book will be on multi-user systems that involve two or more computers. However, all examples in the book can be implemented and tested on any edition of SQL Server.
To implement the looping example in the previous section, every row in the innerTable and outerTable would have to be retrieved over a network connection to the client. If the table was large, this would likely be a very slow operation, even on a relatively fast network.
The efficiency gained by utilizing the processor resources of the server allows multiple users to access the data quicker than if the work was performed on the client machines, not to mention that the amount of data that must be shuffled across the network will be smaller, minimizing the effect of network access speed. Although well designed systems will centralize processing, you often find that poorly performing applications are attempting to do the work that the database engine was designed to do.
To implement the looping example in the previous section, every row in the innerTable and outerTable would have to be retrieved over a network connection to the client. If the table was large, this would likely be a very slow operation, even on a relatively fast network.
The efficiency gained by utilizing the processor resources of the server allows multiple users to access the data quicker than if the work was performed on the client machines, not to mention that the amount of data that must be shuffled across the network will be smaller, minimizing the effect of network access speed. Although well designed systems will centralize processing, you often find that poorly performing applications are attempting to do the work that the database engine was designed to do.
No comments:
Post a Comment