Lab is worth 25 points total

  1. 2 points: Send an email to the instructor with your name and email address, so he can add you to the class mailing list.
  2. 3 points: login to the master server, and connect to your SQL database.
  3. 10 points: Create 2 tables in your database accoring to the following:

    Table name: car

    Field Data type
    carID Auto incrementing integer
    ManufacturerID Integer
    ModelName Variable character field up to 150 characters.
    purchaseDate Date
    Color Variable character field up to 30 characters.

    Table name: manufacturer

    Field Data type
    ManufacturerID Auto incrementing integer
    ManufacturerName Variable character field up to 70 characters.
    Region Character Field of 1 character only.
    Rating Integer
  4. 5 points - Insert the following data into the tables:

    Car table:

    1	1	Explorer	12-15-2001	blue
    2	1	Focus		1-17-2003	red
    3	2	Prius		4-1-2002	turquoise
    4	2	Tercell		9-18-1995	red
    5	3	SW1		11-15-2001	blue
    6	3	LS-200		6-22-2003	yellow
    

    Manufacturer table:

    1	Ford	N	5
    2	Toyota	S	4
    3	Saturn	E	5
    
  5. 5 points - Write a SELECT statement that displays the model, purchaseDate, and color of all the blue and red cars. Print out and bring in this statement to the instructor, or email it to him at the email address in your syllabus.

    Extra Credit

    5 points - use mysqldump to export your database to a file called "backup_YOURUSERNAME.txt" in your home directory. You may need to explore the "--single-transaction" option to mysqldump.