Exam. Question: Total Points: Score:

Size: px
Start display at page:

Download "Exam. Question: Total Points: Score:"

Transcription

1 FS 2016 Data Modelling and Databases Date: June 9, 2016 ETH Zurich Systems Group Prof. Gustavo Alonso Exam Name: Question: Total Points: Score: Rules (please read carefully) You have 120 minutes for the exam. Please write your name and Legi number on this cover page. Please write your Legi number on all other pages, including the additional pages you possibly use. Please write your answers on the exam sheets. Use blue or black ink, DO NOT USE red ink. DO NOT USE pencils. Write as clearly as possible and cross out everything that you do not consider to be part of your solution. Answers can be given in either English or German. Remarks Most questions are designed such that the fastest way to solve them is to solve the problem without looking at the answers and only then to find the given answer that corresponds to your solution. We expect it to be slower to try out all combinations of questions and solutions in order to find the ones that match.

2 1 Mapping ER to Relational model (15 points) Consider the ER models 1 to 4 and the relational models (a) to (j) given below. For each ER model, give a relational model that represents it correctly by adding a checkmark ( ) in the corresponding field in the table. Only add one checkmark per ER model. If an ER model is represented by none of the given relational models, then add a checkmark in the none column. ER Model Relational Model none (a) (b) (c) (d) (e) (f) (g) (h) (i) (j) ER model 1 ER model 2 ER model 3 ER model 4

3 B 1 1 C 1 c B 1 N C 1 c b R S s b R S s r N D N d r N D N d ER model 1 ER model 2 B 1 N C 1 c B 1 N C 1 c b r R N S N D s d b r R N is_a N D s d ER model 3 ER model 4 (a) B(b) C(c) D(c,d,s) R(b,c,d,r) (b) B(b) C(c) D(c,d,s) R(b,c,c,r) (c) B(b) C(c) D(c,d,s) R(b,c,c,d,r), extra key: b,d,c (d) B(b) C(c) D(c,d,s) R(b,c,d,r), extra key: b,d (e) B(b) R(b,c,d,r), extra key: b,d S(c,d,s) (f) B(b) C(c) D(c,d,s) R(b,c,c,d,r) (g) B(b) C(c) D(c,d,s) R(b,c,d,r), extra key: b,d (h) B(b) D(c,d) R(b,c,d,r), extra key: b,d S(c,d,s) (i) B(b) C(c) D(c,d,s) R(b,c,d,r) (j) B(b) C(c,d,s) D(d) R(b,c,d,r), extra key: b,d

4

5 2 Relational Algebra (20 points) Consider the following relational schema: Runner ( Name, Birthday, Country ) Run ( Name, Distance, Time ) A runner can run in several runs over different race distances. Thanks to high-speed cameras, two runners cannot have the exact same time in the same run. (a) (10 points) For every description find a matching relational algebra query. For some descriptions there is no matching query. 1. All 100m race distance runs in which only runners from Switzerland (CH ) participated. 2. All runs with a distance greater than 100m in which only runners from Switzerland (CH ) participated. 3. All runs in which only runners from Switzerland (CH ) participated. 4. All 100m race distance runs in which the runners were not from Switzerland (CH ). 5. All runs in which the runners were not from Switzerland (CH ). A) Π Name,Distance,T ime ((Runner σ Country!= CH (Runner)) (Run σ Distance < 100 (Run))) B) Π Name,Distance,T ime ((σ Country = CH (Runner) σ Country!= CH (Runner)) σ Distance!= 100(Run σ Distance < 100 (Run))) C) Π Name,Distance,T ime ((σ Country!= CH (Runner) σ Country = CH (Runner)) σ Distance=100(Run σ Distance > 100 (Run))) D) Π Name,Distance,T ime ((σ Country = CH (Runner) σ Country!= CH (Runner)) σ Distance=100(Run σ Distance < 100 (Run))) E) Π Name,Distance,T ime (σ Country!= CH (Runner) ) σ Distance>100(Run σ Distance < 100 (Run)))

6 Fill in the table below by writing to every description on the left the right query letter on the right. If there is no matching query for a description, put a cross. Description Query (b) (5 points) Which of the following relational algebra expressions finds all runners which only participated in 100m race distance runs. 1. Π Name (σ Distance=100 Run) 2. Π Name (Runner) Π Name (σ Distance=100 Run) 3. Π Name (Run) Π Name (σ Distance=100 Run) 4. Π Name (Run) Π Name (σ Distance!=100 Run) 5. Π Name (Runner) Π Name (σ Distance!=100 Run) (c) (5 points) We now want to find winners for every distance. A winner has the shortest time for a given distance Π Name,Country,Distance,T ime (Runner (Run Π Run1.Name,Run1.Distance,Run1.T ime ( σ Run1.time>Run2.time (ρ Run1 (Run) Name ρ Run2 (Run))))) Π Name,Country,Distance,T ime (Runner (Run Π Run1.Name,Run1.Distance,Run1.T ime ( σ Run1.time>Run2.time (ρ Run1 (Run) Distance ρ Run2 (Run))))) Π Name,Country,Distance,T ime (Runner (Run Π Run1.Name,Run1.Distance,Run1.T ime ( σ Run1.time<Run2.time (ρ Run1 (Run) Name (ρ Run2 (Run)))))) Π Name,Country,Distance,T ime (Runner (Run Π Run1.Name,Run1.Distance,Run1.T ime ( σ Run1.time<Run2.time (ρ Run1 (Run) Distance ρ Run2 (Run))))) Mark all the queries that find the winners with a checkmark ( ) in the table below

