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: August 17, 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 Entity-Relationship Model (11 points) (a) (5 points) Consider the following Entity-Relationship (ER) model. passport number person 1 1 has address name is_a man 1 father mother 1 woman father 1 N son daughter N 1 mother isson isdaughter For each of the following statements say whether it is true or false in the model. Each correct answer gives points, each wrong answer gives 0.25 points. i. Each person has at least one address. True False ii. Each person has at most one address. True False iii. Each address belongs to at most one person. True False iv. Each address belongs to at least one person. True False v. Each person has at least one passport number. True False vi. Each person has at most one passport number. True False vii. Each passport number belongs to at most one person. True False viii. There are no two persons with the same name. True False ix. Each person who is not a man is a woman. True False x. Each person who is a man is not a woman. True False xi. Each woman is a person. True False xii. Each man has at least one father. True False xiii. Each man has at most one father. True False xiv. A man can be his own father. True False xv. If a woman has a father, she also has a mother. True False xvi. Each man is a father. True False xvii. Each father is a man. True False xviii. Each son is a man. True False xix. Each woman has at least one daughter. True False xx. Each woman has at most one daughter. True False

3 (b) (6 points) Consider the following Entity-Relationship (ER) model, where the cardinalities of relationship R are given as variables M A, M B, and M C. For example, if M A = M B = M C = 1, then R is a 1:1:1 relationship. A M A M B B R M C C The table below shows entities of type A, B, and C respectively that are connected through relationship R. For example, the first tuple m, o, x indicates that entity m of type A, entity o of type B, and entity x of type C are connected through R. We are now interested in the question which are valid sets of tuples for R for different cardinalities M A, M B, and M C. For each assignment of cardinalities in the table, select a subset of tuples that form a valid set R. Select a tuple by adding a checkmark to the corresponding cell. If a tuple cannot be in R, write down the number of the tuple with which it conflicts. tuple number tuple A B C A, B, C R for given multiplicity? M A = N M B = N M C = N M A = 1 M B = N M C = N M A = 1 M B = 1 M C = N M A = 1 M B = 1 M C = 1 1 m o x 2 n o z 3 m q y 4 n p z 5 n o x 6 m q z

4 2 Relational Algebra (11 points) (a) (9 points) Consider two relations: R = A B 1 x 2 y 2 z 3 x 9 a S = B C D x 0 3 y 2 1 y 3 3 w 3 0 y 2 0 Fill out for the following relational algebra expressions how many tuples each of them returns, based on the data given above. Expression 1) R x S 2) R S 3) R S 4) R S 5) R A=D S 6) ρ C A (R) S 7) Π B (R) - Π B (σ C<3 (S)) 8) Π A (R) ρ A D (Π D (S)) 9) Π D (S) S Cardinality of result

5 (b) (2 points) Consider two relations: P = A B Q = B C D For each of the following expressions circle all the tuples that are not in its result set (the tuples contain all four columns: [A, B, C, D]). 1. P Q : a) [ 1, 1, 7, 2 ] b) [ 1, 2, 5, 2 ] c) [ 3, 2, 5, 0 ] d) [ 3, 1, 4, 0 ] e) [ 2, 4, 2, 2 ] 2. P Q : a) [ 3, 1, 7, 2 ] b) [ 4, 1, 4, 0 ] c) [ 2, 4, -, - ] d) [ 3, 1, 4, 0 ] e) [ 1, 3, 2, 2 ] f) [ -, 3, 2, 2 ]

6 3 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. Q1. SELECT COUNT(*) FROM trips; Q2. SELECT COUNT(*) FROM trips t, stop_times st WHERE t.trip_id = st.trip_id; Q3. SELECT COUNT(*) FROM stop_times GROUP BY trip_id; Q4. SELECT COUNT(*) FROM trips JOIN stop_times USING(trip_id) WHERE stop_name LIKE % ; Q5. SELECT SUM(valA) FROM (SELECT stop_name, COUNT(*) as vala FROM stop_times GROUP BY stop_name) taba; Q6. SELECT COUNT(DISTINCT trip_id) FROM stop_times; Identify all equivalence classes for the given queries and write them down in the table below. Two queries are equivalent if they return the same set of results for any data that the database may contain. Note that there may be fewer than 6 equivalence classes. Equivalence Queries

