Updated 7-Jan-2006
Here are the free packages to install for a Web Database Interface
Tests
Case Study
The county administrator comes to your office and says that they want to stop putting real estate transactions in the paper.
Your job, if you decide to accept, is to put it on the net!!!
Extras
-rw-rw---- 1 mysql mysql 9148 Jun 13 10:55 user.frm -rw-rw---- 1 mysql mysql 2354 Jun 14 12:34 user.MYD -rw-rw---- 1 mysql mysql 2048 Jun 14 12:34 user.MYIRestart the daemon.
$ su - root
# /etc/rc.d/init.d/network stop
# # limit access to your SQL server
# /etc/rc.d/init.d/mysqld stop
# safe_mysqld --skip-grant-tables &
# # be quick, EVERYONE has full access to your MySQL server
# # when you use the skip-grant-tables parameter
# # That is why I turned off the network.
# mysql -u root mysql
mysql> use mysql
mysql> UPDATE user SET password=PASSWORD('XXXXX') WHERE user = 'root';
mysql> FLUSH PRIVILEGES;
mysql> EXIT;
# mysqladmin -u root -p shutdown
# /etc/rc.d/init.d/network start
# /etc/rc.d/init.d/mysqld start
Access the Race Results and Real Estate Sales Demo using a PHP library with full source code called Query Maker. LIVE DEMO - updated April 2005
MySQL Control Center is a great GPL Multi-Platform Tool for Querying,
Browsing and Changing MySQL databases:
Get it here.
Suggestions for a database data dictionary
Create a table with this structure:
+-------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| column_name | varchar(80) | YES | | NULL | |
| table_name | varchar(40) | YES | | NULL | |
| type_name | varchar(4) | YES | | NULL | |
| value_name | varchar(10) | YES | | NULL | |
| label_name | varchar(100) | YES | | NULL | |
+-------------+--------------+------+-----+---------+-------+
create table datadict(
column_name varchar(80),
table_name varchar(40),
type_name varchar(4),
value_name varchar(10),
label_name varchar(100));
Populate it with code values from all the tables in your database. Ex-
insert into datadict values( "glasses", "health", "Code", "*", "No Answer");
insert into datadict values( "glasses", "health", "Code", "0", "None");
insert into datadict values( "glasses", "health", "Code", "1", "Reading");
insert into datadict values( "glasses", "health", "Code", "2", "Distance");
insert into datadict values( "glasses", "health", "Code", "3", "Bifocals");
insert into datadict values( "glasses", "health", "Code", "4", "Variable Focus");
For the RACE Table example:
+-------------+------------+-----------+------------+------------+
| column_name | table_name | type_name | value_name | label_name |
+-------------+------------+-----------+------------+------------+
| sex | race | K | M | Male |
| sex | race | K | F | Female |
+-------------+------------+-----------+------------+------------+
2 rows in set (0.00 sec)
mysql> insert into datadict values( "sex", "race", "K", "X", "Middlesex");
Query OK, 1 row affected (0.00 sec)
When entering the data from a web form, you can even
construct the select box in real
time by getting the data out of the data dictionary with PHP.
Live Demo -
Link to Working Source Code
Required Reading
mySQL Manual and PHP Manual available from
PHP home page
MySQL home page
This page is http://people.virginia.edu/~rtg2t/webdb/home.html