7 3 Integrity constraints (15 points) Consider the following schemas: Schema A Schema B Schema C CREATE TABLE tab1 ( tab1_key INT NOT NULL UNIQUE) ; CREATE TABLE tab1 ( tab1_key INT NOT NULL) ; CREATE TABLE tab2 ( tab2_ ref INT NOT NULL) ; CREATE TABLE tab1 ( tab1_key INT NOT NULL UNIQUE) ; CREATE TABLE tab2 ( tab2_ ref INT NOT NULL, FOREIGN KEY ( tab2_ref ) REFERENCES tab1 ( tab1_key ) ) ; Schema D CREATE TABLE tab1 ( tab1_key INT PRIMARY KEY) ; CREATE TABLE tab2 ( tab2_key INT PRIMARY KEY, tab2_ ref INT NOT NULL, CONSTRAINT tab2_fk FOREIGN KEY ( tab2_ref ) REFERENCES tab1 ( tab1_key ) ON DELETE CASCADE ON UPDATE SET NULL) ; CREATE TABLE tab2 ( tab2_ ref INT NOT NULL, FOREIGN KEY ( tab2_ref ) REFERENCES tab1 ( tab1_key ) ON DELETE RESTRICT ON UPDATE NO ACTION) ; Schema E CREATE TABLE tab1 ( tab1_key INT PRIMARY KEY) ; CREATE TABLE tab2 ( tab2_key INT PRIMARY KEY, tab2_ ref INT NOT NULL, FOREIGN KEY ( tab2_ref ) REFERENCES tab1 ( tab1_key ) ON DELETE CASCADE ON UPDATE CASCADE) ; CREATE TABLE tab3 ( tab3_ ref INT, CONSTRAINT tab3_fk FOREIGN KEY ( tab3_ref ) REFERENCES tab2 ( tab2_key ) ON DELETE CASCADE ON UPDATE CASCADE) ; CREATE TABLE tab3 ( tab3_ ref INT, FOREIGN KEY ( tab3_ref ) REFERENCES tab2 ( tab2_key ) ON DELETE SET NULL ON UPDATE CASCADE) ; For schemas A-C, the tables initially have the following content: tab1_key tab2_ref For schemas D and E, the tables initially have the following content: tab1_key tab2_key tab2_ref tab3_ref How many records will each schema hold (summed over all of its tables) after executing individually one of the following statements? Fill in the table below and mark with X an execution error. Statements: I. UPDATE tab2 SET tab2_ref=3 WHERE tab2_ref =1; I I. UPDATE tab1 SET tab1_key=3 WHERE tab1_key =1; I I I. DELETE FROM tab1 WHERE tab1_key =1; I II III A B C D E

8

9 4 SQL I (10 points) Given is the following schema (based on the ZVV timetable) with two tables trips and stop_times where trips contain a list of trips trams make within one day, and stop_times contains all the stops made for every trip: CREATE TABLE trips( trip_id INTEGER NOT NULL PRIMARY KEY, tram_number INTEGER NOT NULL ); CREATE TABLE stop_times( trip_id INTEGER NOT NULL REFERENCES trips(trip_id), stop_sequence INTEGER NOT NULL, stop_name VARCHAR(50) NOT NULL, arrival_time TIMESTAMP NOT NULL, departure_time TIMESTAMP NOT NULL, PRIMARY KEY (trip_id, stop_sequence) ); (a) (5 points) The following queries can be executed on the schema. All queries are functional and return some result. 1. SELECT arrival_time FROM stop_times ORDER BY arrival_time DESC LIMIT 1 2. SELECT MAX(arrival_time) FROM stop_times GROUP BY trip_id 3. SELECT MAX(arrival_time) FROM stop_times JOIN trips USING (trip_id) 4. SELECT MAX(arrival_time) as arrival_time FROM stop_times st, trips t WHERE st.trip_id = t.trip_id GROUP BY t.trip_id ORDER BY arrival_time DESC LIMIT 1 Which of the above queries are equivalent? Two queries are equivalent if they return the same set of results for any data that the database may contain.

10 (b) (5 points) A tram track is defined as a tuple of two consecutive stops (stop_name 1, stop_name 2 ). Two stops are consecutive, if there is a trip (trip_id) which contains both stops and in which their stop_sequence numbers differ by 1, i.e., stop_sequence stop_name2 = 1+stop_sequence stop_name1. Fill in the blanks below to obtain a SQL query that finds the number of trips for each tram track and lists the 10 most frequented tram tracks. SELECT FROM WHERE AND GROUP BY ORDER BY LIMIT 10 st1.stop_name, st2.stop_name, COUNT(*) as tcount stop_times st1, stop_times st2

11 5 SQL II (10 points) Consider two tables: director ( id, name) movie ( title, dir_id, year) Here, Dir_Id is a foreign key and references the Id of the Director. In addition, the Name column of Director is unique. Assume that the database already contains data but no NULL values, and the earliest year for a movie stored in the database is The following five inserts are executed one after the other in the database: 1: INSERT INTO director (id, name) VALUES (10001, Jack Thompson ) 2: INSERT INTO movie (title, dir_id, year) VALUES ( Foo Movie 2, 10001, NULL) 3: INSERT INTO director (id, name) VALUES (10002, Thomas Smith ) 4: INSERT INTO movie (title, dir_id, year) VALUES ( Some Movie, 10001, NULL) 5: INSERT INTO movie (title, dir_id, year) VALUES ( Some Movie 2, NULL, 1999) Following the inserts the three queries below are executed on the database: A. SELECT DISTINCT dir_id FROM movie WHERE year=1999 B. SELECT count(*) FROM movie, director WHERE movie.dir_id=director.id AND director.name LIKE Thom% C. SELECT year, count(title) FROM movies GROUP BY year Using the table below mark which of the three queries (A.,B. and C.) would have a different set of records as a result before and after running the inserts (1 to 5, above). Identify all insert(s) that modify the result. If the result does not change, leave that column empty. Query Result set changes? (Y/N) If yes, these inserts modify it: A. B. C.

