Homework 2
 

  1. Design a database table, called JOBS, that will hold information about a collection of jobs. For each job, the table should hold the company, title, description, wage, experience level, job starting date, and tuple delete date. Pick the most appropriate type for each field. You may add additional columns to the table if you like. Write the CREATE TABLE statement used to create this table.
    1. Insert five rows into the JOBS table. Pick realistic values for each field, and include at least two jobs with a delete date of Sept. 30, 2009. Write the INSERT statements used to populate the table.
    2. Write an SQL query that returns the company and title of jobs due to be deleted on Sept. 30, 2009.
    3. Write SQL queries that delete all the rows in the table and destroys the table.
    Turn in a printout of a shell session log in which you use psql to perform these SQL operations. See the man page for script for instructions on creating a session log.
     
  2. p66 #3.2
  3. p67 #3.9