Solutions : Site Management : Database Maintenance
Database Maintenance
Description
Database Maintenance provides a web based system to perform typical database maintenance functions. Designed for both experts and those unfamiliar with working with databases allowing webmasters with very little database knowledge to perform data management and administrative functions via a web interface.
Supports database creation, table creation and modification, data inserts and updates, as well as migration of flat file data sources to SQL RDBMS (Standard Query Language Relational Database Management Systems). Database Maintenance uses the Item Information Dataset (IID) to manage a website's database. Updates are made to the IID, then uploaded to the web server, and with a few simple clicks Database Maintenance does the work for you.
Support for massive live updates eliminates suspending a website function for database maintenance and postponing updates to off-peak time.
Web Server Requirements:
- Operating Systems Supported: Unix, Linux, Macintosh OS X® and Windows®
- HTTP 1.x with CGI (Common Gateway Interface) PERL 5.x (check with your ISP or Server Administrator; this requirement is typically supported on most systems)
- A supported RDBMS, PERL DBI module and PERL DBD module must be pre-installed and configured.
Database Maintenance
Installation and Usage
FILENAME: dm.html
PURPOSE: Describes Database Maintenance dependencies, requirements, installation and usage.
DEPENDENCIES:
cm.pl - Configuration Management configuration and common logic modules (see: cm.html)
jhzcs.pl - JHZ-CS configuration and common logic modules (see: jhzcs.html)
IID (Item Information Dataset)
An RDBMS SQL database installed and configured
REQUIREMENTS:
Logic Modules
dm.pl - common configuration and logic module
PACKING (PARTS) LIST
| PACKING LIST PRODUCT ID: DM |
|||
|---|---|---|---|
| COMPONENT | TYPE | SIZE | AUTH* |
| cgi-bin/cm/cm.incl | TEXT | 5198 | 700 |
| cgi-bin/cm/cm.pl | TEXT | 1399 | 750 |
| cgi-bin/cm/dm/alter.cgi | TEXT | 12128 | 750 |
| cgi-bin/cm/dm/create.cgi | TEXT | 9875 | 750 |
| cgi-bin/cm/dm/dm.cgi | TEXT | 15754 | 750 |
| cgi-bin/cm/dm/dm.incl | TEXT | 14762 | 700 |
| cgi-bin/cm/dm/dm.pl | TEXT | 4735 | 750 |
| cgi-bin/cm/dm/dropdata.cgi | TEXT | 4414 | 750 |
| cgi-bin/cm/dm/droptable.cgi | TEXT | 4089 | 750 |
| cgi-bin/cm/dm/init.cgi | TEXT | 8959 | 750 |
| cgi-bin/cm/dm/inspect.cgi | TEXT | 5286 | 750 |
| cgi-bin/cm/dm/redefine.cgi | TEXT | 5413 | 750 |
| cgi-bin/cm/dm/select.cgi | TEXT | 9507 | 750 |
| cgi-bin/cm/dm/update.cgi | TEXT | 27532 | 750 |
| cgi-bin/cm/dm/view.cgi | TEXT | 3605 | 750 |
| cgi-bin/geog.pl | TEXT | 11750 | 750 |
| cgi-bin/jhzcs.pl | TEXT | 47225 | 750 |
| cgi-bin/license.incl | TEXT | 7565 | 700 |
| images/JHZCS.gif | BINARY | 745 | 750 |
| logs/errorlog.txt | TEXT | 91 | 750 |
|
*AUTH - Authorization/permissions octal equilvalents where: 7=RWX, 6=RW, 5=RX, 4=R (R=Read W=Write X=Executable) 1 char indicates Octal number 2 char Owner 3 char Group 4 char All Others |
|||
INSTALLATION:
It is strongly recommended that you read the entire installation process steps prior to performing any installations. Each solution has specific instruction that must be followed precisely.
The Installation Process
The installation process follows this order:
- Download solution to PC development platform and expand installation package (use any standard archive application such as WinZip®, StuffIt Expander® or TAR command)
- Modify configuration settings
- Upload to server
- Set access authorization permissions
- Test
- Customize Templates
- Test
Modify Logic Components
Modify all logic components "*.cgi" and "*.pl" logic modules as follows:
- first line of code (#!) correctly points to the PERL executable on the server (use command "which perl" or consult your server administrator)
- all "requires" statements contained in all "*.cgi" and "*.pl" logic modules must use absolute directory paths (beginning with a forward slash "/")
CONFIGURATION SETTINGS:
IMPORTANT! There are specific installation and configuration instructions contained in "cm.html" pertaining to "cm.pl" that must be successfully completed in order to permit this product to successfully perform its functions.
Locate the following line of code shown below in "dm.pl" and modify as described.
require "/home/cust/yourdomainname/www/cgi-bin/cm/cm.pl";
Change the content between quotes in the "require" statement "/home/cust/yourdomainname/www/cgi-bin/cm/cm.pl" to correctly point to the absolute path of "cm.pl" on the web server.
Locate the following section of code in "dm.pl" and modify as described below:
############################################################
#
# CONFIGURATION SECTION - START
#
$debug = 1;
$DBMcgidir = $cgibin_base."cm/dm";
# PLATFORM
# examples:
# Windows use "DOS"
# UNIX/Linux/MacOSX use "UNIX"
$platform = "UNIX";
# PLATFORM SPECIFIC DRIECTORY LIST COMMAND
# examples:
# DOS command is "dir"
# UNIX/Linux/MacOSX command is "ls"
$platformdirlistcmd = "ls ";
# PROTECTED DATA ITEMS
$DONT_UPDATE{customer_info} = 1;
$DONT_UPDATE{customer_hist} = 1;
$DONT_UPDATE{tracking} = 1;
$DONT_ALTER{customer_info} = 1;
$DONT_ALTER{customer_hist} = 1;
$DONT_DROP{customer_info} = 1;
$DONT_DROP{customer_hist} = 1;
$DONT_DROP{tracking} = 1;
$DONT_DELETEDATA{customer_info} = 1;
$DONT_DELETEDATA{customer_hist} = 1;
$DONT_DELETEDATA{tracking} = 1;
#
# CONFIGURATION SECTION - END
#
############################################################
-
Comment the following line:
$debug = 1;
using the PERL comment character # as follows:#$debug = 1;
- If not using the default install locations, change the content between quotes in value assigned to "$DBMcgidir" to correctly point to the subdirectory path relative to "$cgibin_base" defined in "jhzcs.pl" where "dm.cgi" is to be installed.
- Change the value between quotes assigned to "$platform" to reflect the web server operating system; see embedded instructions.
- Change the value between quotes assigned to "$platformdirlistcmd" to reflect the web server operating system command for displaying a directory list; see embedded instructions.
-
The items contained under
# PROTECTED DATA ITEMS
reflect database tables that are dynamically generated and are not to be modifiable using the DB Maintenance functions. These items should not be changed unless otherwise instructed by JHZ-CS.
Uploading to Web Server
All dependent and required components must be installed and successfully configured. All components, with the excpetion of images, must be FTP uploaded as TEXT. Images must be FTP uploaded as BINARY.
USAGE:
After having successfully completed the installation instructions above, DB Maintenance should be ready for use.
Invoke DB Maintenance by specifying its URL using your web browser.
http://www.yourdomain.com/cgi-bin/cm/dm/dm.cgi
A brief description of each function and its commands is displayed when DB Maintenance starts up. The available functions are listed at the top of the page. Whena function is clicked the function's commands are displayed in the left column. When a command is clicked the initiation page for that command is displayed. Follow the instructions provided on each page.
The first time you run DB Maintenance it will be necessary to establish the database parameters and define the default database tables. Use the Database function's Initialize command to perform this operation. Following the instructions provided on the Initialize command page.
To use the other functions of DB Maintenance, view the various function and command descriptions displayed while running DB Maintenance.
FAQs
Do I upload my modified IID files as Text or Binary?
Upload all IID files as Text.
Can I store image files in my database?
Yes, however, it is recommended that you store URL references to the images instead and store the image files external to the database. Note: not all RDBMS databases support storage of images.
Can I migrate my MS Access data using Database Maintenance?
Yes. Export the data into CSV or TAB delimited flat file format, then move the files into the IID location.
Can I delete data columns from my tables?
No. To remove an existing data column, export the data using Database Maintenance to the IID files, remove the desired data column, then delete the table and recreate it using the modified IID files.
Can I add new data columns?
Yes. Simply add the new data column to the IID, then use the Database Maintenance Update function.
JHZ-CS Solutions are distributed exclusively under terms and conditions of the JHZ-CS Software License Agreement.