12 6 Functional Dependencies & 3NF (15 points) Consider the following relation: R(A, B, C, D, E) with the following functional dependencies (there are no further non-trivial functional dependencies). D AC AB CD BD AE A C ABC E (a) (9 points) For each set of attributes in the table below, decide whether it is a candidate key of R. If it is not a candidate key, add a functional dependency that if added to the functional dependencies above would make it a candidate key. This functional dependency for the potential candidate key X contains X on the left-hand side and all attributes on the right-hand side that are not in the closure of X. For example, if R example = (W, X, Y, Z) with X Y, X becomes a candidate key by adding the dependency X W Z. If there is no such dependency, please write None. Possible Is Cand. Is not Added Functional Candidate Key Key Cand. Key Dependency A D AB BC BD ABC (b) (6 points) Apply the synthesis algorithm to transform the schema into 3NF (loss and dependency preserving). You might need to find the minimal basis of the relation first.

13 7 Query Processing (10 points) In the following query, the query processor creates a join for the R.id = S.id condition and decides to push the inequality (i.e., > instead of = in the join condition) into another join: SELECT * FROM R, S, T WHERE R.id = S.id AND S.id > T.id Furthermore, the following assumptions about the joins and the relations in this query hold: Relation R contains 100k tuples. Relation S contains 2k tuples. Relation T contains 10k tuples. Both joins have a selectivity of 10%. That means that given the Cartesian product of any two join relations, 10% of the tuples get passed on to the next stage. Example: R 1 contains 20 tuples and R 2 contains 10 tuples, therefore the Cartesian product contains 20*10=200 tuples. Out of these, 20 (=10%) match the join condition and are the output of the join. There exist three join implementations that the query processor may apply: Nested-Loop Join (NLJ) Grace Hash Join (GHJ) Sort-Merge Join (SMJ) (a) (4 points) Determine which join R S of the three above implementations has which execution complexity in the following table. Here, R and S denote the number of tuples in table R respectively S. Assume that R > S holds. Complexity O( R + S ) O( R S ) O( R log R ) Join Implementation

14 (b) (6 points) The query processor chooses query plans that have the lowest cost for execution. Assume a cost model where the cost of a join is based on its execution complexity. For example, if the complexity is O( R + S ) with R = 10 and S = 20, then the cost of this join is = 30. Rank the query plans on the left hand side of the table below by execution cost. A rank of 1 means that it has the lowest execution cost. Assume a logarithm of base 10. Justify your decision: Query Plan (R SMJ S) NLJ T R SMJ (S NLJ T) (R GHJ S) NLJ T Rank

15 8 Decomposition Lemma (15 points) Consider the following relational schema Student_Lecture (Student_Id, Student_Name, Student_Address, Lecture, Date_Enrolled, Teaching_Assisant) with the following functional dependencies: Student_Id Student_Name, Student_Address Student_Id, Lecture Date_Enrolled, Teaching_Assistant (a) (3 points) Give an example of a candidate key and a super key of Student_Lecture. (b) (3 points) In which normal form is the relation Student_Lecture? 1NF 2NF 3NF BCNF 4NF (c) (3 points) Which are the functional dependencies which prevent the relation from being in the next higher normal form? Student_Id Student_Name, Student_Address Student_Id, Lecture Date_Enrolled, Teaching_Assistant (d) (6 points) Determine a lossless decomposition of the schema into R 1 and R 2 that preserves all the functional dependencies. Formally prove that the decomposition is lossless.

16 9 Minimal Basis (10 points) Consider the following set S of functional dependencies: (1) A B (2) B C (3) AD E (4) BC D (5) AC DG (6) C E (7) A C (8) CD F Which of the following is a minimal basis of S? If multiple solutions exist, mark all of them. If no solution is correct, choose "None of the above". A B B C A G B D C E CD F A B,E B C BE D AD G CD F A B AE DG B D D E BD C CD F C G B C AC E A B D E CD F None of the above

17 10 Transactions (10 points) For each of the following histories indicate the most strict recoverability class and one possible serialization order if the history is serializable. Operations: r i (A) - Transaction i reads data object A. w i (A) - Transaction i writes to data object A. c i - Transaction i commits. a i - Transaction i aborts. History 1 w 1 (A) r 2 (B) w 1 (B) c 1 w 2 (A) c 2 2 r 2 (A) r 1 (A) w 1 (A) r 1 (B) w 1 (B) w 2 (A) c 1 c 2 3 w 2 (B) w 1 (A) r 2 (A) w 2 (A) c 2 c 1 4 w 3 (A) w 2 (A) c 3 w 1 (A) r 1 (B) w 2 (A) c 2 w 1 (B) 5 w 2 (A) w 1 (A) r 2 (A) w 2 (A) c 1 c 2 6 w 1 (A) w 2 (A) r 2 (A) w 2 (A) c 2 r 1 (A) c 1 7 w 2 (A) r 1 (A) w 3 (A) a 3 c 2 c 1 8 r 2 (C) w 1 (A) r 2 (B) w 1 (B) c 1 w 2 (C) c 2 History Not Recoverable Recoverable ACA Strict Serialization Order Not Serializable

18 11 Commit protocols (20 points) (a) (7 points) The coordinator A and two participants B 1, B 2 run the 2PC protocol. We assume that the coordinator is also a participant. We model the execution of the protocol as a series of events, which are either message events or failure events. We define a message event (P, Q, M) as "P sends the message M to Q", where P, Q {A, B 1, B 2 } and the message M {request, yes, no, abort, commit}, meaning request to vote, voting yes, voting no, request to abort, and request to commit respectively. We define a failure event (P, fail) as the failure of node P. Consider now the following series of events: timestep I II III IV V VI event (A, B 1, request) (B 1, A, yes) (A, B 2, request) (B 2, A, yes) (A, B 1, commit) (A, B 2, commit) For each of the scenarios listed in the table below, replace the event at one of the timesteps I-VI with a different event for the scenario to happen. If there are multiple possibilities, replace the earliest one. Assume that all the actions following the given modification will also change according to the 2PC protocol. Scenario timestep (I-VI) event 2PC aborts, but no node has failed a participant experiences a timeout waiting for a message the coordinator experiences a timeout waiting for a message 2PC blocks a Cooperative Termination Protocol is run and the protocol finishes

