|
Review a Sample Database Using a SQLyog MySQL GUI Tool
Obtain the example Sakila database from the MySQL website to examine a professionally designed database and use a SQLyog GUI for MySQL instead of the command line.
There is no doubt MySQL stands out as one of many open source relational database management systems (RDBMS) that are available on the market. It can be downloaded and installed by itself or as part of a software bundle such as LAMP or WAMP (MySQL is the M in LAMP or WAMP). Once its installed, the next question is what to do with it?
Get Sakila From the MySQL Site or from here
1. An excellent method for becoming familiar with both basic SQL principles as well as differences in syntax unique to an actual database like MySQL is to download an example database. From the MySQL website, find the Example Databases section and download the Sakila database in either TGZ or Zip format. Download sample mysql database sakila.
2. The Sakila example comes with three files. Run the sakila-schema.sql first to make the schema for the database, then sakila-data.sql to populate the database.
To create a database from the command line type:
C:\tmp\sakila-db>mysqladmin -uroot -p create sakila
To make the schema for the Sakila database type:
C:\tmp\sakila-db>mysql -uroot -p sakila < sakila-schema.sql
To populate the Sakila database type:
C:\tmp\sakila-db>mysql -uroot -p sakila < sakila-data.sql
Install the SQLyog MySQL GUI tool
A well known front end for MySQL is SQLyog MySQL GUI. The setup wizard is simple and straightforward.
(Notice: This is not a Cracked/Warez Version of SQLyog)
1. Once you've Downloaded SQLyog MySQL GUI, you're ready to Install.
2. Run the Installer, and Click on "Install".
3. Once its done, you just Installed SQLyog MySQL GUI.
You cannot fail, at the Installation of SQLyog.
Its so easy.. Congratulations!
Using a GUI tool makes adding, modifying and removing databases, tables and fields a breeze. Importing and exporting from numerous sources, including plain text files, XML and MS Access to name a few, is available from the menu etc.
Upon first opening SQLyog GUI tool, the Connect to MySQL Host Dialog comes up. Type in localhost for Server, click on the MySQL tab. Enter for Username root and the password.
What should I enter as 'hostname' when connecting to a MySQL server at an ISP.
Then, click Save and Connect.
The Sakila database provides a marvelous example for demonstrating the capabilities of SQLyog MySQL GUI. In the Database explorer, you can find all the database objects.
Next click on the Query tab. Type any sql command here, such as a simple select statement:
select * from actor;
notice: When double-clicking on the table in the Database Explorer, the table name appears in the query.
-- To run the film_in_stock stored procedure type:
call film_in_stock(1,1,@count);
select @count;
To execute 1 query press on button. To execute all queries press on
button.
The results show up into tabs.
Next click on the Schema Designer tab. Drag some tables from database explorer:
Conclusion
Running a GUI front end like SQLyog MySQL GUI with a sample database makes learning MySQL a fun, painless, and speedy process. For advanced developers, it makes working with MySQL more intuitive as well as being a great time saver. By carefully exploring the details of the Sakila example, picking up tasks like writing code for making tables, inserting data, creating and running store procedures as easy as pie.
Download SQLyog Buy SQLyog Documentation SQLyog
< Prev | Next > |
---|
Comments
Oracle
SQL Server
SQLIte
Interbase/Firebird
Microsoft Access
by DB Software Laboratory
http://code.google.com/p/sakila-sample-database-ports/