The Database console is meant for web-masters for creating and maintaining small to medium MYSQL databases for web sites. It is a fully menu driven program with multiple screens for most options. It provides the basic functions in a user-friendly manner so that the job of database maintenance can even be delegated to persons not initiated in SQL. Each function screen provides adequate instructions and where necessary, warnings, for safe operation. In addition, this manual gives detailed instructions for each function for reference.
This document is accessible from each page of the application for ready reference.
For explanation of SQL terms used in the document please refer to MySQL Reference Manual for version 3.23.25-beta available at MySQL web site. This console is, however, backward compatible for use in older versions of MYSQL except certain specific functions, for which, notes are provided in respective screens.
While this particular version is meant for MYSQL databases, it can be quickly adopted for other types of databases. Please contact the web-master.
The program is written in PHP 3.x and, therefore, needs PHP support in UNIX or WINDOWS. If you have PHP under WINDOWS, you can use this nifty little application to manage all your databases on the remote server. The program in its current stage is only 45 KB in size.
The built-in error tracker prints out relevant MySQL Error Code and Error messages in case of a run-time error. In case of access errors please check access information e.g. Log-in details, name of database, table or fields etc.
The application being Browser based you have the advantage of always using the Browser BACK button to go back to make changes in the previous screen in case you notice a mistake in the confirmation screen or even to abort the current operation. A word of caution – Always exit the browser after using this application so that no one can use the browser BACK button to access your database.
Tips : For inputting details like table name, field name etc you can cut-n-paste from the list on the screen to avoid typing error. Most functions lists such details so that you don't have to remember them.
You can log on to your database anywhere on the web by providing the MySQL Server Name, your authentication information e.g. User Name and Password and the name of the Database.
This assumes that you already have a database with a given name, which most Host Servers provide. In case, you have the freedom of creating your own database, you will have to do so before using this console. This facility will be included in future versions. You can create the database at the mysql prompt by issuing the command CREATE DATABASE db_name. Once you create the database or the database exists, the console takes over from there on.
Operating this function assumes a basic knowledge about the SQL table structure and types of fields etc. For more information consult Section 7 MySQL Language Reference of MySQL Reference Manual for version 3.23.25-beta available at MySQL.
Step1
The first screen of this function asks the 'Number of Fields' you want the table to have. Input the number of fields and press 'PROCEED'.
Step2
This opens up a grid with as many rows as the number of fields entered in Step 1. Enter the name of the field, the type of the field from the drop down selection and the following special inputs as appropriate. Though this console does not provide for all the possible field types available for MySQL, it provides the basic types in the three categories: numeric types, date and time types, and string (character) types. It also provides for the type ENUM, which is an enumeration field that can have only one value, chosen from a list of values 'value1', 'value2' etc. or NULL. The AUTO INCREMENT type is useful for creating a field to generate unique ID numbers for entries which is very handy for certain web based applications.
Note: The types have been limited to the above types to keep the application simple for average users. It can be extended for special applications. Please contact the web-master for extended facility.
Maximum Field Length :- Relevant only for the Character (VARCHAR), Integer and Numeric fields. NULL :- Select only if the type of field accepts a NULL value and you intend the field to accept a NULL value. The NULL value means 'no data' and is different from values such as 0 for numeric types or the empty string for string types. Primary Key :- It is good order to have a primary key though it is not a must. If you do not choose a primary key and an application asks for it, MySQL will return the first UNIQUE key that doesn't have a NULL. There can be only one Primary Key. If multiple keys are chosen only the first will be recognised and rest ignored. If the first field is "Auto-increment" no other field can be Primary Key
Note: Note the following limitations in size – Varchar – 255 ch, Text – 65535 ch.
When ready press 'PROCEED'.
Step3
The next screen presents a table with your selected details of the fields and asks you to confirm. If you want changes you can always use the Browser BACK button to go back to make corrections. When satisfied press 'CONFIRM' and the table will be created for you.
This function will just list the names of all the tables in the database. In case you have forgotten the name of the table you can find out from here.
This function lets you add one record at a time to the Table. The entry form lists all the fields with Field Name, Field Type, Max Length etc for your convenience.
Note: 1. Auto-increment field is shown as INTEGER and ENUM field is shown as STRING. So you will have to remember which are which type 2. For an Auto-Increment Field leave the field blank and the id number will be automatically generated. 3. For multiple additions you don't have to come back via. Menu as you can use the Browser BACK button to go back to the entry screen and input your next record. This will also help with repeat values as they can be left unchanged while changing other values.
This function allows you to bulk load data by reading rows from a text file into a table at a very high speed. The file is read from the client host. You should have the data loaded in a text file (.txt) having the same name as the table in your current directory. For example if the Table Name is my_table then the data must be in a file named my_table.txt in the current directory where this application is located. The text file should have one line for each record terminated by 'New Line'. The column values should be separated by TABS for correct loading. Do not use quotes to enclose data.
WARNING! THIS WILL NOT WORK FOR MYSQL VERSIONS OLDER THAN 3.22.15
This option will produce a sorted list of all the records in a manner specified by you. The entry screen allows you to provide the following inputs.
1. The names of fields you want to be shown in the list. Click the check-boxes against the fields you want to be listed. 2. The order in which you want the list to be sorted. For selecting the order in which the list should be sorted print the names of the fields separated by commas. The field name for the outer key should be printed first. For example, to sort by the Last Names and within the Last Names by the First names, print:- last_name,first_name. You can also specify the orders e.g. Ascending or Descending by adding ASC or DESC after the field names. Separate the field name and the order by a blank and each group of field name and order by a comma. Example - name ASC,salary DESC. To avoid errors you can copy the field names from the list of fields that appears for the previous input. To print an unordered list leave this entry blank.
This option prints a sorted list of records selected on the criteria that you provide. . The entry screen allows you to provide the following inputs.
1. Names of field to be printed – same as last option 2. The next grid allows you to enter the selection criteria. You don't have to enter the names of the fields, which are printed. So for each relevant field select a comparison operator (equal to, greater than etc) from the drop down list provided. You don't have to select all fields only those you want to be in the selection criteria. Leave the entry boxes for the rest blank. 3. If more than one field is selected then select the logical operator to combine the comparisons by selecting from the selection box between the fields. Important : If fields selected for criteria are not successive ones, use the logical operator just after the preceding field for correct result. For instance if fields 1 and 3 are selected then use the logical operator (AND/OR etc) after field 1 and not after field. 4. Finally select the order of the list – same as last option.
The first screen lists all the fields in the Table and lets you enter the field name and value for selecting the record. The field name can be copied from the list to avoid error.
Next the record, if present, is retrieved and displayed. The program asks for confirmation for the change. If sure press 'Change It' and the record is modified with the new values.
If unsure just press the Browser BACK button to go back or abort the operation.
The first screen lists all the fields in the Table and lets you enter the field name and value for selecting the record. The field name can be copied from the list to avoid error.
Next the record, if present, is retrieved and displayed. The program asks for confirmation of deletion. If sure press 'Delete It' and the record is deleted.
If unsure just press the Browser BACK button to go back or abort the operation.
This option lets you delete a whole table. Since this is a terminal operation, it is carried out in two steps with adequate warnings. On selection of this option the next screen lists the list of fields in the table and the number of records in the table and displays warnings. If sure press 'Delete The Table' and the table is deleted from the database.
If unsure use the Browser BACK button to go back or abort. A table once deleted cannot be retrieved.
In case you are using this application or are interested in its features and have some comments for its improvement / usefulness etc., you may send your feedback to the web-master. We shall be glad to hear from you.
In case you are interested in a personal copy of this application it is available at a nominal cost of US$ 35. Contact the web-master for details. Obtaining a copy now will entitle you to future upgrades free of cost for the next 12 months.