Creating a table

By Joe Gardiner Wednesday, 24th March 2010

Login to the CatN Control Panel and access phpMyadmin. A guide for this is available here.

Inside the phpMyadmin dashboard the left sidebar displays the name of your database, and displays any tables created inside this database. If you have just purchased your vCluster and have not installed any CMS’s, this list will be empty.

Now if you want to add new tables to the empty database, you simply click the database name in the sidebar to be taken to the add table form.

In the Table name field, choose an appropriate name. For the purpose of this guide I will create a table named TEST.

In the field box choose the number of fields. I will be creating 4.

Now all this information has been added, just click the “Go” button to execute.

In the next screen I have to name my fields, choose the filed type, the length of he fields, and any special actions I want on the field. Have a look at the next screenshot of the completed fields, and I’ll explain the contents underneath.

I have based this table on a simple user information record.

The first field, “User Number“, is set as type, INT, that is integer, or whole number. I have set a limit on the length to 20 characters, have made it a primary key, which means each record must be unique, and have ticked the auto increment box, so each new record in this field will increase by 1. I have added a comment describing the user number as a unique identifier.

Second field, “First Name” is type, CHAR, so textual characters and again is set to character length 20.

Third field, “Surname“, is similar to First Name, with a slightly longer character allowance.

The last field, “Telephone Number” is set to type integer again, and has a character limit of 12, based on UK phone numbers.

For more information about character types read here.

For more information about primary keys and unique identifiers, read here.

Now all this information has been added I can click “Save”.

The dashboard now shows my completed table, and all the fields, as well as listing my table under the database name in the left sidebar.

View additional guides in the phpMyadmin section for table and field manipulation.


Posted in Guides, phpMyAdmin | No Comments » twitter-follow facebook-follow rss-follow

Leave a Reply

Your email address will not be published. Required fields are marked *