Lab 04 - MySQL Introductions


Preliminaries


MySQL Browser (part of the GUI Tools download)

  1. Open the lab attendance database in the MySQL Browser. You will need to enter the following information:

    Try some queries, e.g., "select * from student" or "select studentName from student" or "select * from lab"

  2. Connect to your own database account in the MySQL Browser. You will need to enter the following information:

    Create a "test" table in your *_db1 database. Add some attributes, keys, etc.

    Drop the "test" table.

Reverse Engineer a MySQL Database into ER Studio

  1. Setup the ODBC Connector for ER Studio and point it to the BigHitVideo database under your MySQL account.

  2. In ER Studio, do: File > New > Reverse Engineer...

Generating a MySQL Database from ER Studio

  1. Model the following entities and their attributes.

    The relationships to consider are as follows. If in doubt about whether a non-identifying relationship is mandatory or optional, just make it mandatory to simplify the diagram:

  2. Verify your solution against this possible solution. (Open the solution in ER Studio and compare it to yours.)
  3. Use ER Studio to automatically generate the MySQL database for the above, provided model.

MySQL Administrator (part of the GUI Tools download)

  1. Backup your database from the previous exercise and save the file to a secure location.
  2. View the file in Notepad, making note of the statements that should be familiar to you from class.
  3. Drop the tables from the previous exercise, then restore your database from the backup file.
  4. Use the MySQL Query Browser to enter data. Repeat the backup and restore process.
  5. LESSON: use the BACKUP feature OFTEN to save your work!