You may assume that comparisons for dates are built in. Don't worry too much about syntax, although you may base your syntax on the Oracle 8 examples given in class. Based on your new object-relational schema developed in this problem, write a set of Oracle 8 SQL statements that will populate your new database by querying the old one. If there are cases where it is not possible to port the data over to the new schema by simply using SQL statements, state so and explain why. Problem 2 Consider the following Oracle 8 schema that uses doubly nested table types to create a table called Dorm .
Dorm contains data about students who live in dormitories and the books that they own.
Then write a set of Oracle 8 SQL statements that will populate your flat database by querying the Dorm relation. You should choose V so that if V is stored as a materialized view , then V can be used to substantially speed up the execution of both of the above queries, assuming that the Sales relation is very large. In addition to specifying V , show how each of the two queries above can be rewritten into an equivalent query that uses V instead of Sales . Write the following queries using the temporal relational algebra introduced in class. You may call built-in functions and test conditions on time values using any syntax similar to that used in class.