7 (b) (5 points) A tram stop (stop_name) is terminal if it is the last stop for any trip (as identified through the trip_id). The last stop of a trip can be identified by its stop_sequence. For example, if a tram makes a trip along six tram stops, stop_sequence=6 identifies the last stop of the trip. Fill in the blanks below to obtain a SQL query that finds all terminal tram stops (stop_name). Also make sure the result does not contain duplicate entries. SELECT FROM stop_times st1, (SELECT FROM stop_times GROUP BY ) st2 WHERE AND

8 4 SQL Part 2 (12 points) Consider three tables: Actor: id name 1 John Doe 2 John Smith 3 Johanna Doe 4 Daniela Johannsen 5 Jack Jackson Director: id name 1001 Adam West 1002 Carla East 1003 Charlie Smith 1004 Lucas Doe Movie: id dir_id lead_id rating title We have run seven queries on this data (see next page) and received a number as a result for each of them. These numbers are shown in the table below. List in the box by the result which queries give which results (some of them will have multiple queries associated). Result value: List queries returning this result: Queries, A) through F) (see also next page): A) SELECT max(rating) from movie where lead_id!= 1 B) SELECT min(rating) from movie where dir_id in (select id from director where name not like %S% )

9 C) select min(rating) from movie, actor where lead_id=actor.id and actor.name like Jo% D) select (2+avg(rating)) from movie m1, director where m1.dir_id=director.id and director.name like %l%t and (select count(*) from movie m2 where m2.lead_id=m1.lead_id)>1 E) select (min(rating)) from movie m1 where (select count(*) from movie m2 where m2.lead_id=m1.lead_id)=1 F) select avg(m2.rating) from movie m1, movie m2, actor a1, actor a2 where m1.lead_id=a1.id and m2.lead_id=a2.id and m1.dir_id=m2.dir_id and a1.id=a2.id and a1.name like %a%do%

10 5 Integrity constraints (9 points) (a) (2 points) Given a database with multiple tables, which of the following constraints can be used in a way to ensure, or will by definition not allow NULL values to be inserted? Mark all correct options below: UNIQUE NOT NULL FOREIGN KEY PRIMARY KEY CHECK (b) (3 points) Are the following statements true or false? Place a checkmark in the correct column. Statement True False a) In principle a check constraint could be added to a table that makes it impossible to insert any data. b) A primary key column can have up to one NULL value. c) The primary key constraint can be augmented with an on delete set null d) The on delete cascade constraint specified for a column in a table leads to record deletions in other tables. e) The check constraint can not alter values in a table.

11 (c) (4 points) Consider the following schema creation statement for a university: CREATE TABLE student ( id INT PRIMARY KEY, age INT NOT NULL ); CREATE TABLE lecture ( id INT PRIMARY KEY, name VARCHAR(32) NOT NULL ); CREATE TABLE attends ( sid INT, lid INT, constraint fk1 FOREIGN KEY (sid) REFERENCES student(id) ON DELETE CASCADE ON UPDATE CASCADE, constraint fk2 FOREIGN KEY (lid) REFERENCES lecture(id) ON DELETE NO ACTION ON UPDATE SET NULL ) Initially, the three tables contain the following entries: student: id age lecture: id name 2 Databases 3 Literature 4 Biology attends: sid lid Fill in the table, showing how many tuples the tables contain after executing each set of SQL statements. Assume that each set of SQL statements is executed on the initial state of the database above and that individual SQL statements are executed in a separate transaction. SQL student lecture attends INSERT INTO lecture VALUES (1, Math I ); INSERT INTO lecture VALUES (2, Math II ); INSERT INTO student VALUES (9, 30); INSERT INTO attends VALUES (9, 2); DELETE FROM lecture WHERE id>2; UPDATE lecture SET id=99 WHERE id<=2; DELETE FROM student WHERE age > (SELECT average(age) FROM student);

12 6 Normal Forms & Decomposition (10 points) 1. Given the following WorksFor relation: WorksFor: (employee_id, department_id, start_date, end_date, department_name, department_manager) with the following functional dependencies: employee_id, department_id start_date, end_date department_id department_name, department_manager (a) (1 point) Identify the candidate keys of the relation WorksFor. (b) (1 point) Which is the highest normal form the relation WorksFor is in? 1NF 2NF 3NF BCNF 4NF (c) (1 point) Which are the problematic functional dependencies which prevent the relation WorksFor from being in the next higher normal form? employee_id, department_id start_date, end_date department_id department_name, department_manager (d) (2 points) Propose a lossless decomposition of WorksFor into R 1 and R 2 such that R 1 and R 2 are in 3NF. Prove that your decomposition is lossless.

13 2. Given the relation R(A, B, C, D, E), and two sets of functional dependencies: F 1: AB C F 2: AB CE ABC DE ABC D AE B E B For each of them, there are no further non-trivial functional dependencies. (a) (2 points) Determine the highest normal form for each set of functional dependencies. Indicate the functional dependency that prevents the relation from being in the next higher normal form. Set of FDs 1NF 2NF 3NF BCNF Problematic FD F 1 F 2 (b) (3 points) If the relations are not in BCNF, apply the decomposition algorithm to bring the relations into BCNF. Indicate if your decomposition preserves all the functional dependencies. Set of FDs Is in BCNF? (Yes/No) F 1 F 2 Result of Decomposition Algorithm Dependency preserving? (Yes/No)

14 7 Functional Dependencies & 3NF (11 points) Given the relation R(A, B, C, D, E), there exist two sets of functional dependencies: F 1: A B F 2: A CE D E D AB AE D AB DE BC AD AC D For each of them, there are no further non-trivial functional dependencies. (a) (4 points) For each set of attributes in the table below, decide whether it is a candidate key of R given the respective functional dependencies of F 1 and F 2. F 1 F 2 Possible Is Cand. Is not Is Cand. Is not Candidate Key Key Cand. Key Key Cand. Key A D AB AC BC BCE (b) (3 points) Determine whether the functional dependencies above are minimal or whether you can do a right or left reduction. If the dependencies are not minimal, write down one violating functional dependency and what kind of reduction (left or right) could be applied to this dependency. Is minimal. Is not minimal. Violating FD and Explanation F 1 F 2 (c) Apply the synthesis algorithm to R given F 1 and F 2 respectively. i. (2 points) Select the correct decomposition of R given F 1 according to the synthesis algorithm: R 1(A, B), R 2(A, D, E), R 3(A, B, C, D), R 4(D, E) R 1(A, D, E), R 2(A, B, C, D) R 1(A, D, E), R 2(B, C, D) ii. (2 points) Select the correct decomposition of R given F 2 according to the synthesis algorithm: R 1(A, B, D), R 2(A, C, D, E) R 1(A, B, D, E), R 2(A, C) R 1(A, B, D), R 2(A, C, E), R 3(A, C, D)

15 8 Query Processing (10 points) Consider the following three relations: Relation Director (did, dname, birth_date) Category (cid, ctitle, description) Movie (mid, mtitle, did, cid, release_date, rating) Size 1k tuples 100 tuples 10k tuples Table Movie references table Director (did is a foreign key to Director.did) and table Category (cid is a foreign key to Category.cid). The following query uses these tables and determines the average rating of directors per movie category: SELECT name, ctitle, AVG(rating) FROM (SELECT ctitle, did, rating FROM movie AS M JOIN category AS C USING (cid)) MPC JOIN director AS D USING(did) GROUP BY name, cat_title; (a) (2 points) In order to execute this query, the database system can use query plans with the following two join orderings. For both orderings, write the maximum number of tuples in the intermediate results into the boxes. name,ctitle AVG(rating) name,ctitle AVG(rating) 100 tuples category tuples cid Π name,ctitle,rating movie did director 10k tuples Join Ordering 1 tuples 1k tuples 100 tuples Π name,ctitle,rating category cid 10k tuples movie tuples did Join Ordering 2 tuples director 1k tuples

16 (b) (3 points) In order to compute a join of two tables R and S, the database system may choose between several implementations. Complete the following table by filling in the maximum costs in terms of operations on tuples in O-notation of the following join algorithms as discussed in the lecture. Use the number of tuples R and S in R and S respectively as variables. Join algorithm Cost Sort-Merge-Join (SMJ) Grace-Hash-Join (GHJ) Nested-Loop-Join (NLJ) (c) (5 points) We now compare query plans using different join orderings and different join implementations. We refer to a plan using Join Ordering 1 from above as (C impl M) impl D and a plan using Join Ordering 2 as C impl (M impl D), where impl is one of the join implementations SMJ, GHJ, or NLJ. Complete the table below by giving an estimate of the order of magnitude of the costs of each plan. Assume the costs of a plan is the sum of the maximum costs of its joins. Assume the maximum number of tuples for intermediate results from Part a. To estimate the costs of a join, you may use the algorithm complexities from Part b using 1 as constant and logarithms with base 10. For example, sorting a list of n = 1000 tuples would be estimated to have a cost of n log n = 1000 log = = 3000 operations. Query plan Cost N ops N ops < N ops < N ops < N ops (C NLJ M) SMJ D C NLJ (M SMJ D) C SMJ (M GHJ D) C SMJ (M NLJ D) C GHJ (M SMJ D)

