Databases


Almost all Web applications require extensive use of a database. Web applications and services tend to rely heavily on gathering data from a database and presenting it to the user . Databases represent an entire field of study, which is beyond the scope of this book, but we present some tips and tricks in this section that can really help you get the most out of your Web application.

Picking the right database and database access story can make a huge difference in the performance of your application. First, you should gather trial developer databases from different vendors and try them out in your production environment (or a simulation of your production environment) to get a feel for the performance of each database.

Investigate through articles, benchmarks, and experimentation which data access story is going to be best. There are many factors here, but foremost are performance and ease of use. Different database versions can easily see 10 percent or 20 percent changes in comparative performance of data access types. Older databases might provide very efficient ODBC communication, newer databases might be better accessed through OLE DB, or you may need the productivity of ADO despite the performance hit.

The database might be one of the most expensive pieces of your application. It may also be one of the easiest ways to improve performance, so a 20 percent performance improvement is usually going to be worth an extra $10,000.00 or $20,000.00 investment (be it in database hardware or software) on the server.

Once youve picked the right data access story for your application, the next step is to make sure that you make good use of your database. Modern databases provide extensive functionality, and they provide this functionality in a very efficient manner. What sorts of functionality should you take advantage of?

  • Transactions: Although COM+ provides great transactions for the middle tier , transactions on the database are best handled by the databases own transaction facility.

  • Stored procedures: Stored procedures are a great mechanism for accessing your database. Your database probably optimizes data to make your stored procedures efficient, and you limit your network bandwidth usage by calling functions (instead of sending long SQL statements). On top of all this, you can easily debug and maintain stored procedures, which makes working with them far easier than hard-coded strings in your application.

  • Clustering and load balancing: Modern database servers usually provide many of the functions required to use them in large server farms. Good examples are clustering and load balancing technologies, which are often provided by the databases themselves or via auxiliary tools.

If youre going to spend a lot of time in the database, then this is a good place to look for making performance improvements in your application.




ATL Server. High Performance C++ on. NET
Observing the User Experience: A Practitioners Guide to User Research
ISBN: B006Z372QQ
EAN: 2147483647
Year: 2002
Pages: 181

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