19 (b) (7 points) Assume now that the nodes A, B 1 and B 2 from the previous exercise run the 3PC protocol. We include the additional message pre-commit. What is the minimum number of messages that the coordinator has to send before it can fail without preventing the participants to commit? Assume that this is the only failure. Write down such a scenario using the notation introduced above up to the moment when the coordinator fails. Minimum number of coordinator messages: Scenario: (b) (c) (6 points) Considering the scenario from the previous exercise, will the participants eventually terminate if the coordinator does not send the last message? If yes, what will be their decision? If no, why?

20 Empty Pages You can use the following pages at your convenience. If you use them for a solution, mark as clearly as possible to which question your solution belongs and what is part of that solution and what is not.

21

22

Exam. Question: Total Points: Score:

Exam. Question: Total Points: Score: FS 2016 Data Modelling and Databases Date: August 17, 2016 ETH Zurich Systems Group Prof. Gustavo Alonso Exam Name: Question: 1 2 3 4 5 6 7 8 9 10 11 Total Points: 11 11 10 12 9 10 11 10 15 10 8 117 Score:

More information

ETH Zurich Spring Semester Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: August 19, Exam. Questions

ETH Zurich Spring Semester Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: August 19, Exam. Questions Data Modelling and Databases (DMDB) ETH Zurich Spring Semester 2017 Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: August 19, 2017 Assistant(s): Claude Barthels, Eleftherios Sidirourgos, Last

More information

L Information Systems for Engineers. Final exam. ETH Zurich, Autumn Semester 2017 Friday

L Information Systems for Engineers. Final exam. ETH Zurich, Autumn Semester 2017 Friday 252-0834-00L Information Systems for Engineers Final exam ETH Zurich, Autumn Semester 2017 Friday 09.02.2018 First name: Last name: Legi number: Signature: You can fill out the above fields immediately,

More information

Midterm 2: CS186, Spring 2015

Midterm 2: CS186, Spring 2015 Midterm 2: CS186, Spring 2015 Prof. J. Hellerstein You should receive a double-sided answer sheet and an 8-page exam. Mark your name and login on both sides of the answer sheet, and in the blanks above.

More information

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered

More information

Assignment 6: SQL III Solution

Assignment 6: SQL III Solution Data Modelling and Databases Exercise dates: April 12/April 13, 2018 Ce Zhang, Gustavo Alonso Last update: April 16, 2018 Spring Semester 2018 Head TA: Ingo Müller Assignment 6: SQL III Solution This assignment

More information

Exercise 9: Normal Forms

Exercise 9: Normal Forms Data Modelling and Databases (DMDB) ETH Zurich Spring Semester 2017 Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: Assistant(s): Claude Barthels, Eleftherios Sidirourgos, Eliza Last update:

More information

Assignment 3: Relational Algebra Solution

Assignment 3: Relational Algebra Solution Data Modelling and Databases Exercise dates: March 15/March 16, 2018 Ce Zhang, Gustavo Alonso Last update: April 13, 2018 Spring Semester 2018 Head TA: Ingo Müller Assignment 3: Relational Algebra Solution

More information

Assignment 6: SQL III

Assignment 6: SQL III Data Modelling and Databases Exercise dates: April 12/April 13, 2018 Ce Zhang, Gustavo Alonso Last update: April 16, 2018 Spring Semester 2018 Head TA: Ingo Müller Assignment 6: SQL III This assignment

More information

Final Exam. December 5th, :00-4:00. CS425 - Database Organization Results

Final Exam. December 5th, :00-4:00. CS425 - Database Organization Results Name CWID Final Exam December 5th, 2016 2:00-4:00 CS425 - Database Organization Results Please leave this empty! 1.1 1.2 1.3 1.4 1.5 1.6 Sum Instructions Try to answer all the questions using what you

More information

CS 461: Database Systems. Final Review. Julia Stoyanovich

CS 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 information

DBS 2006: 1 st week. DBS 2006: Plan. DB Life-Cycle: Requirement analysis. Data modelling: Conceptual Design. Logical Schema Design

DBS 2006: 1 st week. DBS 2006: Plan. DB Life-Cycle: Requirement analysis. Data modelling: Conceptual Design. Logical Schema Design DBS 006: Plan DBS 006: 1 st week DB Life-Cycle: Data modelling: 1 systematic design of DB 3-3 weeks Physical Schema Design Database usage: access to the stored data using SQL interactively or via application

More information

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

IMPORTANT: Circle the last two letters of your class account: Fall 2002 University of California, Berkeley College of Engineering Computer Science Division EECS Prof. Michael J. Franklin MIDTERM AND SOLUTIONS CS 186 Introduction to Database Systems NAME: Norm L.

More information

SOLUTIONS TO THE FINAL EXAMINATION Introduction to Database Design Spring 2011

SOLUTIONS TO THE FINAL EXAMINATION Introduction to Database Design Spring 2011 SOLUTIONS TO THE FINAL EXAMINATION Introduction to Database Design Spring 2011 IT University of Copenhagen June 7, 2011 1 Database design (25 points) a) b) Figure 1 shows the ER diagram. create table rer

More information

Relational Model, Relational Algebra, and SQL

Relational Model, Relational Algebra, and SQL Relational Model, Relational Algebra, and SQL August 29, 2007 1 Relational Model Data model. constraints. Set of conceptual tools for describing of data, data semantics, data relationships, and data integrity

More information

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

IMPORTANT: 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 information

DATABASE MANAGEMENT SYSTEMS

DATABASE MANAGEMENT SYSTEMS www..com Code No: N0321/R07 Set No. 1 1. a) What is a Superkey? With an example, describe the difference between a candidate key and the primary key for a given relation? b) With an example, briefly describe

More information

Database Management Systems Paper Solution

Database Management Systems Paper Solution Database Management Systems Paper Solution Following questions have been asked in GATE CS exam. 1. Given the relations employee (name, salary, deptno) and department (deptno, deptname, address) Which of

More information

Examination paper for TDT4145 Data Modelling and Database Systems

