Using the Music Database
In Chapter 4, we showed you how we understood
the requirements for storing a music collection and how we designed
the music
ER model. We also
introduced the steps you take to convert an ER model to a format that
makes sense for constructing a relational database. For convenience,
we’ve reproduced the music
database
ER diagram in Figure 5-1. In this
section, we show you the structure of the MySQL database that we
created after converting the ER model into SQL statements. We don’t
explain the SQL statements we used to create the database; that’s the
subject of Chapter 6.
Figure 5-1. The ER diagram of the music database
To begin exploring the music
database, connect to the MySQL monitor using the root
MySQL account. For Mac OS X or Linux,
run a terminal program, and in the terminal window type:
$
mysql --user=root --password=
the_mysql_root_password
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 5.0.22 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>
For Windows, click on the
Start menu, then on the Run option, and then type cmd
and press Enter. In the DOS or command
window, type:
C:\>
mysql --user=root --password=
the_mysql_root_password
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 5.0.22 Type 'help;' or '\h' for help. Type ...
Get Learning MySQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.