13.3

Consider the relations section and takes. Give an example instance of these two relations, with three sections, each of which has five students. Give a file structure of these relations that use multitable clustering.


The relation section with three tuples is as follows:

 course_id | sec_id | semester | year | building  | room_number | time_slot_id 
-----------+--------+----------+------+-----------+-------------+--------------
 747       | 1      | Spring   | 2004 | Gates     | 314         | K
 362       | 1      | Fall     | 2005 | Lamberton | 143         | I
 192       | 1      | Fall     | 2002 | Polya     | 808         | B
(3 rows)

The relation takes with five students for each section is as follows:

  id   | course_id | sec_id | semester | year | grade 
-------+-----------+--------+----------+------+-------
 74016 | 747       | 1      | Spring   | 2004 | A-
 1110  | 747       | 1      | Spring   | 2004 | B 
 90779 | 747       | 1      | Spring   | 2004 | A-
 65987 | 747       | 1      | Spring   | 2004 | B 
 84432 | 747       | 1      | Spring   | 2004 | B+
 18709 | 362       | 1      | Fall     | 2005 | A+
 35362 | 362       | 1      | Fall     | 2005 | C-
 81896 | 362       | 1      | Fall     | 2005 | B+
 80057 | 362       | 1      | Fall     | 2005 | A+
 31341 | 362       | 1      | Fall     | 2005 | B-
 97042 | 192       | 1      | Fall     | 2002 | A-
 56598 | 192       | 1      | Fall     | 2002 | A+
 32376 | 192       | 1      | Fall     | 2002 | A+
 50039 | 192       | 1      | Fall     | 2002 | A-
 14182 | 192       | 1      | Fall     | 2002 | B+
(15 rows)

The multitable clustering for the above two instances can be taken as:

 747       | 1      | Spring   | 2004 | Gates     | 314         | K
 74016 | 747       | 1      | Spring   | 2004 | A-
 1110  | 747       | 1      | Spring   | 2004 | B 
 90779 | 747       | 1      | Spring   | 2004 | A-
 65987 | 747       | 1      | Spring   | 2004 | B 
 84432 | 747       | 1      | Spring   | 2004 | B+
 362       | 1      | Fall     | 2005 | Lamberton | 143         | I
 18709 | 362       | 1      | Fall     | 2005 | A+
 35362 | 362       | 1      | Fall     | 2005 | C-
 81896 | 362       | 1      | Fall     | 2005 | B+
 80057 | 362       | 1      | Fall     | 2005 | A+
 31341 | 362       | 1      | Fall     | 2005 | B-
 192       | 1      | Fall     | 2002 | Polya     | 808         | B
 97042 | 192       | 1      | Fall     | 2002 | A-
 56598 | 192       | 1      | Fall     | 2002 | A+
 32376 | 192       | 1      | Fall     | 2002 | A+
 50039 | 192       | 1      | Fall     | 2002 | A-
 14182 | 192       | 1      | Fall     | 2002 | B+