17 9 Transactions (15 points) Notation used in this exercise: b i - Begin of transaction i r i(a) - Transaction i reads data object A. w i(a) - Transaction i writes to data object A. c i - Transaction i commits successfully. a i - Transaction i aborts or is aborted. (a) (4 points) Determine if the following histories are possible under snapshot isolation (SI), strict two-phase locking (S2PL), or both. Write either YES or NO in each of the boxes. History SI S2PL b 1 r 1(A) w 1(B) b 2 w 2(A) r 2(B) b 3 c 2 r 3(A) c 1 c 3 b 1 r 1(A) b 2 r 2(A) w 2(B) c 2 w 1(A) c 1 b 1 w 1(B) r 1(A) b 2 w 2(B) c 1 a 2 b 1 w 1(A) b 2 r 1(B) r 2(B) c 1 w 2(A) c 2 (b) (1 point) Can phantoms occur in snapshot isolation? (Explain the answer in one or two sentences) Yes No (c) (2 points) In Two Phase Locking (2PL), one can release all locks at the point when the transaction has finished but has not issued a commit. Will the result be serializable? Yes No Are histories generated by this approach always recoverable? Yes No

18 (d) (2 points) Provide a serialization order for the transactions of the following histories. If the history is not serializable, write down "not serializable". History Serialized History r 1(A) w 2(A) c 1 r 2(B) w 3(B) c 2 c 3 w 2(A) r 1(A) w 3(A) a 3 c 2 c 1 w 2(A) r 3(B) r 1(A) w 1(B) c 3 w 2(B) c 2 c 1 r 2(C) w 1(A) r 2(B) w 1(B) c 1 w 2(C) c 2 (e) (2 points) Using two conflicting transactions: T 1: r 1(A) w 1(B) c 1 T 2: r 2(B) w 2(A) c 2 Find a history with c 1 < c 2 (i.e. T 1 commits before T 2) and which corresponds to the serial execution T 2, T 1. Is this history possible under Two Phase Locking (2PL) and Strict Two Phase Locking (S2PL)? 2PL S2PL Yes No (f) (2 points) Find the most strict recoverability class (not recoverable, recoverable, avoid-cascadingaborts, strict) for the following histories. History Recoverability class w 2(B) w 1(A) r 2(A) w 2(A) c 2 c 1 w 3(A) w 2(A) c 3 w 1(A) r 1(B) w 2(A) c 2 w 1(B) c 1 w 1(A) r 2(B) w 1(B) c 1 w 2(A) c 2 w 1(A) w 2(A) r 2(A) w 3(C) c 3 c 1 c 2

19 (g) (2 points) Below you find the Venn diagram of the recoverability classes for transactions with read and write operations. Now, assume that the only operation possible in a transaction is an atomic read-write (represented as rw i(x)), where the read and the write happen in one single atomic step. Starting from the Venn diagram on the left, modify the diagram for such transactions. Draw your answer in the box on the right. Diagram for transactions with reads r i(a) and writes w i(a): Diagram for transactions with atomic read-writes rw i(a): Recoverable ACA Strict

20 10 Commit protocols (10 points) (a) (6 points) A coordinator C and two participants P 1, P 2 run the three-phase-commit (3PC) protocol. The coordinator also acts as participant. We model the execution of the protocol as a series of events. An event can be one of the following: A message event of the form (X, Y, M) means that node X sends the message M to node Y, where X, Y {A, B 1, B 2} and the message M {request, yes, no, pre-commit, ack, abort, commit}, meaning request to vote, voting yes, voting no, pre-commit, acknowledge last message, request to abort, and request to commit respectively. A group communication event of the form (X, ask around abort) or (X, ask around commit) means that node X initiates a round of group communication where all reachable nodes exchange all relevant information and then decide to abort or to commit accordingly. We assume that no failures occur during group communication. A failure event of the form (X, fail) means that node X fails. The following sequence of events shows an execution of the 3PC protocol where no failures occur: time step event 1 (C, P 1, request) 2 (C, P 2, request) 3 (P 1, C, yes) 4 (P 2, C, yes) 5 (C, P 1, pre-commit) 6 (C, P 2, pre-commit) 7 (P 1, C, ack) 8 (P 2, C, ack) 9 (C, P 1, commit) 10 (C, P 2, commit) We now modify this sequence of events starting from some time step. Complete each new sequence with one possible next event such that it models a valid execution of the 3PC protocol. Sequence (i): time step event 4 (P 2, C, no) 5 Sequence (iv): time step event 6 (C, fail) 7 Sequence (ii): time step event 2 (C, fail) 3 (P 1, C, yes) 4 Sequence (iii): time step event 5 (C, fail) 6 Sequence (v): time step event 4 (P 2, fail) 5 Sequence (vi): time step event 6 (P 2, fail) 7 (C, P 2, pre-commit) 8 (P 1, C, ack) 9 (b) (2 points) Let us assume that the three nodes C, P 1, and P 2 are connected through a network with the links L 0, L 1, and L 3 respectively:

21 C L 0 L 1 L 2 P 1 P 2 If a link fails, messages sent over the links are lost. To model link failures, we extend our definition of failure events to links, i.e., (X, fail) means the failure of X, where X may be a node or a link. Complete the following sequence of events by filling in the blanks such that it models a valid execution of the 3PC protocol: time step event 6 (L 2, fail) 7 (C, P 2, pre-commit) 8 (P 2, ) 9 (P 1, C, ack) 10 (C, ) (c) (2 points) Give a sequence of events modeling an execution of the two-phase commit (2PC) protocol with the nodes C, P 1, P 2 where no failures occur and all nodes want to commit using the notation above. You may not need all rows of the table. time step event

22 11 Replication (8 points) (a) (4 points) Rank the replication strategies by response times starting from the one that provides shortest response times. Replication strategy Synchronous primary copy Asynchronous primary copy Synchronous update everywhere Asynchronous update everywhere Rank (b) (4 points) For each statement below, mark the replication strategies for which the statement is valid. Statement Replicas may have inconsistent data Distributed coordination of updates is not necessary Load is evenly distributed Updates can be lost (needs reconciliation) Primary copy Synchronous Update everywhere Primary copy Asynchronous Update everywhere

23 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.

24

25

Exam. Question: Total Points: Score:

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

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

Exercise 11: Transactions

Exercise 11: Transactions 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

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

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

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

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

CSE 344 Final Review. August 16 th

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

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

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

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

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

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

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

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

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

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

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web:     Ph: Serial : 0. PT_CS_DBMS_02078 Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: E-mail: info@madeeasy.in Ph: 0-5262 CLASS TEST 208-9 COMPUTER SCIENCE & IT Subject :

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

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

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

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

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

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

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

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

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

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

Exercise 12: Commit Protocols and Replication

Exercise 12: Commit Protocols and Replication Data Modelling and Databases (DMDB) ETH Zurich Spring Semester 2017 Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: May 22, 2017 Assistant(s): Claude Barthels, Eleftherios Sidirourgos, Eliza

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

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

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

Exercise 12: Commit Protocols and Replication

Exercise 12: Commit Protocols and Replication Data Modelling and Databases (DMDB) ETH Zurich Spring Semester 2017 Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: May 22, 2017 Assistant(s): Claude Barthels, Eleftherios Sidirourgos, Eliza

More information

Techno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601

Techno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601 Techno India Batanagar Computer Science and Engineering Model Questions Subject Name: Database Management System Subject Code: CS 601 Multiple Choice Type Questions 1. Data structure or the data stored

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

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

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

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

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

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

Assignment 12: Commit Protocols and Replication

Assignment 12: Commit Protocols and Replication Data Modelling and Databases Exercise dates: May 24 / May 25, 2018 Ce Zhang, Gustavo Alonso Last update: June 04, 2018 Spring Semester 2018 Head TA: Ingo Müller Assignment 12: Commit Protocols and Replication

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

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

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

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

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

Assignment 1: Entity-Relationship Model Solution

Assignment 1: Entity-Relationship Model Solution Data odelling and Databases Exercise dates: arch /arch 2, 208 Ce Zhang, Gustavo Alonso Last update: arch 08, 208 Spring Semester 208 Head TA: Ingo üller Assignment : Entity-Relationship odel Solution This

More information

CSCE 4523 Introduction to Database Management Systems Final Exam Fall I have neither given, nor received,unauthorized assistance on this exam.

CSCE 4523 Introduction to Database Management Systems Final Exam Fall I have neither given, nor received,unauthorized assistance on this exam. CSCE 4523 Introduction to Database Management Systems Final Exam Fall 2016 I have neither given, nor received,unauthorized assistance on this exam. Signature Printed Name: Attempt all of the following

More information

Sample Exam for CSE 480 (2016)

Sample Exam for CSE 480 (2016) Sample Exam for CSE 480 (2016) Answer the questions in the spaces provided on the page. If you run out of room for an answer, continue on the back of the page. Instructions: DO NOT START THE EXAM UNTIL

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

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

Database Systems Relational Model. A.R. Hurson 323 CS Building

Database Systems Relational Model. A.R. Hurson 323 CS Building Relational Model A.R. Hurson 323 CS Building Relational data model Database is represented by a set of tables (relations), in which a row (tuple) represents an entity (object, record) and a column corresponds

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

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

"Charting the Course... MOC A Developing Microsoft SQL Server 2012 Databases. Course Summary

Charting the Course... MOC A Developing Microsoft SQL Server 2012 Databases. Course Summary Course Summary Description This 5-day instructor-led course introduces SQL Server 2012 and describes logical table design, indexing and query plans. It also focuses on the creation of database objects

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

Midterm Exam #1 Version B CS 122A Winter 2017

Midterm Exam #1 Version B CS 122A Winter 2017 NAME: SEAT NO.: STUDENT ID: Midterm Exam #1 Version B 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

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

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

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

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

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

