• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Day 12. Writing Advanced Database Queries > Creating Databases and Tables

Creating Databases and Tables

The first step in working with a database system is creating the database container itself. This will hold all the tables, views, and so on for an entire collection of data. Remember, when you say the word database, you're referring to a collection of data, not the individual pieces of data themselves. What you might not have realized is that you actually created a number of databases and tables when you set up MySQL in Day 6. This was all performed “behind the scenes” by having MySQL run a simple import script. In this section you'll learn exactly what happened, and how you can do it by hand, if need be.

Assuming you installed MySQL on your system in Day 6, you're ready to go—you will need to use the MySQL command-line tool mysql, activated by typing C:\mysql\bin\mysql on your Windows machine, or just mysql on Mac OS X. Otherwise you should find out how to access the SQL console for your database server before continuing. Your server documentation should provide the information to get to this point. If you're using a more visually oriented tool, you'll need to find the equivalent functions to these commands.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint