Home arrow MySQL arrow Page 4 - Designing a MySQL Database: Tips and Techniques

Inputting the specifications into MySQL using phpMyAdmin - MySQL

You are planning to develop a PHP web application that needs a MySQL database. Now what? You need to design your MySQL database first. Need a little help? Keep reading.

  1. Designing a MySQL Database: Tips and Techniques
  2. Naming the Database, Tables, Field names and Data Types
  3. Finalization of Database Design Specifications
  4. Inputting the specifications into MySQL using phpMyAdmin
By: Codex-M
Rating: starstarstarstarstar / 19
July 13, 2009

print this article



We will now input these specifications into the MySQL environment using the phpMyAdmin graphical interface. Follow these short steps:

Step 1: Log in to phpMyAdmin using your MySQL username and password.

Step 2: Click the "database" link, and in the "Create new database" section enter customercomplaint.

Step 3: On the "Create new table on database customercomplaint," section, enter "customertable" and in the number of fields, enter 6. Click "go."

Use the design specifications to configure the variables in the database. See the screen shot below for a complete guide:

Do not forget to check "Current_Timestamp" under the Default column in receivingdate field. "Unsigned" means it will accept only positive values, which can be set under "Attributes". "Zero Fill" means it will insert zeroes for spaces if the number of digits entered is less than five. 

For example, if the product serial key is 456, MySQL will store it as "00456."

The detailed MySQL query for creating the designed table is as follows:

CREATE TABLE `customercomplaint`.`customertable` (

`customername` VARCHAR( 64 ) NOT NULL ,`price` DECIMAL( 7, 3 ) UNSIGNED NOT NULL ,`datepurchased` DATE NOT NULL ,`productkey` SMALLINT( 5 ) UNSIGNED ZEROFILL NOT NULL ,`complaintdetails` TEXT NOT NULL ,`receivingdate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP


After everything is set, click "Save." You can now start inserting data into your newly-designed database. You will notice it will only accept data according to your specifications and display errors for those are not within the design.

>>> More MySQL Articles          >>> More By Codex-M

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Oracle Unveils MySQL 5.6
- MySQL Vulnerabilities Threaten Databases
- MySQL Cloud Options Expand with Google Cloud...
- MySQL 5.6 Prepped to Handle Demanding Web Use
- ScaleBase Service Virtualizes MySQL Databases
- Oracle Unveils MySQL Conversion Tools
- Akiban Opens Database Software for MySQL Use...
- Oracle Fixes MySQL Bug
- MySQL Databases Vulnerable to Password Hack
- MySQL: Overview of the ALTER TABLE Statement
- MySQL: How to Use the GRANT Statement
- MySQL: Creating, Listing, and Removing Datab...
- MySQL: Create, Show, and Describe Database T...
- MySQL Data and Table Types
- McAfee Releases Audit Plugin for MySQL Users

Developer Shed Affiliates


Dev Shed Tutorial Topics: