CS 199 Willamette University Spring, 2019
 
Programming in PHP, Databases with MySQL,
and Web Applications
 

More Practice with MySQL

Recent labs have introduced the SQL queries: CREATE, INSERT, UPDATE, and Drop. Although these labs have provided familiarity with these statements for working with a database, the next work in the course will be building heavily on these SQL statements. Thus, before moving onward, this lab provides additional practice, to help students become reasonably comfortable working with MySQL tables.

Second-floor Rooms in Ford Hall

The goal of this lab is to create a table, called room, describing several characteristics of the Computer Science and Mathematics rooms on the second floor of Ford Hall. Specifically, for each room on the second floor of Ford Hall, a record is to hold these data:

Important Notes for the Lab

  1. Table creation: Using a CREATE statement, establish a room table with the five fields listed above. (As noted above, when this statement works properly, copy it into your file of SQL statements for this lab.)

  2. Rooms on the second floor of Ford Hall are numbered 201 through 224. Since most of the rooms are offices with 1 workstation, 3 chairs, and 0 projection devices:

    With these statements created, copy the collection of 24 statements into the room table.

  3. Write a DELETE statement to remove rooms 203, 205, and 222 from the list of rooms (as those rooms are not affiliated with computer science or mathematics). Also, remove room 221 (as no such room exists).

  4. Modify classrooms 201, 202, 204, and 224, as follows:

  5. Modify room 209 as a "student research" room with 4 chairs, no projector, and 3 workstations.

  6. Modify room 218 as an "administrative assistant" room with 4 chairs, no projector, and no workstations.

  7. Modify room 220, so that it is a work room with no workstations, chairs, or projection equipment.

  8. Be sure all of these adjustments are implemented and entered in the file of commands.

Disclaimer

All room descriptions above should be considered approximate and may or may not reflect actual facilities. These characteristics are identified for practice with database tables in this course; if you need definitive details about one or more rooms, a more careful review should be undertaken.

Work to be Handed In




created 9 February 2019
revised 10 February 2019
Valid HTML 4.01! Valid CSS!