CSC 459- Homework #1

Here you will learn to write RA and RC expressions.

Consider the following three tables in a typical university database:


           Course                          Section         
     -------------------------      ---------------------------
      cnum    title    credits      cnum    secnum    room  cap  
     -------------------------      ---------------------------
              
                         MeetingTime
              ---------------------------------------
              cnum   secnum   day  starttime  endtime
              ---------------------------------------
  1. Explain the following RA expression by concisely stating the query that it is written for. Don't give explanations that are phrased like: first a selection is performed on ... then a join with ... then a projection of ...
         ((course WHERE credits > "3") JOIN 
         ((meetingtime WHERE day = "mon") INTERSECT
          (meetingtime WHERE starttime = "7:00")))[cnum,title]
    
  2. write a RA expression that finds the title and credits of courses with at least one section with maxseats of more than 60.

    1. Explain the following RC expression in the same way that you were asked to explain the RA expression:
                      1
                   { t | (Ec) (Es) (course(c) and section(s) and t[1] = s[4] and 
                                    c[1] = s[1])}
      
      
    2. Give the equivalent RA expression.

  3. Write an RC expression that finds course titles of courses with at least 2 sections.