CSCI-6421 Final Exam York University Fall Term 2004
|
|
- Samuel Anderson
- 5 years ago
- Views:
Transcription
1 6 December 2004 CS-6421 Final Exam p. 1 of 7 CSCI-6421 Final Exam York University Fall Term 2004 Due: 6pm Wednesday 15 December 2004 Last Name: First Name: Instructor: Parke Godfrey Exam Duration: take home Term: Fall 2004 Your assignment, should you choose to accept it, is to answer the following questions to the best of your knowledge. Try to keep answers brief and to the point, but be precise and be careful. Write any assumptions you make along with your answers, whenever necessary. The exam is open-book and open-notes. The exam is take-home. There are ten main questions. Each is worth five points. #1 and #10 are compulsary. You must do the compulsaries and five others of your choosing, for seven questions in all. So the test is 35 points in total. You may do an additional (eighth) problem. If so, I will drop the non-compulsary with the lowest score. If you do more than eight (the two compulsaries plus more than six others), I shall randomly dispense non-compulsaries until I have eight to grade!
2 6 December 2004 CS-6421 Final Exam p. 2 of 7 For the logicians: 1. (5 points) Datalog. What s that again, in English this time!? Consider (again) the schema Movie(title, director, year) Cast(actor, title, role) FK (title) refs Movie Consider the following rules which are used in the queries to follow. castin (A, M) cast (A, M, R). actor (A) castin (A, M). castout (A, M) castin (A, M), castin (A, N), M N. dicast (A, M) cast (A, M, R 1 ), cast (A, M, R 2 ), R 1 R 2. For each of the following Datalog queries, restate the query in concise, understandable English. a. query (A) dicast (A, M). b. query (A) actor (A), movie (M, D, Y), notcastin (A, M). actor (A), not query (A). c. query (A) castin (A, M 1 ), castout (A, M 2 ). d. query (A) castin (A, M), notcastout (A, M). e. query (A) castin (A, M), notdicast (A, M), notcastout (A, M). 2. (5 points) Negation Semantics. A somewhat stable model. a. (3 points) Is there a Datalog database P such that p (a positive atomic consequence) is a consequence of P with respect to the stable model semantics, but p is not a consequence of P with respect to the well founded semantics, and P has a unique stable model? If this cannot happen, explain why not. Otherwise, provide an example. b. (2 points) Is there a Datalog database P such that p (a positive atomic consequence) is a consequence of P with respect to the well founded semantics, but p is not a consequence of P with respect to the stable model semantics? (Note that when P has no stable models, everything is a consequence of P with respect to the stable model semantics.) If this cannot happen, explain why not. Otherwise, provide an example.
3 6 December 2004 CS-6421 Final Exam p. 3 of 7 3. (5 points) Datalog to SQL. To the max! Consider the Datalog rules maximalp (X 1,..., X k ) p (X 1,..., X k ), nottrumpedp (X 1,..., X k ). trumpedp (X 1,..., X k ) p (X 1,..., X k ), p (Y 1,..., Y k ), greater ([Y 1,...,Y k ], [X 1,...,X k ]). greater ([X Xs], [Y Ys]) X > Y, greatereq (Xs, Ys). greater ([X Xs], [X Ys]) greater (Xs, Ys). greatereq ([X Xs ], [X Ys]) X Y, greatereq (Xs, Ys). greatereq ([], []). and the query maximalp (X 1,..., X k ). a. (2 points) What does this query evaluate? b. (3 points) Write the query in SQL. 4. (5 points) Containment. Stop being repetitious and redundant. A rule R (defining predicate r) is logically redundant with respect to database DB if any query Q possible with respect to DB has the same answers whether evaluated against DB or against DB {R}. (Assume r has other rules defining it already in DB and that R is an additional rule for r.) a. (1 point) Consider the DB and R p (X, Y) e (X, A), e (A, B), e (B, Y). e (X, Y) f (X, Y). e (X, Y) f (Y, X). f (a, b). f (a, f). f (f, h). f (b, c). f (b, g). f (f, i). f (c, d). f (c, h). f (g, i). f (d, e). f (d, i). f (g, j). f (e, a). f (e, j). f (h, j). p (X, Y) e (X, Y). Is R logically redundant with respect to DB? Why or why not? b. (3 points) Describe a general method to determine whether a rule R is redundant with respect to DB. c. (1 point) Is your procedure decidable? Why or why not?
4 6 December 2004 CS-6421 Final Exam p. 4 of 7 5. (5 points) Expressiveness. Express yourself! a. One could, albeit with much effort, code up chess via the win and recursion-throughnegation like we did for the stones game in class. If our chess program is locally stratified, then this means that there is a perfect model, and everything is assigned true or false. This means win ( beginning board state )is either true or false. So it would be known that white (the first player) could always win playing a perfect game or that black (the second player) could always win playing a perfect game. Does this mean that a game of chess is necessarily winnable by the perfect white player or the perfect black player? Why or why not? b. Are there any types of queries that can be expressed in SQL but not Datalog? c. Are there any types of queries that can be expressed in SQL but not Datalog? (Careful.) d. Is Datalog a superset of first-order predicate calculus (logic)? Why or why not? e. Is Datalog interpreted under negation-as-finite-failure, the well founded semantics, or the stable model semantics a subset of first-order predicate calculus (logic)? Why or why not?
5 6 December 2004 CS-6421 Final Exam p. 5 of 7 For the engineers: 6. (5 points) Sequential Reads. Speed it up. Consider each of the join algorithms that we have studied: a. BNLJ (block nested loops join), b. INLJ (index nested loops join), c. HJ (two-pass hash join), d. SMJ (two-pass sort merge join), and e. MJ (merge join, with outer and inner sorted prior). Explain briefly whether sequential reads and writes would be advantageous in each case. Assume that sequential reads are generally not advantageous for filescans of base tables. Base tables become fragmented on disk over time due to inserts and deletes. 7. (5 points) Indexes. In a mess. You have just joined the team at Very Small Databases, Inc., (VSDB). You have been assigned to work with the infamous database expert Dr. Mark Dogfurry. Your first job is to work with him to tune a database being built for the company Geisel & Associates. The Geisel & Associates database includes two tables, Sneech and Whovillian. Dr. Dogfurry tells you the following. For table Sneech, there are the following indexes. 1. A unique clustered hash index on name. 2. An unclustered B+ tree index on specialty + no stars. 3. An unclustered B+ tree index on birthdate + hometown. 4. A clustered B+ tree index on birthdate + hometown + school level. For table Whovillian, there are the following indexes. 5. A unique unclustered hash index on name. 6. A unique unclustered hash index on age. 7. A unique hash index on address + name. 8. An unclustered B+ tree index on grade. The order of the attributes as listed for the composite index keys (for example, birthdate + hometown) is important: this is the order of the attributes by which the index is built. The information that Dr. Dogfurry has given you is suspect. That is, there is reason to believe that there are mistakes in what he has told you. State five distinct problems with the above information. Explain why each is a problem: that it is an impossibility; that it is useless; that it is redundant; and so forth.
6 6 December 2004 CS-6421 Final Exam p. 6 of 7 8. (5 points) Index Mechanics. Always losing your keys? a. (3 points) A linear hash has just been started. The linear hashed file currently just has one bucket (primary page). The current hash function pair is h 0,h 1. Here, h 0 masks for zero (!) right-hand bits from the hashed key, and so always returns bucket address 0. Hash function h 1 masks for 1 right-hand bit, h 2 for 2, and so forth. Assume that each page can hold two entries. The file currently has one entry of 21 ( ) next A split should be triggered whenever an overflow page is created. Show the linear hashed file after each of the following inserts: 30 ( ), 18 ( ), 35 ( ), and 17 ( ), and 13 ( ). The insertions are cumulative, so your final hashed file should contain 30, 18, 35, 17, and 13. b. (2 points) Consider an extendible hash index that has 2 10 directory slots. What can you say about how many buckets so data-record pages if alternative #1, data-entry pages if alternative #2 or #3 that the index has? 9. (5 points) Joins. Is it further to New York or by train? Consider the schema R(A, B) and S(C, A). The underlined attributes designate the primary key. S has a foreign key cast on R through A, and S.A is not nullable. Consider the query select * from R, S where R.A = S.A; There is a clustered tree index on R.A and an unclustered tree index on S.A. Each index is of alternative #2 and has two layers of index pages. So the third layer in each case consists of the data-entry pages. Let N T generically denote the number of records in table T, and V T.C denote the number of distinct values found in column C of table T. N R N S. That is, the number of records in table R is much less than the number of records in table S. a. (3 points) Which INLJ (index nested loops) join is better for the query? A. R as the outer, using the unclustered index on S.A for probing. B. S as the outer, using the clustered index on R.A for probing. Justify your claim. (Use N R, N S, V R.A, etc. in your argument.) b. (2 points) Would employing an INL join for this query make sense? Why or why not?
7 6 December 2004 CS-6421 Final Exam p. 7 of (5 points) Query Optimization. Simply the best plan available. Schema: Statistics: Employee(eid, name, did, jobcat, salary) JobBenefits(title, jobcat, since) FK (title) refs Benefit Benefit(title, description, cost) Employee: 100,000 records on 2,000 pages jobcat: 500 distinct values did (department ID): 100 distinct values (department #13 is accounting) JobBenefits: 3,500 records on 70 pages title: 200 distinct values jobcat: 500 distinct values (same values as in Employee.jobCat) Benefit: 200 records on 20 pages cost: ranges over $500,...,$10,500 Indexes: Employee: Clustered tree index on eid. (Index pages two deep; third layer, data-entry pages.) Unclustered tree index on did, jobcat. (Index pages two deep; third layer, data-entry pages.) JobBenefits: Clustered tree index on jobcat, title. (Index page one deep; second layer, data-entry pages.) Benefit: Query: Hash index on title. select name, eid, B.title from Employee E, JobBenefits J, Benefit B where E.jobCat = J.jobCat and J.title = B.title and E.did = 13 and B.cost > 10000; You have an allocation of twelve buffer frames. a. (1 point) Estimate the cardinality (the resulting number of records) of the query. b. (4 points) Devise a good query plan for the query. Show the query tree, fully annotated with the chosen algorithms and access paths. Estimate the cost of your plan. For full credit, you should have a plan that costs less than 1,500 I/O s.
COSC-4411(M) Midterm #1
COSC-4411(M) Midterm #1 Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Winter 2004 Answer the following questions to the best of your knowledge.
More informationCSE-6490B Final Exam
February 2009 CSE-6490B Final Exam Fall 2008 p 1 CSE-6490B Final Exam In your submitted work for this final exam, please include and sign the following statement: I understand that this final take-home
More informationCOSC-4411(M) Midterm #1
12 February 2004 COSC-4411(M) Midterm #1 & answers p. 1 of 10 COSC-4411(M) Midterm #1 Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Winter 2004
More informationLassonde School of Engineering Winter 2016 Term Course No: 4411 Database Management Systems
Lassonde School of Engineering Winter 2016 Term Course No: 4411 Database Management Systems Last Name: First Name: Student ID: 1. Exam is 2 hours long 2. Closed books/notes Problem 1 (6 points) Consider
More informationEECS-3421a: Test #2 Queries
2016 November 9 EECS-3421a: Test #2 w/ answers 1 of 16 EECS-3421a: Test #2 Queries Electrical Engineering & Computer Science Lassonde School of Engineering York University Family Name: Given Name: Student#:
More informationUniversity of Waterloo Midterm Examination Sample Solution
1. (4 total marks) University of Waterloo Midterm Examination Sample Solution Winter, 2012 Suppose that a relational database contains the following large relation: Track(ReleaseID, TrackNum, Title, Length,
More informationCSE-3421M Test #2. Queries
14 March 2013 CSE-3421M Test #2 w/ answers p. 1 of 16 CSE-3421M Test #2 Queries Family Name: Given Name: Student#: CS&E Account: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Winter 2013 Answer
More informationCSE-3421 Test #1 Design
2 April 2009 CSE-3421 Test #1 (corrected) w/ answers p. 1 of 10 CSE-3421 Test #1 Design Family Name: Given Name: Student#: CS Account: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: winter 2009
More informationIMPORTANT: Circle the last two letters of your class account:
Fall 2001 University of California, Berkeley College of Engineering Computer Science Division EECS Prof. Michael J. Franklin FINAL EXAM CS 186 Introduction to Database Systems NAME: STUDENT ID: IMPORTANT:
More informationUniversity of California, Berkeley. CS 186 Introduction to Databases, Spring 2014, Prof. Dan Olteanu MIDTERM
University of California, Berkeley CS 186 Introduction to Databases, Spring 2014, Prof. Dan Olteanu MIDTERM This is a closed book examination sided). but you are allowed one 8.5 x 11 sheet of notes (double
More informationUniversity of Waterloo Midterm Examination Solution
University of Waterloo Midterm Examination Solution Winter, 2011 1. (6 total marks) The diagram below shows an extensible hash table with four hash buckets. Each number x in the buckets represents an entry
More informationCSC 261/461 Database Systems Lecture 19
CSC 261/461 Database Systems Lecture 19 Fall 2017 Announcements CIRC: CIRC is down!!! MongoDB and Spark (mini) projects are at stake. L Project 1 Milestone 4 is out Due date: Last date of class We will
More informationDatabase Management Systems (COP 5725) Homework 3
Database Management Systems (COP 5725) Homework 3 Instructor: Dr. Daisy Zhe Wang TAs: Yang Chen, Kun Li, Yang Peng yang, kli, ypeng@cise.uf l.edu November 26, 2013 Name: UFID: Email Address: Pledge(Must
More informationCSE 344 MAY 7 TH EXAM REVIEW
CSE 344 MAY 7 TH EXAM REVIEW EXAMINATION STATIONS Exam Wednesday 9:30-10:20 One sheet of notes, front and back Practice solutions out after class Good luck! EXAM LENGTH Production v. Verification Practice
More informationOutline. Database Management and Tuning. Outline. Join Strategies Running Example. Index Tuning. Johann Gamper. Unit 6 April 12, 2012
Outline Database Management and Tuning Johann Gamper Free University of Bozen-Bolzano Faculty of Computer Science IDSE Unit 6 April 12, 2012 1 Acknowledgements: The slides are provided by Nikolaus Augsten
More informationQuery Processing. Introduction to Databases CompSci 316 Fall 2017
Query Processing Introduction to Databases CompSci 316 Fall 2017 2 Announcements (Tue., Nov. 14) Homework #3 sample solution posted in Sakai Homework #4 assigned today; due on 12/05 Project milestone #2
More informationCS 564 Final Exam Fall 2015 Answers
CS 564 Final Exam Fall 015 Answers A: STORAGE AND INDEXING [0pts] I. [10pts] For the following questions, clearly circle True or False. 1. The cost of a file scan is essentially the same for a heap file
More informationCSE344 Midterm Exam Winter 2017
CSE344 Midterm Exam Winter 2017 February 13, 2017 Please read all instructions (including these) carefully. This is a closed book exam. You are allowed a one page cheat sheet that you can write on both
More informationTotalCost = 3 (1, , 000) = 6, 000
156 Chapter 12 HASH JOIN: Now both relations are the same size, so we can treat either one as the smaller relation. With 15 buffer pages the first scan of S splits it into 14 buckets, each containing about
More information192 Chapter 14. TotalCost=3 (1, , 000) = 6, 000
192 Chapter 14 5. SORT-MERGE: With 52 buffer pages we have B> M so we can use the mergeon-the-fly refinement which costs 3 (M + N). TotalCost=3 (1, 000 + 1, 000) = 6, 000 HASH JOIN: Now both relations
More informationCSE 414 Midterm. Friday, April 29, 2016, 1:30-2:20. Question Points Score Total: 100
CSE 414 Midterm Friday, April 29, 2016, 1:30-2:20 Name: Question Points Score 1 50 2 20 3 30 Total: 100 This exam is CLOSED book and CLOSED devices. You are allowed ONE letter-size page with notes (both
More informationIMPORTANT: Circle the last two letters of your class account:
Spring 2011 University of California, Berkeley College of Engineering Computer Science Division EECS MIDTERM I CS 186 Introduction to Database Systems Prof. Michael J. Franklin NAME: STUDENT ID: IMPORTANT:
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
CHAPTER 19 Query Optimization Introduction Query optimization Conducted by a query optimizer in a DBMS Goal: select best available strategy for executing query Based on information available Most RDBMSs
More informationCS 245 Midterm Exam Winter 2014
CS 245 Midterm Exam Winter 2014 This exam is open book and notes. You can use a calculator and your laptop to access course notes and videos (but not to communicate with other people). You have 70 minutes
More informationSpring 2013 CS 122C & CS 222 Midterm Exam (and Comprehensive Exam, Part I) (Max. Points: 100)
Spring 2013 CS 122C & CS 222 Midterm Exam (and Comprehensive Exam, Part I) (Max. Points: 100) Instructions: - This exam is closed book and closed notes but open cheat sheet. - The total time for the exam
More informationQuery Processing & Optimization. CS 377: Database Systems
Query Processing & Optimization CS 377: Database Systems Recap: File Organization & Indexing Physical level support for data retrieval File organization: ordered or sequential file to find items using
More informationCS222P Fall 2017, Final Exam
STUDENT NAME: STUDENT ID: CS222P Fall 2017, Final Exam Principles of Data Management Department of Computer Science, UC Irvine Prof. Chen Li (Max. Points: 100 + 15) Instructions: This exam has seven (7)
More informationImplementing Relational Operators: Selection, Projection, Join. Database Management Systems, R. Ramakrishnan and J. Gehrke 1
Implementing Relational Operators: Selection, Projection, Join Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Readings [RG] Sec. 14.1-14.4 Database Management Systems, R. Ramakrishnan and
More informationAnnouncement. Reading Material. Overview of Query Evaluation. Overview of Query Evaluation. Overview of Query Evaluation 9/26/17
Announcement CompSci 516 Database Systems Lecture 10 Query Evaluation and Join Algorithms Project proposal pdf due on sakai by 5 pm, tomorrow, Thursday 09/27 One per group by any member Instructor: Sudeepa
More informationMASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2009 Quiz I Solutions
Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.830 Database Systems: Fall 2009 Quiz I Solutions There are 15 questions and 12 pages in this quiz booklet.
More informationUniversity of California, Berkeley. (2 points for each row; 1 point given if part of the change in the row was correct)
University of California, Berkeley CS 186 Intro to Database Systems, Fall 2012, Prof. Michael J. Franklin MIDTERM II - Questions This is a closed book examination but you are allowed one 8.5 x 11 sheet
More informationL20: Joins. CS3200 Database design (sp18 s2) 3/29/2018
L20: Joins CS3200 Database design (sp18 s2) https://course.ccs.neu.edu/cs3200sp18s2/ 3/29/2018 143 Announcements! Please pick up your exam if you have not yet (at end of class) We leave some space at the
More information6 February 2014 CSE-3421M Test #1 w/ answers p. 1 of 14. CSE-3421M Test #1. Design
6 February 2014 CSE-3421M Test #1 w/ answers p. 1 of 14 CSE-3421M Test #1 Design Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Winter 2014 Answer
More informationCSE 344 Midterm Nov 1st, 2017, 1:30-2:20
1 SQL 1. (36 points) Acompanymaintainsadatabaseabouttheiremployeesandprojectswiththefollowing schema. Employee(eid, name, salary) Project(pid, title, budget) WorksOn(eid, pid, year) WorksOn records which
More informationCMPS 181, Database Systems II, Final Exam, Spring 2016 Instructor: Shel Finkelstein. Student ID: UCSC
CMPS 181, Database Systems II, Final Exam, Spring 2016 Instructor: Shel Finkelstein Student Name: Student ID: UCSC Email: Final Points: Part Max Points Points I 15 II 29 III 31 IV 19 V 16 Total 110 Closed
More informationQuery Processing and Advanced Queries. Query Optimization (4)
Query Processing and Advanced Queries Query Optimization (4) Two-Pass Algorithms Based on Hashing R./S If both input relations R and S are too large to be stored in the buffer, hash all the tuples of both
More informationINSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados
-------------------------------------------------------------------------------------------------------------- INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados Exam 1 16 June 2014
More informationQueen s University Faculty of Arts and Science School of Computing CISC 432* / 836* Advanced Database Systems
HAND IN Queen s University Faculty of Arts and Science School of Computing CISC 432* / 836* Advanced Database Systems Final Examination December 14, 2002 Instructor: Pat Martin Instructions: 1. This examination
More informationCS 461: Database Systems. Final Review. Julia Stoyanovich
CS 461: Database Systems Final Review (stoyanovich@drexel.edu) Final exam logistics When: June 6, in class The same format as the midterm: open book, open notes 2 hours in length The exam is cumulative,
More informationCSE-3421: Exercises. Winter 2011 CSE-3421 Exercises p. 1 of 18
Winter 2011 CSE-3421 Exercises p. 1 of 18 CSE-3421: Exercises 1. Independence Answer #1.2 (page 23) from the textbook: What is logical data independence and why is it important? A short paragraph is sufficient.
More informationParser. Select R.text from Report R, Weather W where W.image.rain() and W.city = R.city and W.date = R.date and R.text.
Select R.text from Report R, Weather W where W.image.rain() and W.city = R.city and W.date = R.date and R.text. Lifecycle of a Query CSE 190D Database System Implementation Arun Kumar Query Query Result
More informationAnnouncements. What is Datalog? Why Do We Learn Datalog? Database Systems CSE 414. Midterm. Datalog. Lecture 13: Datalog (Ch
Announcements Database Systems CSE 414 Lecture 13: Datalog (Ch 5.3 5.4) HW3 is due Tomorrow WQ4 moved to Sunday it will be useful review for the midterm finish it early if you have time Midterm on Friday,
More informationCSE 344 Midterm. Wednesday, February 19, 2014, 14:30-15:20. Question Points Score Total: 100
CSE 344 Midterm Wednesday, February 19, 2014, 14:30-15:20 Name: Question Points Score 1 30 2 50 3 12 4 8 Total: 100 This exam is open book and open notes but NO laptops or other portable devices. You have
More informationIntroduction to Query Processing and Query Optimization Techniques. Copyright 2011 Ramez Elmasri and Shamkant Navathe
Introduction to Query Processing and Query Optimization Techniques Outline Translating SQL Queries into Relational Algebra Algorithms for External Sorting Algorithms for SELECT and JOIN Operations Algorithms
More informationImplementing Joins 1
Implementing Joins 1 Last Time Selection Scan, binary search, indexes Projection Duplicate elimination: sorting, hashing Index-only scans Joins 2 Tuple Nested Loop Join foreach tuple r in R do foreach
More informationCS-245 Database System Principles
CS-245 Database System Principles Midterm Exam Summer 2001 SOLUIONS his exam is open book and notes. here are a total of 110 points. You have 110 minutes to complete it. Print your name: he Honor Code
More informationCourse No: 4411 Database Management Systems Fall 2008 Midterm exam
Course No: 4411 Database Management Systems Fall 2008 Midterm exam Last Name: First Name: Student ID: Exam is 80 minutes. Open books/notes The exam is out of 20 points. 1 1. (16 points) Multiple Choice
More informationDatabase Systems CSE 414
Database Systems CSE 414 Lecture 15-16: Basics of Data Storage and Indexes (Ch. 8.3-4, 14.1-1.7, & skim 14.2-3) 1 Announcements Midterm on Monday, November 6th, in class Allow 1 page of notes (both sides,
More informationCS 222/122C Fall 2016, Midterm Exam
STUDENT NAME: STUDENT ID: Instructions: CS 222/122C Fall 2016, Midterm Exam Principles of Data Management Department of Computer Science, UC Irvine Prof. Chen Li (Max. Points: 100) This exam has six (6)
More information14 October 2015 EECS-3421A Test #1 p. 1 of 14. EECS-3421A Test #1. Design
14 October 2015 EECS-3421A Test #1 p. 1 of 14 EECS-3421A Test #1 Design Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Fall 2015 Answer the following
More informationOutline. Database Tuning. Join Strategies Running Example. Outline. Index Tuning. Nikolaus Augsten. Unit 6 WS 2014/2015
Outline Database Tuning Nikolaus Augsten University of Salzburg Department of Computer Science Database Group 1 Examples Unit 6 WS 2014/2015 Adapted from Database Tuning by Dennis Shasha and Philippe Bonnet.
More informationProblem Set 2 Solutions
6.893 Problem Set 2 Solutons 1 Problem Set 2 Solutions The problem set was worth a total of 25 points. Points are shown in parentheses before the problem. Part 1 - Warmup (5 points total) 1. We studied
More informationDatabase Management Systems (CS 601) Assignments
Assignment Set I : Introduction (CO1) DBA s are the highest paid professionals among other database employees -Justify. What makes a DBA different from the other SQL developers? Why is the mapping between
More informationCSE 414 Midterm. April 28, Name: Question Points Score Total 101. Do not open the test until instructed to do so.
CSE 414 Midterm April 28, 2017 Name: Question Points Score 1 35 2 15 3 30 4 21 Total 101 Do not open the test until instructed to do so. The test is closed book and electronics. You are allowed only one
More informationCIS 550 Fall Final Examination. December 13, Name: Penn ID:
CIS 550 Fall 2013 Final Examination December 13, 2013 Name: Penn ID: Email: My signature below certifies that I have complied with the University of Pennsylvania's Code of Academic Integrity in completing
More informationMidterm Review CS634. Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke
Midterm Review CS634 Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke Coverage Text, chapters 8 through 15 (hw1 hw4) PKs, FKs, E-R to Relational: Text, Sec. 3.2-3.5, to pg.
More informationIntermediate SQL ( )
CSL 451 Introduction to Database Systems Intermediate SQL (4.1-4.4) Department of Computer Science and Engineering Indian Institute of Technology Ropar Narayanan (CK) Chatapuram Krishnan! Summary Join
More informationCS 245 Midterm Exam Solution Winter 2015
CS 245 Midterm Exam Solution Winter 2015 This exam is open book and notes. You can use a calculator and your laptop to access course notes and videos (but not to communicate with other people). You have
More informationCS450 - Database Concepts Fall 2015
CS450 - Database Concepts Fall 2015 Instructor: Dr. Jessica Lin Project Assignment General. Your project is to design and implement a database for an online movie rental company like Netflix (for this
More informationMANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)
Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 6 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA
More informationMASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2015 Quiz I
Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.830 Database Systems: Fall 2015 Quiz I There are 12 questions and 13 pages in this quiz booklet. To receive
More informationLecture 8 Index (B+-Tree and Hash)
CompSci 516 Data Intensive Computing Systems Lecture 8 Index (B+-Tree and Hash) Instructor: Sudeepa Roy Duke CS, Fall 2017 CompSci 516: Database Systems 1 HW1 due tomorrow: Announcements Due on 09/21 (Thurs),
More informationQuery Processing: The Basics. External Sorting
Query Processing: The Basics Chapter 10 1 External Sorting Sorting is used in implementing many relational operations Problem: Relations are typically large, do not fit in main memory So cannot use traditional
More informationRelational Model History. COSC 304 Introduction to Database Systems. Relational Model and Algebra. Relational Model Definitions.
COSC 304 Introduction to Database Systems Relational Model and Algebra Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Relational Model History The relational model was
More informationCSE 444, Winter 2011, Final Examination. 17 March 2011
Name: CSE 444, Winter 2011, Final Examination 17 March 2011 Rules: Open books and open notes. No laptops or other mobile devices. Please write clearly and explain your reasoning You have 1 hour 50 minutes;
More informationExamples of Physical Query Plan Alternatives. Selected Material from Chapters 12, 14 and 15
Examples of Physical Query Plan Alternatives Selected Material from Chapters 12, 14 and 15 1 Query Optimization NOTE: SQL provides many ways to express a query. HENCE: System has many options for evaluating
More informationCSEP 514 Midterm. Tuesday, Feb. 7, 2017, 5-6:20pm. Question Points Score Total: 150
CSEP 514 Midterm Tuesday, Feb. 7, 2017, 5-6:20pm Name: Question Points Score 1 50 2 25 3 50 4 25 Total: 150 This exam is CLOSED book and CLOSED devices. You are allowed ONE letter-size page with notes
More informationLecture #16 (Physical DB Design)
Introduction to Data Management Lecture #16 (Physical DB Design) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v Homework info:
More informationLecture 14. Lecture 14: Joins!
Lecture 14 Lecture 14: Joins! Lecture 14 Announcements: Two Hints You may want to do Trigger activity for project 2. We ve noticed those who do it have less trouble with project! Seems like we re good
More informationFinal Exam Review 2. Kathleen Durant CS 3200 Northeastern University Lecture 23
Final Exam Review 2 Kathleen Durant CS 3200 Northeastern University Lecture 23 QUERY EVALUATION PLAN Representation of a SQL Command SELECT {DISTINCT} FROM {WHERE
More informationSpring 2017 QUERY PROCESSING [JOINS, SET OPERATIONS, AND AGGREGATES] 2/19/17 CS 564: Database Management Systems; (c) Jignesh M.
Spring 2017 QUERY PROCESSING [JOINS, SET OPERATIONS, AND AGGREGATES] 2/19/17 CS 564: Database Management Systems; (c) Jignesh M. Patel, 2013 1 Joins The focus here is on equijoins These are very common,
More informationEndterm Exam (Version B) CS 122A Spring 2017
NAME: SOLUTION SEAT NO.: STUDENT ID: Endterm Exam (Version B) CS 122A Spring 2017 Max. Points: 100 (Please read the instructions carefully) Instructions: - The total time for the exam is 120 minutes; be
More informationComputer Science 425 Fall 2006 Second Take-home Exam Out: 2:50PM Wednesday Dec. 6, 2006 Due: 5:00PM SHARP Friday Dec. 8, 2006
Computer Science 425 Fall 2006 Second Take-home Exam Out: 2:50PM Wednesday Dec. 6, 2006 Due: 5:00PM SHARP Friday Dec. 8, 2006 Instructions: This exam must be entirely your own work. Do not consult with
More informationCSE 344 Final Review. August 16 th
CSE 344 Final Review August 16 th Final In class on Friday One sheet of notes, front and back cost formulas also provided Practice exam on web site Good luck! Primary Topics Parallel DBs parallel join
More informationCSE344 Midterm Exam Fall 2016
CSE344 Midterm Exam Fall 2016 November 7, 2016 Please read all instructions (including these) carefully. This is a closed book exam. You are allowed a one page handwritten cheat sheet. Write your name
More informationCSE 544, Winter 2009, Final Examination 11 March 2009
CSE 544, Winter 2009, Final Examination 11 March 2009 Rules: Open books and open notes. No laptops or other mobile devices. Calculators allowed. Please write clearly. Relax! You are here to learn. Question
More informationQUERY OPTIMIZATION [CH 15]
Spring 2017 QUERY OPTIMIZATION [CH 15] 4/12/17 CS 564: Database Management Systems; (c) Jignesh M. Patel, 2013 1 Example SELECT distinct ename FROM Emp E, Dept D WHERE E.did = D.did and D.dname = Toy EMP
More informationCost Models. the query database statistics description of computational resources, e.g.
Cost Models An optimizer estimates costs for plans so that it can choose the least expensive plan from a set of alternatives. Inputs to the cost model include: the query database statistics description
More informationAlgorithms for Query Processing and Optimization. 0. Introduction to Query Processing (1)
Chapter 19 Algorithms for Query Processing and Optimization 0. Introduction to Query Processing (1) Query optimization: The process of choosing a suitable execution strategy for processing a query. Two
More informationOptimizer Challenges in a Multi-Tenant World
Optimizer Challenges in a Multi-Tenant World Pat Selinger pselinger@salesforce.come Classic Query Optimizer Concepts & Assumptions Relational Model Cost = X * CPU + Y * I/O Cardinality Selectivity Clustering
More informationRelational Query Optimization. Overview of Query Evaluation. SQL Refresher. Yanlei Diao UMass Amherst October 23 & 25, 2007
Relational Query Optimization Yanlei Diao UMass Amherst October 23 & 25, 2007 Slide Content Courtesy of R. Ramakrishnan, J. Gehrke, and J. Hellerstein 1 Overview of Query Evaluation Query Evaluation Plan:
More informationCS 4320/5320 Homework 2
CS 4320/5320 Homework 2 Fall 2017 Due on Friday, 20th of October 2017 at 11:59 pm This assignment is out of 75 points and accounts for 10% of your overall grade. All answers for this homework should be
More informationCS330. Query Processing
CS330 Query Processing 1 Overview of Query Evaluation Plan: Tree of R.A. ops, with choice of alg for each op. Each operator typically implemented using a `pull interface: when an operator is `pulled for
More informationPhysical Design. Elena Baralis, Silvia Chiusano Politecnico di Torino. Phases of database design D B M G. Database Management Systems. Pag.
Physical Design D B M G 1 Phases of database design Application requirements Conceptual design Conceptual schema Logical design ER or UML Relational tables Logical schema Physical design Physical schema
More informationData about data is database Select correct option: True False Partially True None of the Above
Within a table, each primary key value. is a minimal super key is always the first field in each table must be numeric must be unique Foreign Key is A field in a table that matches a key field in another
More informationDatabase Systems External Sorting and Query Optimization. A.R. Hurson 323 CS Building
External Sorting and Query Optimization A.R. Hurson 323 CS Building External sorting When data to be sorted cannot fit into available main memory, external sorting algorithm must be applied. Naturally,
More informationReview. Support for data retrieval at the physical level:
Query Processing Review Support for data retrieval at the physical level: Indices: data structures to help with some query evaluation: SELECTION queries (ssn = 123) RANGE queries (100
More informationINSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados
-------------------------------------------------------------------------------------------------------------- INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados Exam 1 - solution
More informationFundamentals of Database Systems
Fundamentals of Database Systems Assignment: 4 September 21, 2015 Instructions 1. This question paper contains 10 questions in 5 pages. Q1: Calculate branching factor in case for B- tree index structure,
More information1 (10) 2 (8) 3 (12) 4 (14) 5 (6) Total (50)
Student number: Signature: UNIVERSITY OF VICTORIA Faculty of Engineering Department of Computer Science CSC 370 (Database Systems) Instructor: Daniel M. German Midterm Oct 21, 2004 Duration: 60 minutes
More informationDatabase Optimization
Database Optimization June 9 2009 A brief overview of database optimization techniques for the database developer. Database optimization techniques include RDBMS query execution strategies, cost estimation,
More informationUNIVERSITY OF CALIFORNIA College of Engineering Department of EECS, Computer Science Division
UNIVERSITY OF CALIFORNIA College of Engineering Department of EECS, Computer Science Division CS186 Eben Haber Fall 2003 Midterm Midterm Exam: Introduction to Database Systems This exam has seven problems,
More informationPrinciples of Data Management. Lecture #9 (Query Processing Overview)
Principles of Data Management Lecture #9 (Query Processing Overview) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Today s Notable News v Midterm
More informationCSE 444 Final Exam. August 21, Question 1 / 15. Question 2 / 25. Question 3 / 25. Question 4 / 15. Question 5 / 20.
CSE 444 Final Exam August 21, 2009 Name Question 1 / 15 Question 2 / 25 Question 3 / 25 Question 4 / 15 Question 5 / 20 Total / 100 CSE 444 Final, August 21, 2009 Page 1 of 10 Question 1. B+ trees (15
More informationCSE 232A Graduate Database Systems
CSE 232A Graduate Database Systems Arun Kumar Topic 3: Relational Operator Implementations Chapters 12 and 14 of Cow Book Slide ACKs: Jignesh Patel, Paris Koutris 1 Lifecycle of a Query Query Result Query
More informationAdministrivia. CS186 Class Wrap-Up. News. News (cont) Top Decision Support DBs. Lessons? (from the survey and this course)
Administrivia CS186 Class Wrap-Up R&G Chapters 1-28 Lecture 28 Final Exam Friday 12/12, 5pm 8pm, Room 4 LeConte You may have 2 pages of notes, both sides The exam is cumulative Final Exam Review Tuesday
More informationOverview of Storage and Indexing
Overview of Storage and Indexing UVic C SC 370 Dr. Daniel M. German Department of Computer Science July 2, 2003 Version: 1.1.1 7 1 Overview of Storage and Indexing (1.1.1) CSC 370 dmgerman@uvic.ca Overview
More informationCSE 190D Spring 2017 Final Exam
CSE 190D Spring 2017 Final Exam Full Name : Student ID : Major : INSTRUCTIONS 1. You have up to 2 hours and 59 minutes to complete this exam. 2. You can have up to one letter/a4-sized sheet of notes, formulae,
More informationCS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #10: Query Processing
CS 4604: Introduction to Database Management Systems B. Aditya Prakash Lecture #10: Query Processing Outline introduction selection projection join set & aggregate operations Prakash 2018 VT CS 4604 2
More informationOverview of Implementing Relational Operators and Query Evaluation
Overview of Implementing Relational Operators and Query Evaluation Chapter 12 Motivation: Evaluating Queries The same query can be evaluated in different ways. The evaluation strategy (plan) can make orders
More information