iLab 3: Database Creation and Table Manipulation

Laboratory Procedures
DeVry University
College of Engineering and Information Sciences

  1. OBJECTIVES
  1. Understand and become familiar with Table Manipulation.

  1. PARTS LIST
  1. EDUPE Omnymbus Environment (https://devry.edupe.net:8300); and/or

  2. MySQL (dev.mysql.com/downloads).

  1. PROCEDURE

By now you have set up either the Omnymbus environment or the MySQL Server Community environment, or both. You may do the labs in this class on your own computer equipped with MySQL or you may use the MySQL environment hosted by the vendor Omnymbus. You may even use both.

Lab Procedure Continued (common to both environments)

  1. Add a table named “Season” to your Baseball database, which consists of the following fields:

    1. Season (Integer)

    2. PlayDate (date)

    3. HomeTeam (character 5)

    4. HomeTeamScore (Integer)

    5. AwayTeam (character 5)

    6. AwayTeamScore (Integer)

  2. Populate the table with 56 unique games where each plays the other 7 twice (once as the home team and once as the away team). Make the season equal to this year. Leave the scores blank and use any date for the PlayDate.

  3. Create another table called “PastSeasons” by copying the structure of the table “Season” and copying all the data from “Season” into the new table.

  4. Replace the Season field in the table Season with next year for all records.

  5. Unload the Season table data to a comma-delimited file.

  6. Load the comma-delimited file to PastSeasons table, appending the data to the data that is already there.