As in the last unit, work through the following materials writing one sample query for each
mechanism using the modified version of the movies database (see
code/07sql/guide07.sql
).
Views (Section 7.3, for Monday)
Write a simple view specification. For details on Oracle views, see Managing Views.
Define the following terms (in the comments of your SQL command file).
Base Tables
Join Views
Updateable Join Views
Key-Preserved Tables
Views that are implemented via query modification vs materialization. (For details on Oracle materialization, see Materialized View Concepts and Architecture, focusing on the “What is a Materialized View?” and “Why Use Materialized Views” sections.)
Formal languages for the relational model (Chapter 8, for Wednesday)
Relational Algebra (read Sections 8.1–8.3 & 8.5) — Write a simple query on the movies database using SELECT (σcondition), PROJECT (πfieldlist), RENAME (ρnewName) and JOIN (⋈condition) (see example queries 1 & 2 in Section 8.5).
Tuple Relational Calculus (read Sections 8.6.1–8.6.4 & 8.6.8) — Write a simple query on the movies database using the tuple relational calculus queries (see example queries 0 & 1 in Section 8.6.4).
Define the following terms:
Existential (∃) and universal (∀) quantifiers (see Section 8.6.3).
Safe expressions (see Section 8.6.8).
Write your solutions either in ASCII (e.g., SELECT_condition), in Unicode (e.g., σcondition) or by hand.