Examination paper for TDT4145 Data Modelling and Database Systems Department of Computer and Information Science Examination paper for TDT4145 Data Modelling and Database Systems Academic contact during examination: Svein Erik Bratsberg: 99539963 Roger Midtstraum: 99572420

More information

Midterm Exam (Version B) CS 122A Spring 2017

Midterm Exam (Version B) CS 122A Spring 2017 NAME: SOLUTION SEAT NO.: STUDENT ID: Midterm Exam (Version B) CS 122A Spring 2017 Max. Points: 100 (Please read the instructions carefully) Instructions: - The total time for the exam is 80 minutes; be

More information

The University of Nottingham

The University of Nottingham The University of Nottingham SCHOOL OF COMPUTER SCIENCE AND INFORMATION TECHNOLOGY A LEVEL 1 MODULE, SPRING SEMESTER 2006-2007 DATABASE SYSTEMS Time allowed TWO hours Candidates must NOT start writing

More information

EECS-3421a: Test #2 Queries

EECS-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 information

Database Management Systems (Classroom Practice Booklet Solutions)

Database Management Systems (Classroom Practice Booklet Solutions) Database Management Systems (Classroom Practice Booklet Solutions) 2. ER and Relational Model 4 ssn cid 01. Ans: (b) Professor Teaches course 02. Ans: (c) Sol: Because each patient is admitted into one

More information

Homework 3: Relational Database Design Theory (100 points)

Homework 3: Relational Database Design Theory (100 points) CS 122A: Introduction to Data Management Spring 2018 Homework 3: Relational Database Design Theory (100 points) Due Date: Wed, Apr 25 (5:00 PM) Submission All HW assignments should be turned in with a

More information

CSE 444 Midterm Test

CSE 444 Midterm Test CSE 444 Midterm Test Spring 2007 Name: Total time: 50 Question 1 /40 Question 2 /30 Question 3 /30 Total /100 1 1 SQL [40 points] Consider a database of social groups that allows people to become members

More information

Assignment 5: SQL II Solution

Assignment 5: SQL II Solution Data Modelling and Databases Exercise dates: March 29/March 30, 2018 Ce Zhang, Gustavo Alonso Last update: April 12, 2018 Spring Semester 2018 Head TA: Ingo Müller Assignment 5: SQL II Solution This assignment

More information

Examination examples

Examination examples Examination examples Databasteknik (5 hours) 1. Relational Algebra & SQL (4 pts total; 2 pts each). Part A Consider the relations R(A, B), and S(C, D). Of the following three equivalences between expressions

More information

E-R diagrams and database schemas. Functional dependencies. Definition (tuple, attribute, value). A tuple has the form

E-R diagrams and database schemas. Functional dependencies. Definition (tuple, attribute, value). A tuple has the form E-R diagrams and database schemas Functional dependencies Definition (tuple, attribute, value). A tuple has the form {A 1 = v 1,..., A n = v n } where A 1,..., A n are attributes and v 1,..., v n are their

More information

CMSC 461 Final Exam Study Guide

CMSC 461 Final Exam Study Guide CMSC 461 Final Exam Study Guide Study Guide Key Symbol Significance * High likelihood it will be on the final + Expected to have deep knowledge of can convey knowledge by working through an example problem

More information

Relational Model and Relational Algebra A Short Review Class Notes - CS582-01

Relational Model and Relational Algebra A Short Review Class Notes - CS582-01 Relational Model and Relational Algebra A Short Review Class Notes - CS582-01 Tran Cao Son January 12, 2002 0.1 Basics The following definitions are from the book [1] Relational Model. Relations are tables

More information

Data Modelling and Databases Exercise dates: March 22/March 23, 2018 Ce Zhang, Gustavo Alonso Last update: March 26, 2018.

Data Modelling and Databases Exercise dates: March 22/March 23, 2018 Ce Zhang, Gustavo Alonso Last update: March 26, 2018. Data Modelling and Databases Exercise dates: March 22/March 23, 2018 Ce Zhang, Gustavo Alonso Last update: March 26, 2018 Spring Semester 2018 Head TA: Ingo Müller Assignment 4: SQL This assignment will

More information

CSE344 Final Exam Winter 2017

CSE344 Final Exam Winter 2017 CSE344 Final Exam Winter 2017 March 16, 2017 Please read all instructions (including these) carefully. This is a closed book exam. You are allowed two pages of note sheets that you can write on both sides.

More information

6 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 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 information

CSE 190D Spring 2017 Final Exam

CSE 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 information

CS 564 Final Exam Fall 2015 Answers

CS 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 information

Database Systems. Basics of the Relational Data Model

Database Systems. Basics of the Relational Data Model Database Systems Relational Design Theory Jens Otten University of Oslo Jens Otten (UiO) Database Systems Relational Design Theory INF3100 Spring 18 1 / 30 Basics of the Relational Data Model title year

More information

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

IMPORTANT: Circle the last two letters of your class account: Fall 2004 University of California, Berkeley College of Engineering Computer Science Division EECS MIDTERM II CS 186 Introduction to Database Systems Prof. Michael J. Franklin NAME: D.B. Guru STUDENT ID:

More information

Database Management Systems Written Examination

Database Management Systems Written Examination Database Management Systems Written Examination 14.02.2007 First name Student number Last name Signature Instructions for Students Write your name, student number, and signature on the exam sheet. Write

More information

Assignment 7: Integrity Constraints

Assignment 7: Integrity Constraints Data Modelling and Databases Exercise dates: April 19, 2018 Ce Zhang, Gustavo Alonso Last update: April 19, 2018 Spring Semester 2018 Head TA: Ingo Müller Assignment 7: Integrity Constraints This assignment

More information

Homework 6: FDs, NFs and XML (due April 13 th, 2016, 4:00pm, hard-copy in-class please)

Homework 6: FDs, NFs and XML (due April 13 th, 2016, 4:00pm, hard-copy in-class please) Virginia Tech. Computer Science CS 4604 Introduction to DBMS Spring 2016, Prakash Homework 6: FDs, NFs and XML (due April 13 th, 2016, 4:00pm, hard-copy in-class please) Reminders: a. Out of 100 points.

More information

ETH Zurich Spring Semester Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: March 27/March 31, Exercise 5: SQL II.

ETH Zurich Spring Semester Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: March 27/March 31, Exercise 5: SQL II. Data Modelling and Databases (DMDB) ETH Zurich Spring Semester 2017 Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: March Assistant(s): Claude Barthels, Eleftherios Sidirourgos, Last update:

More information

Informationslogistik Unit 5: Data Integrity & Functional Dependency

Informationslogistik Unit 5: Data Integrity & Functional Dependency Informationslogistik Unit 5: Data Integrity & Functional Dependency 27. III. 2012 Outline 1 Reminder: The Relational Algebra 2 The Relational Calculus 3 Data Integrity Keeping data consistent 4 Functional

More information

Fundamentals of Database Systems

Fundamentals of Database Systems Fundamentals of Database Systems Assignment: 3 Due Date: 23st August, 2017 Instructions This question paper contains 15 questions in 6 pages. Q1: Consider the following relation and its functional dependencies,

More information

CSE 444, Winter 2011, Midterm Examination 9 February 2011

CSE 444, Winter 2011, Midterm Examination 9 February 2011 Name: CSE 444, Winter 2011, Midterm Examination 9 February 2011 Rules: Open books and open notes. No laptops or other mobile devices. Please write clearly. Relax! You are here to learn. An extra page is

More information

CSEP 514 Midterm. Tuesday, Feb. 7, 2017, 5-6:20pm. Question Points Score Total: 150

CSEP 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 information

McGill April 2009 Final Examination Database Systems COMP 421

McGill April 2009 Final Examination Database Systems COMP 421 McGill April 2009 Final Examination Database Systems COMP 421 Wednesday, April 15, 2009 9:00-12:00 Examiner: Prof. Bettina Kemme Associate Examiner: Prof. Muthucumaru Maheswaran Student name: Student Number:

More information

Midterm Exam #1 Version A CS 122A Winter 2017

Midterm Exam #1 Version A CS 122A Winter 2017 NAME: SEAT NO.: STUDENT ID: Midterm Exam #1 Version A CS 122A Winter 2017 Max. Points: 100 (Please read the instructions carefully) Instructions: - The total time for the exam is 50 minutes; be sure to

More information

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2015 EXAMINATIONS CSC 343 H1S Instructor: Horton and Liu Duration 3 hours PLEASE HAND IN Examination Aids: None Student Number: Family

More information

Solutions to Final Examination

Solutions to Final Examination Prof. Li-Yan Yuan CMPUT 391: Database Management Systems Solutions to Final Examination April 23, 2007 It is a close-book examination and the time for the test is 120 minutes. There are ten (10) questions

More information

COMP7640 Assignment 2

COMP7640 Assignment 2 COMP7640 Assignment 2 Due Date: 23:59, 14 November 2014 (Fri) Description Question 1 (20 marks) Consider the following relational schema. An employee can work in more than one department; the pct time

More information

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

Bachelor in Information Technology (BIT) O Term-End Examination No. of Printed Pages : 6 I CSI-14 I Bachelor in Information Technology (BIT) O Term-End Examination cn Cn1 June, 2010 CD cp CSI-14 : DATA ANALYSIS AND DATABASE DESIGN Time : 3 hours Maximum Marks : 75

More information

Attach extra pages as needed. Write your name and ID on any extra page that you attach. Please, write neatly.

Attach extra pages as needed. Write your name and ID on any extra page that you attach. Please, write neatly. UCLA Computer Science Department Fall 2003 Instructor: C. Zaniolo TA: Fusheng Wang Student Name and ID: CS143 Final EXAM: Closed Book, 3 Hours Attach extra pages as needed. Write your name and ID on any

