Database Design and SQL

SQL tutorial


Previous page Previous     TOC Contents     Next pageNext


Lesson 3C - Creating the MySQL database


Create the database

To create the database, use DBManager.





Of course, the MySQL server has to be running. You'll know that it is because you'll be connected to 'localhost'.





Every MySQL database that you create is stored as a folder in MySQL/Data. If you ever have to copy or move the database, simply copy or move the folder.

Open the Query Editor

Once the database is created you start creating the tables.

If you want to practice the syntax studied earlier, open the 'Query Editor' and enter the appropriate SQL command.

The commands in MySQL are similar to the ones in Access but the syntax is slightly different in some cases. For example, in the 'Create table' command, the datatypes are not called the same as in Access.

Whenever you are writing MySQL commands you should keep the Reference manual open in a browser window to make sure you are writing correctly.

For now, read the Create table and Alter table command references.











You can then use the 'Insert' command to get test data into the table.








Use the Table Editor

Having said all that, let's now do it the easy way, using the Table editor.






Instead of writing SQL commands, you simply fill-in the grid.

You can use the Table editor to create and to modify the table whenever needed.







Next, we'll look at the code to write queries.












If you haven't found the database resource you're looking for,
use our Google Search box for more information.

Google






Top



Home | Tutorials | Contact | Sitemap | Add URL | Privacy policy