1 (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 information

Name Class Account UNIVERISTY OF CALIFORNIA, BERKELEY College of Engineering Department of EECS, Computer Science Division J.

Name Class Account UNIVERISTY OF CALIFORNIA, BERKELEY College of Engineering Department of EECS, Computer Science Division J. Do not write in this space CS186 Spring 2001 Name Class Account UNIVERISTY OF CALIFORNIA, BERKELEY College of Engineering Department of EECS, Computer Science Division J. Hellerstein Final Exam Final Exam:

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

VIEW OTHER QUESTION PAPERS

VIEW OTHER QUESTION PAPERS VIEW OTHER QUESTION PAPERS E B4E0562 Reg No.: Name: Total Pages: 2 APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY FOURTH SEMESTER B.TECH DEGREE EXAMINATION, JULY 2017 Course Code: CS208 Course Name: PRINCIPLES

More information

Assignment 12: Commit Protocols and Replication Solution

Assignment 12: Commit Protocols and Replication Solution Data Modelling and Databases Exercise dates: May 24 / May 25, 2018 Ce Zhang, Gustavo Alonso Last update: June 04, 2018 Spring Semester 2018 Head TA: Ingo Müller Assignment 12: Commit Protocols and Replication

More information

Final Exam CSE232, Spring 97, Solutions

Final Exam CSE232, Spring 97, Solutions T1 Final Exam CSE232, Spring 97, Solutions 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 r(a) Give

More information

Database Management Systems (CS 601) Assignments

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

Answers to G51DBS exam

Answers to G51DBS exam Answers to G51DBS exam 2007-8 1. (a) (i) Title Java Haskell Databases Robotics (ii) ID Code Mark 111 G51PRG 60 222 G51PRG 70 333 G51PRG 50 (iii) ID 111 222 333 (iv) ID 444 (v) ID 111 (vi) ID Name ID Code

More information

Introduction to Database Systems. Announcements CSE 444. Review: Closure, Key, Superkey. Decomposition: Schema Design using FD

Introduction to Database Systems. Announcements CSE 444. Review: Closure, Key, Superkey. Decomposition: Schema Design using FD Introduction to Database Systems CSE 444 Lecture #9 Jan 29 2001 Announcements Mid Term on Monday (in class) Material in lectures Textbook Chapter 1.1, Chapter 2 (except 2.1 and ODL), Chapter 3 (except

More information

Name :. Roll No. :... Invigilator s Signature : DATABASE MANAGEMENT SYSTEM

Name :. Roll No. :... Invigilator s Signature : DATABASE MANAGEMENT SYSTEM Name :. Roll No. :..... Invigilator s Signature :.. CS/B.TECH(IT)/SEM-6/IT-604/2012 2012 DATABASE MANAGEMENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks.

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

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

Sample Exam for CSE 480 (2017) KEY

Sample Exam for CSE 480 (2017) KEY Sample Exam for CSE 480 (2017) KEY Answer the questions in the spaces provided on the page. If you run out of room for an answer, continue on the back of that page. Instructions: DO NOT START THE EXAM

More information

L i (A) = transaction T i acquires lock for element A. U i (A) = transaction T i releases lock for element A

L i (A) = transaction T i acquires lock for element A. U i (A) = transaction T i releases lock for element A Lock-Based Scheduler Introduction to Data Management CSE 344 Lecture 20: Transactions Simple idea: Each element has a unique lock Each transaction must first acquire the lock before reading/writing that

More information

CS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010

CS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010 CS403- Database Management Systems Solved MCQS From Midterm Papers April 29,2012 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 CS403- Database Management Systems MIDTERM EXAMINATION - Spring

More information

Why Study the Relational Model? The Relational Model. Relational Database: Definitions. The SQL Query Language. Relational Query Languages

Why Study the Relational Model? The Relational Model. Relational Database: Definitions. The SQL Query Language. Relational Query Languages Why Study the Relational Model? The Relational Model Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. Legacy systems in older models E.G., IBM s IMS Recent competitor: object-oriented

More information

Database Management

Database Management Database Management - 2013 Model Answers 1. a. A cyclic relationship type (also called recursive) is a relationship type between two occurrences of the same entity type. With each entity type in a cyclic

More information

Relational Database Design (II)

Relational Database Design (II) Relational Database Design (II) 1 Roadmap of This Lecture Algorithms for Functional Dependencies (cont d) Decomposition Using Multi-valued Dependencies More Normal Form Database-Design Process Modeling

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

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

CIS 330: Applied Database Systems. ER to Relational Relational Algebra

CIS 330: Applied Database Systems. ER to Relational Relational Algebra CIS 330: Applied Database Systems ER to Relational Relational Algebra 1 Logical DB Design: ER to Relational Entity sets to tables: ssn name Employees lot CREATE TABLE Employees (ssn CHAR(11), name CHAR(20),

More information

2011 DATABASE MANAGEMENT SYSTEM

2011 DATABASE MANAGEMENT SYSTEM Name :. Roll No. :..... Invigilator s Signature :.. CS/B.TECH(IT)/SEM-6/IT-604/2011 2011 DATABASE MANAGEMENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks.

More information

MIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: Time: 60 min Marks: 38

MIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: Time: 60 min Marks: 38 Student Info StudentID: Center: ExamDate: MIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: 1356458 Time: 60 min Marks: 38 BC080402322 OPKST 5/28/2010 12:00:00 AM

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

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

[18 marks] Consider the following schema for tracking customers ratings of books for a bookstore website.

[18 marks] Consider the following schema for tracking customers ratings of books for a bookstore website. Question 1. [18 marks] Consider the following schema for tracking customers ratings of books for a bookstore website. Books(ISBN, title, author, year, length). ISBN is a string used internationally for

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

"Charting the Course to Your Success!" MOC D Querying Microsoft SQL Server Course Summary

Charting the Course to Your Success! MOC D Querying Microsoft SQL Server Course Summary Course Summary Description This 5-day instructor led course provides students with the technical skills required to write basic Transact-SQL queries for Microsoft SQL Server 2014. This course is the foundation

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

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

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

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

Applied Databases. Sebastian Maneth. Lecture 5 ER Model, normal forms. University of Edinburgh - January 25 th, 2016

Applied Databases. Sebastian Maneth. Lecture 5 ER Model, normal forms. University of Edinburgh - January 25 th, 2016 Applied Databases Lecture 5 ER Model, normal forms Sebastian Maneth University of Edinburgh - January 25 th, 2016 Outline 2 1. Entity Relationship Model 2. Normal Forms Keys and Superkeys 3 Superkey =

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

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

INDIAN SCHOOL SOHAR FIRST TERM EXAM ( ) INFORMATICS PRACTICES

INDIAN SCHOOL SOHAR FIRST TERM EXAM ( ) INFORMATICS PRACTICES INDIAN SCHOOL SOHAR FIRST TERM EXAM (2015-2016) INFORMATICS PRACTICES Page 1 of 5 No. of printed pages: 5 Class: XI Marks: 70 Date: 10-09-15 Time: 3 hours Instructions: a. All the questions are compulsory.

More information