More information

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity COS 597A: Principles of Database and Information Systems Relational model continued Understanding how to use the relational model 1 with as weak entity folded into folded into branches: (br_, librarian,

More information

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

UNIVERSITY 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 information

Functional Dependencies CS 1270

Functional Dependencies CS 1270 Functional Dependencies CS 1270 Constraints We use constraints to enforce semantic requirements on a DBMS Predicates that the DBMS must ensure to be always true. Predicates are checked when the DBMS chooses

More information

CSE 444 Midterm Exam

CSE 444 Midterm Exam CSE 444 Midterm Exam July 28, 2010 Name Sample Solution Question 1 / 28 Question 2 / 20 Question 3 / 16 Question 4 / 20 Question 5 / 16 Total / 100 The exam is open textbook and open lecture notes, including

More information

Section 1: Redundancy Anomalies [10 points]

Section 1: Redundancy Anomalies [10 points] CMPUT 391 Midterm Exam (O.R. Zaïane) February 23 rd, 2004 Page 2 of 8 ID# Section 1: Redundancy Anomalies [10 points] 1- (6 points) Consider the following table. Give an example of update anomaly, an example

More information

Combining schemas. Problems: redundancy, hard to update, possible NULLs

Combining schemas. Problems: redundancy, hard to update, possible NULLs Handout Combining schemas Problems: redundancy, hard to update, possible NULLs Problems? Conclusion: Whether the join attribute is PK or not makes a great difference when combining schemas! Splitting schemas,

More information

Example Examination. Allocated Time: 100 minutes Maximum Points: 250

Example Examination. Allocated Time: 100 minutes Maximum Points: 250 CS542 EXAMPLE EXAM Elke A. Rundensteiner Example Examination Allocated Time: 100 minutes Maximum Points: 250 STUDENT NAME: General Instructions: This test is a closed book exam (besides one cheat sheet).

More information

Final Exam CSE232, Spring 97

Final Exam CSE232, Spring 97 Final Exam CSE232, Spring 97 Name: Time: 2hrs 40min. Total points are 148. A. Serializability I (8) Consider the following schedule S, consisting of transactions T 1, T 2 and T 3 T 1 T 2 T 3 w(a) r(a)

More information

Solutions to Final Examination

Solutions to Final Examination Prof. Li-Yan Yuan CMPUT 391: Database Management Systems Solutions to Final Examination December 15, 2005 It is a close-book examination and the time for the test is 120 minutes. There are twelve (12)

More information

Schema Normalization. 30 th August Submitted By: Saurabh Singla Rahul Bhatnagar

Schema Normalization. 30 th August Submitted By: Saurabh Singla Rahul Bhatnagar Schema Normalization 30 th August 2011 Submitted By: Saurabh Singla 09010146 Rahul Bhatnagar 09010136 Normalization Consider the following ER diagram with some FD: Instructor iid A Student sid Department

More information

CSE 344 Final Examination

CSE 344 Final Examination CSE 344 Final Examination Monday, December 11, 2017, 2:30-4:20 Name: Question Points Score 1 30 2 20 3 30 4 40 5 40 6 40 Total: 200 This exam is CLOSED book and CLOSED devices. You are allowed TWO letter-size

More information

CS411 Database Systems. 05: Relational Schema Design Ch , except and

CS411 Database Systems. 05: Relational Schema Design Ch , except and CS411 Database Systems 05: Relational Schema Design Ch. 3.1-3.5, except 3.4.2-3.4.3 and 3.5.3. 1 How does this fit in? ER Diagrams: Data Definition Translation to Relational Schema: Data Definition Relational

More information

2. (10 points) SQL. Some Quidditch League! [Exercise] Consider the Movie database with the schema in Figure 2 on page 15 for the questions below.

2. (10 points) SQL. Some Quidditch League! [Exercise] Consider the Movie database with the schema in Figure 2 on page 15 for the questions below. 2016 November 9 EECS-3421a: Test #2 w/ answers 4 of 16 2. (10 points) SQL. Some Quidditch League! [Exercise] Consider the Movie database with the schema in Figure 2 on page 15 for the questions below.

More information

Databases -Normalization I. (GF Royle, N Spadaccini ) Databases - Normalization I 1 / 24

Databases -Normalization I. (GF Royle, N Spadaccini ) Databases - Normalization I 1 / 24 Databases -Normalization I (GF Royle, N Spadaccini 2006-2010) Databases - Normalization I 1 / 24 This lecture This lecture introduces normal forms, decomposition and normalization. We will explore problems

More information

CS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION

CS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION CS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION INSTRUCTOR: Grant Weddell TIME: 150 minutes WRITE YOUR NAME AND ID HERE: NOTE 1: This is a closed book examination. For example,

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2015 Quiz I

MASSACHUSETTS 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 information

CSE 344 Final Examination

CSE 344 Final Examination CSE 344 Final Examination March 15, 2016, 2:30pm - 4:20pm Name: Question Points Score 1 47 2 17 3 36 4 54 5 46 Total: 200 This exam is CLOSED book and CLOSED devices. You are allowed TWO letter-size pages

More information

In This Lecture. Normalisation to BCNF. Lossless decomposition. Normalisation so Far. Relational algebra reminder: product

In This Lecture. Normalisation to BCNF. Lossless decomposition. Normalisation so Far. Relational algebra reminder: product In This Lecture Normalisation to BCNF Database Systems Lecture 12 Natasha Alechina More normalisation Brief review of relational algebra Lossless decomposition Boyce-Codd normal form (BCNF) Higher normal

More information

Northern India Engineering College, New Delhi Question Bank Database Management System. B. Tech. Mechanical & Automation Engineering V Semester

Northern India Engineering College, New Delhi Question Bank Database Management System. B. Tech. Mechanical & Automation Engineering V Semester 1. List four significant differences between a file-processing system and a DBMS. 2. Explain the difference between physical and logical data independence. 3. What are five main functions of a database

More information

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

CSE-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 information

ETH Zurich Spring Semester Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: March 20/March 27, 2017.

ETH Zurich Spring Semester Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: March 20/March 27, 2017. Data Modelling and Databases (DMDB) ETH Zurich Spring Semester 2017 Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: March Assistant(s): Claude Barthels, Eleftherios Sidirourgos, Last update:

More information

COMP302. Database Systems

COMP302. Database Systems EXAMINATIONS 2006 MID-YEAR COMP 302 Database Systems Time allowed: Instructions: 3 Hours Answer all questions. Make sure that your answers are clear and to the point. Calculators and printed foreign language

More information

Chapter 16. Relational Database Design Algorithms. Database Design Approaches. Top-Down Design

Chapter 16. Relational Database Design Algorithms. Database Design Approaches. Top-Down Design Chapter 16 Relational Database Design Algorithms Database Design Approaches Top-Down design (Starting with conceptual design) Bottom-Up Design (relational synthesis) 2 Top-Down Design Design conceptual

More information

Course No: 4411 Database Management Systems Fall 2008 Midterm exam

Course 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 information

CSE 344 Midterm Exam

CSE 344 Midterm Exam CSE 344 Midterm Exam February 9, 2015 Question 1 / 10 Question 2 / 39 Question 3 / 16 Question 4 / 28 Question 5 / 12 Total / 105 The exam is closed everything except for 1 letter-size sheet of notes.

More information

CSE 190D Spring 2017 Final Exam Answers

CSE 190D Spring 2017 Final Exam Answers CSE 190D Spring 2017 Final Exam Answers Q 1. [20pts] For the following questions, clearly circle True or False. 1. The hash join algorithm always has fewer page I/Os compared to the block nested loop join

More information

CSE 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. 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 information

SCHEMA REFINEMENT AND NORMAL FORMS

SCHEMA REFINEMENT AND NORMAL FORMS 19 SCHEMA REFINEMENT AND NORMAL FORMS Exercise 19.1 Briefly answer the following questions: 1. Define the term functional dependency. 2. Why are some functional dependencies called trivial? 3. Give a set

More information

Introduction. Examination, INF3100, No examination support material is allowed

Introduction. Examination, INF3100, No examination support material is allowed Introduction Examination, INF3100, 2017. No examination support material is allowed In this exam, you can get a maximum of 100 marks. Each problem is worth 5 or 10 marks (shown on the problem). Note that

More information

Web Science & Technologies University of Koblenz Landau, Germany. Relational Data Model

Web Science & Technologies University of Koblenz Landau, Germany. Relational Data Model Web Science & Technologies University of Koblenz Landau, Germany Relational Data Model Overview Relational data model; Tuples and relations; Schemas and instances; Named vs. unnamed perspective; Relational

More information

The University of British Columbia

The University of British Columbia The University of British Columbia Computer Science 304 Midterm Examination January 30, 2012 Time: 50 minutes Total marks: 40 Instructor: Rachel Pottinger ANSWER KEY (PRINT) (Last) (First) Signature This

More information

Database Constraints and Design

Database Constraints and Design Database Constraints and Design We know that databases are often required to satisfy some integrity constraints. The most common ones are functional and inclusion dependencies. We ll study properties of

More information

CSE 344 Final Examination

CSE 344 Final Examination CSE 344 Final Examination December 12, 2012, 8:30am - 10:20am Name: Question Points Score 1 30 2 20 3 30 4 20 Total: 100 This exam is open book and open notes but NO laptops or other portable devices.

More information

CSE-3421M Test #2. Queries

CSE-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 information

Question 1. SQL and Relational Algebra [25 marks] Question 2. Enhanced Entity Relationship Data Model [25 marks]

Question 1. SQL and Relational Algebra [25 marks] Question 2. Enhanced Entity Relationship Data Model [25 marks] EXAMINATIONS 2003 MID-YEAR COMP 302 Database Systems Time allowed: Instructions: 3 Hours Answer all questions. Make sure that your answers are clear and to the point. Calculators and foreign language dictionaries

More information

Data Modelling and Databases Exercise dates: March 20/March 27, 2017 Ce Zhang, Gustavo Alonso Last update: February 17, 2018.

Data Modelling and Databases Exercise dates: March 20/March 27, 2017 Ce Zhang, Gustavo Alonso Last update: February 17, 2018. Data Modelling and Databases Exercise dates: March 20/March 27, 2017 Ce Zhang, Gustavo Alonso Last update: February 17, 2018 Spring Semester 2018 Head TA: Ingo Müller Datasets set-up This assignment will

More information

Babu Banarasi Das National Institute of Technology and Management

Babu Banarasi Das National Institute of Technology and Management Babu Banarasi Das National Institute of Technology and Management Department of Computer Applications Question Bank (Short-to-Medium-Answer Type Questions) Masters of Computer Applications (MCA) NEW Syllabus

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2009 Quiz I Solutions

MASSACHUSETTS 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 information

CS/B.Tech/CSE/New/SEM-6/CS-601/2013 DATABASE MANAGEMENENT SYSTEM. Time Allotted : 3 Hours Full Marks : 70

CS/B.Tech/CSE/New/SEM-6/CS-601/2013 DATABASE MANAGEMENENT SYSTEM. Time Allotted : 3 Hours Full Marks : 70 CS/B.Tech/CSE/New/SEM-6/CS-601/2013 2013 DATABASE MANAGEMENENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give their answers

More information

5 Normalization:Quality of relational designs

5 Normalization:Quality of relational designs 5 Normalization:Quality of relational designs 5.1 Functional Dependencies 5.1.1 Design quality 5.1.2 Update anomalies 5.1.3 Functional Dependencies: definition 5.1.4 Properties of Functional Dependencies

More information

Wentworth Institute of Technology COMP2670 Databases Spring 2016 Derbinsky. Normalization. Lecture 9

Wentworth Institute of Technology COMP2670 Databases Spring 2016 Derbinsky. Normalization. Lecture 9 Lecture 9 1 Outline 1. Context 2. Objectives 3. Functional Dependencies 4. Normal Forms 1NF 2NF 3NF 2 Database Design and Implementation Process 3 Theory and process by which to evaluate and improve relational

More information

What s a database system? Review of Basic Database Concepts. Entity-relationship (E/R) diagram. Two important questions. Physical data independence

What s a database system? Review of Basic Database Concepts. Entity-relationship (E/R) diagram. Two important questions. Physical data independence What s a database system? Review of Basic Database Concepts CPS 296.1 Topics in Database Systems According to Oxford Dictionary Database: an organized body of related information Database system, DataBase

More information

Database Management

Database Management Database Management - 2011 Model Answers 1. a. A data model should comprise a structural part, an integrity part and a manipulative part. The relational model provides standard definitions for all three

More information

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 4 - Schema Normalization

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 4 - Schema Normalization CSE 544 Principles of Database Management Systems Magdalena Balazinska Winter 2009 Lecture 4 - Schema Normalization References R&G Book. Chapter 19: Schema refinement and normal forms Also relevant to

More information

Database Design Theory and Normalization. CS 377: Database Systems

Database Design Theory and Normalization. CS 377: Database Systems Database Design Theory and Normalization CS 377: Database Systems Recap: What Has Been Covered Lectures 1-2: Database Overview & Concepts Lecture 4: Representational Model (Relational Model) & Mapping

More information

Transactions and Concurrency Control

Transactions and Concurrency Control Transactions and Concurrency Control Transaction: a unit of program execution that accesses and possibly updates some data items. A transaction is a collection of operations that logically form a single

More information

Normalization. Murali Mani. What and Why Normalization? To remove potential redundancy in design

Normalization. Murali Mani. What and Why Normalization? To remove potential redundancy in design 1 Normalization What and Why Normalization? To remove potential redundancy in design Redundancy causes several anomalies: insert, delete and update Normalization uses concept of dependencies Functional

More information

Relational Model and Relational Algebra

Relational Model and Relational Algebra Relational Model and Relational Algebra CMPSCI 445 Database Systems Fall 2008 Some slide content courtesy of Zack Ives, Ramakrishnan & Gehrke, Dan Suciu, Ullman & Widom Next lectures: Querying relational

More information