The University of British Columbia

Similar documents
Oak Park and River Forest High School District 200 Board of Education May 22, 2014 Personnel Report

Welcome to ACT Brain Boot Camp

Cerritos Community College District Organizational Chart

Lottery Results

Focus of the Unit: Much of this unit focuses on extending previous skills of multiplication and division to multi-digit whole numbers.

Managerial Economics 12th Edition Answers

Bibliography. Allen, Daniel. "Volunteering Works." Mental Health Practice 11.9 (2008): 6-7. Academic

Carnegie Mellon University Department of Computer Science /615 - Database Applications C. Faloutsos & A. Pavlo, Spring 2014.

Evaluating Statements About Probability

Answers To Managerial Economics And Business Strategy

Exhibit 2. WJMZ-FM, WHZT (FM) WJMZ-FM, Anderson, South Carolina / WHZT (FM), Seneca, South Carolina May 3, July 31, 2013

The Basics Of Heat (Core Concepts) By John O. E. Clark

1 3-5 = Subtraction - a binary operation

Hawker Brownlow Education. Looking Together at Student Work. Tina Blythe David Allen Barbara Schieffelin Powell THIRD EDITION

Are You Ready? Simplify Fractions

9:30AM- 1:00PM JOHN PASSMORE L116

Rajiv Gandhi National University of Law, Punjab (India) RGNUL Exagium: Essays on Classics

ENGL 213: Creative Writing Introduction to Poetry

Extending Place Value with Whole Numbers to 1,000,000

Title:A Flexible Simulation Platform to Quantify and Manage Emergency Department Crowding

EDINA SENIOR HIGH SCHOOL Registration Class of 2020

Stacks Teacher notes. Activity description. Suitability. Time. AMP resources. Equipment. Key mathematical language. Key processes

INSTRUCTIONAL MATERIALS SURVEY ELEMENTARY SCHOOL LEVEL RLA/ELD WORKSHEET

Building Extension s Public Value

Strategies for Solving Fraction Tasks and Their Link to Algebraic Thinking

November 19, The King William County School Board held its regular meeting on Tuesday,

Middle States Commission on Higher Education 3624 Market Street, Philadelphia, PA Phone: Fax:

Stochastic Calculus for Finance I (46-944) Spring 2008 Syllabus

What Does ESSA Mean for English Learners and #ESSAforELs

Texas A&M University-Corpus Christi 2018-

SUMMARY REPORT MONROE COUNTY, OH OFFICIAL RESULTS PRIMARY ELECTION MARCH 6, 2012 RUN DATE:03/20/12 11:03 AM STATISTICS REPORT-EL45 PAGE 001

Dorothy Wright Simes papers,

Special Edition. Starter Teacher s Pack. Adrian Doff, Sabina Ostrowska & Johanna Stirling With Rachel Thake, Cathy Brabben & Mark Lloyd

Santa Barbara Peace Corps Association Members ALPHABETICAL ORDER by last name (as of 4/8/13)

July Sun Mon Tue Wed Thu Fri Sat. New Teacher Orientation July Mr. Rodriguez s. Mrs. Leon s Birthday Birthday. Mr.

Possessive have and (have) got in New Zealand English Heidi Quinn, University of Canterbury, New Zealand

Iterative Cross-Training: An Algorithm for Learning from Unlabeled Web Pages

CAMBRIDGE COLLEGE SCHOOL of PSYCHOLOGY and COUNSELING

CONCEPT MAPS AS A DEVICE FOR LEARNING DATABASE CONCEPTS

Class of 2013 Honors Award Winners

A Level Business Studies Past Papers

eguidelines Aligned to the Common Core Standards

Mrs. Helmberger s Class Newsletter

Beginners French FREN 101 University Studies Program. Course Outline

Idaho Early Childhood Resource Early Learning eguidelines

Longitudinal Analysis of the Effectiveness of DCPS Teachers

GCSE Mathematics B (Linear) Mark Scheme for November Component J567/04: Mathematics Paper 4 (Higher) General Certificate of Secondary Education

