O'Reilly logo

Harnessing Hibernate by James Elliott, Ryan Fowler, Timothy M. O'Brien

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Looking at the Data

Back on the server, you can fire up the MySQL client again and confirm that the Track mapping schema has been created, as shown in Example 10-5.

Example 10-5. Checking the newly created MySQL schema

% mysql -u jim -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 21 to server version: 5.0.27

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use notebook_db
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed

mysql> show tables;
+-----------------------+
| Tables_in_notebook_db |
+-----------------------+
| ALBUM_ARTISTS         | 
| ALBUM_COMMENTS        | 
| ALBUM_TRACKS          | 
| ARTIST                | 
| TRACK_ARTISTS         | 
| TRACK_COMMENTS        | 
| album                 | 
| track                 | 
+-----------------------+
8 rows in set (0.00 sec)

mysql> describe track; +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+----------------+ | TRACK_ID | int(11) | NO | PRI | NULL | auto_increment | | TITLE | varchar(255) | NO | MUL | | | | filePath | varchar(255) | NO | | | | | playTime | time | YES | | NULL | | | added | date | YES | | NULL | | | VOL_LEFT | smallint(6) | YES | | NULL | | | VOL_RIGHT | smallint(6) | YES | | NULL | | | sourceMedia | varchar(255) | YES | | NULL | | +-------------+--------------+------+-----+---------+----------------+ 8 rows ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required