Beginner Guide To Create MySQL Database
General August 9th, 2008Are you a novice web programmer looking to control data activity on your website through MySQL database? Here are some tips to get a start. For handling the management of MySQL database too known as PhpMyAdmin is used. This is the easiest interface to control and create database and mot importantly is an open source that can be downloaded form internet. Most of the Linux based web hosting providers include PhpMyAdmin as a feature in their cpanels. If your web host lacks this feature ask them they will install it for you or will allow you to install it on your own as setup is very easy and simple. This easy to use tool allows webmasters to create databases by dropping or altering tables, deletion, addition or editing the existing tables as well. Even the use of graphical tools has made the things easy as in case of any mistake software guides the developer in right direction. Here is step by step procedure to create a new database in MySQL.
1. How to create new Database?
When you login to PhpMyAdmin and selects to create a new database, it asks to enter a database name. Format of writing the database name is like this. “username_database”. It is the standard way and all databases are named in this format. Here username is the server name which helps the server to know which user will use this database. This is also considered as the per5mission to that particular user on the server for his corresponding database.
2. How to create tables in your database?
Once the database has been named, next step is to create tables in this database. This actually is the area where data will be stored. Select your database, a drop down box will show you the facility to create table in that database. Click this table option and enter the name for this table. Try to give a name according to the data that will be stored in that table as it helps to find out things easily in future.
After the table has been named, you will have to decide how many columns or you can say “fields” that table should have for storing records. If you are looking for 7 fields in your form, just put 7 in the box and 7 fields in that table will be created. One very important thing here for beginners, you should not worry about the number of fields in a table as it be edited later (can be increased or decreased according to your later on requirements).
3. Defining the fields
As the table has been created, now you will have to define features for each field. It surely is the most difficult portion of this all procedure. But still I will say do not be worried by thinking it as a complicated step. For this many helping materials are available on the internet just like one here, how to install MySQL database. Still for better idea, in this section you will have to make choice out of three common data types and have to go with one which suits you best. Don’t worry as in case of any mistake you can go back and edit the field.
4. Last step:
Last step is to give any special attributes to your fields like auto increment, primary key and index key.
That’s all and your file is ready for importing into your MySQL database. Congratulations!
August 18th, 2008 at 11:10 pm
Your blog is interesting!
Keep up the good work!