UNCF ICB Enrollment Management Institute Session Descriptions

JING: MORE BANG FOR YOUR INSTRUCTIONAL BUCK

Spring 2016 Stony Brook University Instructor: Dr. Paul Fodor

Sociology. Faculty. Emeriti. The University of Oregon 1

Syllabus Introduction to the Human Context of Science and Technology HCST 100 & HCST 100H FALL 2007 Rev. 3 IN WORK Changes in color

1.1 Examining beliefs and assumptions Begin a conversation to clarify beliefs and assumptions about professional learning and change.

MINUTES. Kentucky Community and Technical College System Board of Regents. Workshop September 15, 2016

A Metacognitive Approach to Support Heuristic Solution of Mathematical Problems

Association Between Categorical Variables

Latino Males in Texas Community Colleges: A Phenomenological Study of Masculinity Constructs and their Effect on College Experiences

NANCY L. STOKEY. Visiting Professor of Economics, Department of Economics, University of Chicago,

Exploring Derivative Functions using HP Prime

American Journal of Business Education October 2009 Volume 2, Number 7

Textbook: American Literature Vol. 1 William E. Cain /Pearson Ed. Inc. 2004

Task Tolerance of MT Output in Integrated Text Processes

5935 Clarkston Road Clarkston, MI (248) , (248)

Cal s Dinner Card Deals

The Task. A Guide for Tutors in the Rutgers Writing Centers Written and edited by Michael Goeller and Karen Kalteissen

HIS/IAR 627: Museum and Historic Site Interpretation

Macroeconomic Theory Fall :00-12:50 PM 325 DKH Syllabus

How to make an A in Physics 101/102. Submitted by students who earned an A in PHYS 101 and PHYS 102.

March 6, 2017 Newsletter Issue - 27

OFFICE SUPPORT SPECIALIST Technical Diploma

Planning a research project

Montana Content Standards for Mathematics Grade 3. Montana Content Standards for Mathematical Practices and Mathematics Content Adopted November 2011

CollegeNow Conference Day Breakout Session I 10:40 AM 11:55 AM

GIS 5049: GIS for Non Majors Department of Environmental Science, Policy and Geography University of South Florida St. Petersburg Spring 2011

EDITORIAL: New Year Wishes for Elementary Education

Apps4VA at JMU. Student Projects Featuring VLDS Data. Dr. Chris Mayfield. Department of Computer Science James Madison University

Reasons Influence Students Decisions to Change College Majors

Hill, Ronald P. and Langan, Ryan (2014), Handbook of Research on Marketing and Corporate Social Responsibility Edward Elgar Publishing, forthcoming

Operations and Algebraic Thinking Number and Operations in Base Ten

The Boston Zoning Variance Database

arxiv: v1 [math.at] 10 Jan 2016

Syllabus for Sociology 423/American Culture 421- Social Stratification

Faculty Feedback User s Guide

Sapphire Elementary - Gradebook Setup

University Committee on Tenure and Promotion (UCTP) Annual Report for

Culture, Tourism and the Centre for Education Statistics: Research Papers 2011

ATTRIBUTES OF EFFECTIVE FORMATIVE ASSESSMENT

Guidelines for the Iowa Tests

Application for Fellowship Theme Year Sephardic Identities, Medieval and Early Modern. Instructions and Checklist

5 Guidelines for Learning to Spell

Closing out the School Year for Teachers and Administrators Spring PANC Conference Wrightsville Beach April 7-9, 2014

How People Learn Physics

Introduction to the Practice of Statistics

MASTER S THESIS GUIDE MASTER S PROGRAMME IN COMMUNICATION SCIENCE

Philosophy 225 Environmental Philosophy. Lure, Tara Donovan (2004) Fishing Line. Office Hours: M/W 10-11:30am

HARVARD KENNEDY SCHOOL. Professor Barbara Kellerman

Guide to the University of Chicago Department of Sociology Interviews 1972

