CS186_sp00_f - UNIVERSITY OF CALIFORNIA Department of EECS,...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
UNIVERSITY OF CALIFORNIA Department of EECS, Computer Science Division CS186 Final Exam May 16, 2000 Final Exam: Introduction to Database Systems This exam has seven sections, each with one or more problems. Each problem may be made up of multiple questions. You should read through the exam quickly and plan your time-management accordingly. Before beginning to answer a question, be sure to read it carefully and to answer all parts of every question! REFERENCE DATABASE . This is the Reference Database referred to in some of the questions. There are six tables describing a company, describing employees, departments, buildings, which department(s) an employee works in (and a percentage of the time for each), department managers (possibly more than one per department), and in which building an employee works (an employee may have more than one office). The primary key of each table is the attribute(s) in capitals. Other attributes are not necessarily unique. EMP – 100,000 tuples, 1,000 pages EID EName Salary Start_Date End_Date 001 Jane $124,000 3/1/93 null 002 Jim $32,000 2/29/96 null 003 John $99,000 12/12/98 null 004 Joe $55,000 2/2/92 null 005 Jenny $51,000 5/5/95 null EID values range from 1 to 100,000 BUILDING – 2,000 tuples, 10 pages BID BName Address 201 ATC 1600 Ampitheatre 202 CCC 500 Crittenden 203 MFB 123 Shoreline BID values range from 1 to 2,000 DEPT – 1,000 tuples, 5 pages DID DName Annual_Budget 101 Research $1,001,000 102 Development $500,000 103 Sales $2,000,000 DID values range from 1 to 1000 IN_DEPT – 110,000 tuples, 550 pages EID DID Percent_Time 001 101 100 002 102 100 003 101 60 003 102 40 004 103 100 005 103 100 IN_BUILDING – 110.000 tuples, 550 pages EID BID 001 201 002 201 003 202 003 203 004 202 005 203 MANAGES_DEPT – 800 tuples, 4 pages EID DID 003 101 003 102 001 103 You must write your answers on these stapled pages . You also must write your name at the top of every page except this one , and you must turn in all the pages of the exam. You may remove this page from the stapled exam, to serve as a reference, but do not remove any other pages from the stapled exam ! Two pages of extra answer space have been provided at the back in case you run out of space while answering. If you run out of space, be sure to make a “forward reference” to the page number where your answer continues.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Name________________________________________________ Login_______________________ CS186 March 6 Midterm Page 2 Points for this page: ___________ I. SQL – All queries are based on the sample schema shown on the first page. Assume that the tables have many more rows than are shown there. 15 Points. 1. Which of the following queries finds the names of buildings where more than 50 employees work? (Circle as many as are correct.) (5 points)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/10/2009 for the course COMPUTER 504 taught by Professor Drjan during the Spring '09 term at Arab Academy for Science, Technology & Maritime Transport.

Page1 / 12

CS186_sp00_f - UNIVERSITY OF CALIFORNIA Department of EECS,...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online