Hide menu

TDDD12 Database Technology

Examination


This page provides answers to frequently asked questions (FAQs) regarding the collection of exercises (including solutions) from old exams.


About the importance of these old exercises
Q: Are these old exercises all I need to be able to solve to be ready for the exam?
A: Absolutely not! These exercises should not be the only material you use when learning for the exam!! Instead, I suggest reading the relevant chapters of the textbook, and you may want to revisit the video lectures as well as my lecture slides (including the quizzes and exercises!). Moreover, the assignments are another good input.


About questions that mention normal forms other than BCNF (namely, 1NF, 2NF, and 3NF)
Q: Some of the questions about normalization mention normal forms such as 1NF, 2NF, and 3NF. Are these normal forms also relevant for my exam?
A: No. These example questions are still from a time when we also taught these normal forms. Your exam will not require you to do anything with these normal forms. Still, you can work on these exam questions by simply interpreting them as if there were asking you to normalize to BCNF directly.


About questions related to query optimization
Q: There are several questions that go into the details of query optimization (i.e., creating query plans and optimizing them). Do I have to expect such questions in my exam?
A: No. Also these ones are from earlier versions of the course in which these things were discussed in detail in the course, which is not the case anymore. So, you do not have to expect such types of questions in your exam. Nonetheless, I expect you to be able to answer simple questions about the basic concepts of query processing that we talk about in the last lecture of the course now.


About question marks (?) in log records created by REDO or by UNDO
Q: I have noticed that the example solutions use "?" for the new value when doing UNDOs. For example undo w(T1, A, 5, 8) = w(T1, A, ?, 5). And for the REDOs it sometimes uses "?" for the old value and sometimes it is the actual old value. My question is, is there any logical reason for putting a "?" for the old value when doing REDOs? Or can you always put the actual old value? Or is it safer to always put the "?" for the old value?
A: The value to be put in the old-value field (i.e., the "before image") of the log records of undo or redo operations is essentially irrelevant, or may not even be known in some cases. That's why there is a question mark in these old-value fields.
The only important thing that you have to make sure you do not mix up is that in the case of an undo operation, the value that is written (i.e., represented in the new-value field of the log record created by the undo operation) is the value that was found in the old-value field of the log record whose operation is being undone. For instance, if you undo the write operation represented by the following log record ...
write-item T3,C,8,10
... then you write the value 8 into data item C. Hence, the log record for this undo operation must have 8 in the new-value field.


About Exam Question 6.b from Jan 2011
Q: Regarding transaction 2, is it okay to write lock_write(y), lock_read(x)? It says the other way around in the example solution.
A: Yes, it would be okay. More generally, the order in which a transaction obtains the required locks does not matter as long as the transaction holds the necessary lock before it performs the corresponding read/write operation.


Page responsible: Olaf Hartig
Last updated: 2018-05-16