THE FRYDERYK CHOPIN UNIVERSITY OF MUSIC

21st CENTURY SKILLS IN 21-MINUTE LESSONS. Using Technology, Information, and Media

Welcome to SAT Brain Boot Camp (AJH, HJH, FJH)

Transcription:

The University of British Columbia Computer Science 304 Midterm Examination June 6, 2011 Time: 50 minutes Total marks: 30 Instructor: Rachel Pottinger Name ANSWER KEY (PRINT) (Last) (First) Signature This examination has 3 doublesided pages. Check that you have a complete paper. This is a closed book, closed notes exam. No books or other material may be used. Answer all the questions on this paper. Give very short but precise answers. State any assumptions you make Work fast and do the easy questions first. Leave some time to review your exam at the end. Good Luck Question Mark Out of 1.a 5 1.b 5 2.a 5 2.b 5 2.c 5 2.d 5 TOTAL Out of 30

All queries for this exam use the same schema as in class and in the SQL exercises in the book: The schema will be repeated on following pages for easy reference. The meaning of these relations is straightforward; for example, Enrolled has one record per student-class pair such that the student is enrolled in the class. 1. {10 marks} Relational Algebra. For each query return EXACTLY the following: a. Find the student numbers of the students who have taken classes from teachers with the same name (e.g., you d return the student ID of the student Elizabeth Taylor if she also took a class from Elizabeth Taylor ) FT fname, name (Class Faculty) SE sname, cname (Student Enrolled) Π sname(se name = cname sname = fname FT) Note: during the exam I clarified that I was asking about student names, not student numbers, otherwise you d need to modify SE to project snum and then project snum from the answer. b. Find the names of all students who have taken all courses taught by Elizabeth Taylor. (ET(cname), name (σ fname = Elizabeth Taylor (Class Faculty))) (SE, sname, cname (Student Enrolled)) SE/ET Common errors: Miss that it s division Have the wrong thing to divide by: it s student enrollments divided by classes by Elizabeth Taylor Forget to project the classes taught by Elizabeth Taylor Note: it s just fine to join student with enrolled after the division. Page 2

Page 3

The schema again: 2. {20 marks} SQL Queries. For each query return EXACTLY the following (i.e., remove duplicates from your final answers where they are not explicitly requested, and include no extra columns): a. List in reverse alphabetical order the names of all students who have not taken a class with Intro in the title select distinct sname from student s where s.snum not in (select s2.snum from student s2, enrolled e where e.snum = s2.snum and cname like '%Intro%') order by sname desc 24 rows: Thomas Robinson Susan Martin Steven Green Paul Hall Nancy Allen Mark Young Maria White Margaret Clark Luis Hernandez Lisa Walker Kenneth Hill Karen Scott Juan Rodriguez Joseph Thompson George Wright Edward Baker Dorthy Lewis Donald King Daniel Lee Christopher Garcia Charles Harris Betty Adams Angela Martinez Ana Lopez b. How many classes have an unknown meeting time? SELECT count(*) FROM class WHERE meets_at is NULL Answer: 2 Page 4

The schema again: c. Find the age of the oldest student who is either a Economics major or enrolled in a course taught by John Williams Note: this question is isomorphic to question 5.1.2 in the book SELECT MAX(S.age) FROM Student S WHERE (S.major = Economics ) Or S.snum in (SELECT E.snum FROM Class C, Enrolled E, Faculty F WHERE E.cname = C.name AND C.fid = F.fid AND F.fname = John Williams ) MAX(S.AGE) ---------- 21 d. Find the names of the students enrolled in the maximum number of classes. Note: this is question 5.1.10 in the book SELECT DISTINCT S.sname FROM Student S WHERE s.snum in ( SELECT E.snum FROM Enrolled E Group By E.snum Having Count(*) >= all (SELECT COUNT (*) FROM Enrolled E2 GROUP By E2.snum)) SNAME ------------------------------ Ana Lopez Juan Rodriguez Luis Hernandez Page 5