0% found this document useful (0 votes)
37 views

2022 06 01 Exam

Uploaded by

ktang950
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

2022 06 01 Exam

Uploaded by

ktang950
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Advanced databases: Exam

Chalmers University of Technology | University of Gothenburg


Department of Computer Science and Engineering
Period 4, 2022 (DAT475 and DIT930)
Examiner: Graham Kemp

Information:

• The exam takes place from 14:00–18:00 on Wednesday 1 June 2022.

• The examiner will visit the exam room at 14:45 and 15:45.

• You can earn a total of 40 points from 5 questions in the exam.

• Grades are normally determined as follows: ≥ 80 % for grade 5; ≥ 60 % for grade 4;


≥ 40 % for grade 3.

Instructions:

• You may use one A4-sized sheet with hand-written notes (front and back), but all
work must be your own. No photocopies or print-outs of slides, books, or material
off the web. If you bring a sheet of notes to the exam, it must be handed in with your
exam solutions. Please, write the exam code on it.

• Begin the answer to each question on a new page. Write page number and question
number on every page.

• Write clearly; unreadable = wrong!

• Fewer points are given for unnecessarily complicated solutions.

• Indicate clearly if you make any assumptions that are not given explicitly in the ques-
tion.

• Show ALL your work. You will get little or no credit for an unexplained answer. Please
indicate why a specific computation or transformation is appropriate. The points of
each question appear in parentheses; use this for guiding your time.

• No electronic devices of ANY kind! Please store all your devices in your bag and
not on your person. Any device found at your seat, even if it is turned off, will be
considered cheating and reported!

• Printed English language dictionaries—including dictionaries translating to and from


another language to English—are allowed. Electronic dictionaries are not.
Period 4, 2022 Advanced databases Exam

Question 1 [3 points total]


Suppose that each node in a B-tree can have up to four pointers. Consider the following
B-tree which contains keys 13, 17, 19, 23, 29, 31, 37, 41, 43 and 47. Describe how the
tree is modified when the key 35 is inserted, and show the resulting tree.

23 31 43

13 17 19 23 29 31 37 41 43 47

Question 2 [6 points total]


(a) [2 pts] Give two advantages of allowing transactions to run concurrently.
(b) [4 pts] Describe the steps taken by a database management system that uses a
deferred database modification approach for recovery. Mention partially committed
transactions in your answer.

Page 2 of 5
Period 4, 2022 Advanced databases Exam

Question 3 [6 points total]


Suppose we have relations S(a, b, c) and T (d, e) and the query:

SELECT a, b, e
FROM S, T
WHERE c=d AND b>10

Consider the following four query plans:

(a) [4 pts] For each of the query plans, explain whether it would benefit from:
(i) an index on column b
(ii) an index on column c
(iii) an index on column d
(b) [2 pts] Draw a query plan that would be more efficient than any of those given
above. Explain why the query plan would be more efficient and state whether you
assume any indexes.

Page 3 of 5
Period 4, 2022 Advanced databases Exam

Question 4 [18 points total]


The following diagram was produced using the Arrows tool.

(a) [3 pts] Give the Cypher statement that will be generated by the Arrows tool based
on this diagram.
(b) [2 pts] Write a Cypher query that finds the codes of courses that are given in the
MPALG programme.
(c) [4 pts] Suppose we want to store the same information as triples in a Semantic
Web database. What triples would we have?
(d) [3 pts] Give RDFS or OWL 2 statements that model the metadata describing the
classes and relationships in this example.
(e) [3 pts] Based on the triples in your answer to part (c), and assuming many other
similar triples, write a SPARQL query that finds the forenames of all teachers who
teach a course that is part of the MPDSC programme.
(f) [3 pts] Suppose that the triples in your answer to part (c) — and many other
triples — are stored in a relational database in which there is one table that has
three columns of integers, and a separate table that maps RDF terms to integers
Translate the SPARQL query in your answer to part (e) to an SQL query that ac-
cesses the relational database to find the answer.

Page 4 of 5
Period 4, 2022 Advanced databases Exam

Question 5 [7 points total]


The construction phases of Hotel Gothia Towers can be represented as a time-based
version graph. The following figure shows the situation in 1984 after the first tower
was built (9999 is used here to indicate "end-of-time").

(a) [2 pts] In 2001, a second tower with 23 floors was built. This tower was called
"Gothia West Tower". When this tower was built, the first tower was renamed
"Gothia East Tower". Draw a diagram that shows the time-based version graph
with these changes.
(b) [3 pts] In 2013, 6 floors were added to tower 1 (now with 24 floors), and in
2014 a third tower with 29 floors was built. This tower took the name "Gothia
East Tower", and tower 1 took the name "Crown Tower". Draw a diagram that
shows the time-based version graph reflecting the situation in 2014.
(c) [2 pts] Discuss how the time interval for which a data item is valid can be repre-
sented using RDF-star.

Page 5 of 5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy