CSE 530 Midterm Exam

Similar documents
CSE 530 Midterm Exam

The appendix contains information about the Classic Models database. Place your answers on the examination paper and any additional paper used.

CSE 414 Database Systems section 10: Final Review. Joseph Xu 6/6/2013

Database Systems, CSCI Exam #2 Thursday November 4, 2010 at 2 pm

Carnegie Mellon University in Qatar Spring Problem Set 4. Out: April 01, 2018

consider the following tables pertaining to employees working for different Write the SQL statement to retrieve the average age of employees for each

CS40 Exam #2 November 14, 2001

Intermediate SQL ( )

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2017 Quiz I

CS 186 Midterm, Spring 2003 Page 1

CSE 344 Midterm. Monday, November 9th, 2015, 9:30-10:20. Question Points Score Total: 70

Name: Database Systems ( 資料庫系統 ) Midterm exam, November 15, 2006

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2015 Quiz I

CSE Midterm - Spring 2017 Solutions

Course No: 4411 Database Management Systems Fall 2008 Midterm exam

Examination paper for TDT4145 Data Modelling and Database Systems

COMP3311 Database Systems

CS 461: Database Systems. Final Review. Julia Stoyanovich

CSE-3421M Test #2. Queries

ISYS1055/1057 Database Concepts Week 9: Tute/Lab SQL Programming

Informatics 1: Data & Analysis

Physical Design. Elena Baralis, Silvia Chiusano Politecnico di Torino. Phases of database design D B M G. Database Management Systems. Pag.

CSE-3421: Exercises. Winter 2011 CSE-3421 Exercises p. 1 of 18

CMSC 461 Final Exam Study Guide

Spring 2013 CS 122C & CS 222 Midterm Exam (and Comprehensive Exam, Part I) (Max. Points: 100)

CSE 444 Final Exam. August 21, Question 1 / 15. Question 2 / 25. Question 3 / 25. Question 4 / 15. Question 5 / 20.

CS 564 Final Exam Fall 2015 Answers

Midterm Exam. Name: CSE232A, Winter February 21, Brief Directions:

CSE 344 Midterm. Wednesday, February 19, 2014, 14:30-15:20. Question Points Score Total: 100

Final Examination Computer Science 420 Dr. St. John Lehman College City University of New York 21 May 2002

UNIVERSITY OF CALIFORNIA College of Engineering Department of EECS, Computer Science Division

Information Systems Engineering. SQL Structured Query Language DDL Data Definition (sub)language

Queen s University Faculty of Arts and Science School of Computing CISC 432* / 836* Advanced Database Systems

Week7: First Tutorial

Birkbeck. (University of London) BSc/FD EXAMINATION. Department of Computer Science and Information Systems. Database Management (COIY028H6)

CSE 444 Homework 1 Relational Algebra, Heap Files, and Buffer Manager. Name: Question Points Score Total: 50

Fundamentals of Database Systems

Multiple-Choice. 1. Which of the following is equivalent to a table? (3 pts.) a. record b. relation c. relationship d. constraint e.

5/13/2009. Introduction. Introduction. Introduction. Introduction. Introduction

CSE414 Midterm Exam Spring 2018

CS 186/286 Spring 2018 Midterm 1

Database Systems CSE 414

CS 186/286 Spring 2018 Midterm 1

CS 200 Fall 2012 Assignment 8 SQL Due Monday November 10 by 4:00 pm

CSE344 Midterm Exam Winter 2017

IMPORTANT: Circle the last two letters of your class account:

CPSC 310: Database Systems / CSPC 603: Database Systems and Applications Exam 2 November 16, 2005

CSE344 Midterm Exam Fall 2016

CSE 344 Midterm. Friday, February 8, 2013, 9:30-10:20. Question Points Score Total: 100

Querying Microsoft SQL Server 2014

McGill April 2009 Final Examination Database Systems COMP 421

CS-245 Database System Principles

CSE 413 Midterm, May 6, 2011 Sample Solution Page 1 of 8

CSE 562 Midterm Solutions

EECS 647: Introduction to Database Systems

Problem Description Earned Max 1 CSS 20 2 PHP 20 3 SQL 10 TOTAL Total Points 50

CSE 414 Midterm. April 28, Name: Question Points Score Total 101. Do not open the test until instructed to do so.

University of California, Berkeley. CS 186 Introduction to Databases, Spring 2014, Prof. Dan Olteanu MIDTERM

Midterm 1: CS186, Spring I. Storage: Disk, Files, Buffers [11 points] cs186-

INFO 1103 Homework Project 2

Administrivia. CS 133: Databases. Cost-based Query Sub-System. Goals for Today. Midterm on Thursday 10/18. Assignments

CS425 Midterm Exam Summer C 2012

CSE 444 Midterm Exam

[AVNICF-MCSASQL2012]: NICF - Microsoft Certified Solutions Associate (MCSA): SQL Server 2012

CSE 344 Midterm. Monday, November 9th, 2015, 9:30-10:20. Question Points Score Total: 70

(a) Explain how physical data dependencies can increase the cost of maintaining an information

Relational Algebra. Ron McFadyen ACS

DSC 201: Data Analysis & Visualization

CSE 190D Spring 2017 Final Exam

Fall, 2004 CIS 550. Database and Information Systems Midterm Solutions

CSE 123: Computer Networks Fall Quarter, 2017 MIDTERM EXAM

