CS634 – Homework 2
Released Feb 8, Due Wed., Feb. 21 (20 points)
Instructions: The homework is due BEFORE CLASS on the duedate. Please hand in paper copies (either typeset or hand-written copies are fine, as long as the hand writing is clear).
Note that some of these are solved online in the student answer set for our main text.
Each student now has an additional Oracle account joex for user joe
with the additional privilege given by the DBA using, for example:
grant select_catalog_role to joex;
This allows you to query the system tables such as v$session, to see
other users logged in, etc. To see current users:
select distinct username from v$session;
Problem 1 Using Indexes for simple queries. Best to do this early to have Oracle to yourself when timing. Check for other use by doing the above query on v$session. In Oracle on dbs3, a large table setq_db.bench250 is public for querying and large enough to take over a minute to scan, as shown in class. The smaller table setq_db.bench is also there, and easily fits in memory. They have the same columns.a. Find out its columns using describe--show the output. Also find out how many rows each table has.
Exercise 8.4 in the textbook. Ignore the "order of entries" question, since it seems unclear. Show the first data entry and the last. Use RIDs (1,1), (1,2), (1,3), (2,1), and so on.
Exercise 8.10 in the textbook
Exercise 9.5 in the textbook
Exercise 9.6 in the textbook.
Exercise 10.2 in the textbook (only questions 1-5).
Exercise 10.8 in the textbook.