Helping ordinary people create extraordinary websites!
$1 CPM Advertising For A Limited Time Only
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

A Flexible Method of Storing Control Data

By Tony Marston
2006-08-29


Introduction

Where an application requires certain values at runtime, and where these values may be changed at irregular intervals, it is common practice to hold these on a database record rather than having them hard-coded into any program. This means that should any of these values ever change it is a simple matter of updating the database rather than changing, compiling and releasing individual program modules. This can be a problem, of course, if one of the modules is missed out.

The traditional approach is to have a single control record containing a separate field for each item of data. However, this has the following disadvantages:
  • It can result in a very large record structure, which could be a problem as most database engines have a limit to the number of columns (fields) in a table.
  • Adding or removing items on the control record requires a change to the physical database structure. All components which reference this structure would then have to be recompiled.
  • Any component which updates any control data will have to lock the entire record. This may cause delays to other components which try to update the same record at the same time.


Tutorial Pages:
» Introduction
» A flexible approach
» Implementation
» From database to screen
» From screen to database
» Summary


 | Bookmark
Related Tutorials:
» Installing MySQL on Windows
» Implementing High Availability in MySQL
» Stored Procedures are EVIL
» MySQL Database Handling in PHP
» Exploring MySQL CURDATE and NOW. The Same But Different.
» Creating a PostgreSQL and MySQL driver

Ask A Question
characters left.