CSE 344 Midterm Nov 1st, 2017, 1:30-2:20

IMPORTANT: Circle the last two letters of your class account:

Querying Data with Transact-SQL

CSE373 Fall 2013, Final Examination December 10, 2013 Please do not turn the page until the bell rings.

CSE 444 Midterm Exam

Bachelor in Information Technology (BIT) O Term-End Examination

CS 4320/5320 Homework 2

CS 338: Computer Applications in Business: Databases

Midterm 1: CS186, Spring I. Storage: Disk, Files, Buffers [11 points] SOLUTION. cs186-

Schema And Draw The Dependency Diagram

MCA (Revised) Term-End Examination June, 2013 MCS-023 : DATABASE MANAGEMENT SYSTEMS. Time : 3 hours Maximum Marks : 100 (VVeightage 75%)

Midterm 1: CS186, Spring 2015

1. Consider the following functional dependencies, to be used in the analysis of a database design for the Furman Air enterprise of the first exam:

1 (10) 2 (8) 3 (12) 4 (14) 5 (6) Total (50)

Top 88 Question Asked in Part I of MIS 150 EXAM #1 (Chapter 1-4, Appendix C) Exams questions gathered from old tests dating back to Fall 2000

Graphs: A graph is a data structure that has two types of elements, vertices and edges.

Assignment Grading Rubric

CSE 190D Spring 2017 Final Exam Answers

University of California, Berkeley. (2 points for each row; 1 point given if part of the change in the row was correct)

origin destination duration New York London 415 Shanghai Paris 760 Istanbul Tokyo 700 New York Paris 435 Moscow Paris 245 Lima New York 455

Computer Science Engineering Sample Papers

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

CSE 414 Midterm. Friday, April 29, 2016, 1:30-2:20. Question Points Score Total: 100

DATABASE PERFORMANCE AND INDEXES. CS121: Relational Databases Fall 2017 Lecture 11

Midterm. You have two and a half hours to complete this exam (but you shouldn t need it).

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2008 Quiz I

Extending Keyword Search to Metadata in Relational Database

CS 222/122C Fall 2016, Midterm Exam

CSE 473 Introduction to Computer Networks. Midterm Exam Review

Transcription:

CSE 530 Midterm Exam Name: (Print CLEARLY) Question Points Possible Points Earned 1 25 2 10 3 20 4 20 5 15 Total 90 1

Question 1 Heap Files Suppose we want to create a heap file with a page size of 512 bytes. The tuples we wish to store in this heap page are 16 bytes long. a.) (3 points) How many tuples will fit on a single heap page? b.) (3 points) What will the size of the heap page header be, in bytes? c.) (5 points) Explain why heap pages are a necessary part of the heap file structure why do heap pages exist? 2

The heap file implementation we discussed in class and used for lab 1 is not the only way that heap files are implemented. One variation of a heap file does not have a header at all. Instead, it simply inserts each new tuple at the end of the heap file, on the very last page. To delete a record, the heap file is searched until the desired record is found and then removed. d.) (7 points) While removing the header makes it seem as though it will lead to a more efficient use of space, that is not always true. Describe a situation when using a heap file without a header would lead to a lead to a less efficient use of space than a heap file with a header. e.) (7 points)which implementation of a heap file will be more efficient when searching for tuples (i.e. a relational select operation)? Explain how you know. 3

Question 2 SQL Queries You are given the following table definitions: Airport Airport_ID City State Flight Flight_ID Departure_Airport_ID Arrival_Airport_ID Note that in this database, both the Departure_Airport_ID and Arrival_Airport_ID columns from the Flight table are foreign keys that are linked to the Airport_ID column of the Airport table. The underlined columns indicate the primary keys of each table. While no data is shown, you should assume that each table is filled with a large amount of flight data. a.) (5 points) Write a query that will show the total number of flights that are departing from each city. Your results should include the name of each city in the database, as well as the number of flights departing from that city. b.) (5 points) Write a query that lists the flight IDs of all of the flights that have arrived in the state of Missouri. 4

Question 3 Query Trees and Optimization (10 points) Construct a query tree for the following query. Your tree does not need to be optimized. SELECT Title, Developer, Platform FROM VideoGame JOIN Developer ON VideoGame.Developer_ID = Developer.DeveloperID WHERE Year = 1989 5

(5 points) One of the steps of the optimization heuristic presented in class states that we should perform more restrictive select operations as early as possible. Explain what effect this rule has on the performance of joins, especially for queries that contain multiple joins. (5 points) Describe one way that metadata can be used to optimize query performance. 6

Question 4 B+ Trees Construct a B+ tree with p inner = 4 and p leaf = 2 that inserts the following values in order: 8, 6, 7, 5, 3, 0, 9, 10, 4, 2 For maximum partial credit, please show your work. (20 points) 7

Question 5 ER Diagrams You are given the following ER diagram: a.) (4 points) Once this database is implemented, how many tables will it contain? Explain how you know. b.) (6 points) Write a SQL statement that will create the Award table. This statement should create the table as well as create the relationship between the Award and Movie table (you can assume that the Movie table already exists). 8

c.) (5 points) Actors sometimes win awards, too, however this ER diagram is not currently tracking this information. Explain how we could change the design of this database to include awards that have been won by actors and actresses. You do not need to modify the above ER diagram to receive credit for this problem, but you may do so if it will help you answer this question. 9