• No results found

Tentamen Databases 5 juni 2013 (18:30-21:15) Grading: starts at 1; question 1(a) gives 1.5 points, 3(a) and 3(b) give 1 point; the rest 0.5 points.

N/A
N/A
Protected

Academic year: 2021

Share "Tentamen Databases 5 juni 2013 (18:30-21:15) Grading: starts at 1; question 1(a) gives 1.5 points, 3(a) and 3(b) give 1 point; the rest 0.5 points."

Copied!
2
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Tentamen Databases 5 juni 2013 (18:30-21:15)

Grading: starts at 1; question 1(a) gives 1.5 points, 3(a) and 3(b) give 1 point; the rest 0.5 points. Please answer all questions either in English (preferred) or in Dutch.

If you did the partial exam this year, then we will use your score there, if it is larger than the total you obtain on questions (1) and (2) in this exam (i.e. you might skip questions 1+2 now if your partial exam score is good).

1 Conceptual Design

Consider the following case: Professors have an SSN, a name, an age, a rank, and a research specialty. Projects have a project number, a sponsor name (e.g., NSF), a starting date, an ending date, and a budget. Graduate students have an SSN, a name, an age, and a degree program (e.g., M.S. or Ph.D.). Each project is managed by one professor (known as the project’s principal investigator). Each project is worked on by one or more

professors (known as the project’s co-investigators). Professors can manage and/or work on multiple projects. Each project is worked on by one or more graduate students (known as the project’s research assistants). When graduate students work on a project, a

professor must supervise their work on the project. Graduate students can work on multiple projects, in which case they will have a (potentially different) supervisor for each one. Departments have a department number, a department name, and a main office.

Departments have a professor (known as the chairman) who runs the department.

Professors work in one or more departments, and for each department that they work in, a time percentage is associated with their job. Graduate students have one major

department in which they are working on their degree. Each graduate student has another, more senior graduate student (known as a student advisor) who advises him or her on what courses to take.

Question 1(a): Provide a conceptual database model in the form of an ER Diagram.

Explain the most important design choices and document relevant assumptions.

Question 1(b): Give the associated relational schema, indicating relations R(A1,..) with their attributes Ai, primary keys underlined, and foreign key relationships ().

Separately also comment on NULLable attributes (if any), and constraints that a relational database could check, including candidate keys.

2 Normalization

Given R(A,B,C,D,E), and FDs: ƒ = { ADB, BD, AEED, EA } Show your intermediate steps in all the answers.

Question 2(a): is ƒ canonical (a minimal basis)? If not, make it so.

Question 2(b): what are the minimal (candidate) keys?

Question 2(c): is R in BCNF already? If not, make it so, and tell if any FD’s get lost.

Question 2(d): is R in 3NF already? If not, make it so.

(2)

3 SQL

Consider the following schema:

Suppliers(sid,sname,saddress) Parts(pid,pname,color)

Catalog(sidSuppliers,pidParts,cost)

The primary keys are underlined and  Rel indicates a foreign key relationship with the primary key of Rel.

Formulate the following queries in SQL. You will only obtain maximal points for your answers if your answers avoid use of GROUP BY in favor of existential quantification.

Question 3(a): Find the pids of parts that are supplied by only one supplier Question 3(b): Find supplier names who sell all black parts

4 Transactions

Question 4(a): Describe the notions of a cascadeless schedule and a recoverable schedule.

Question 4(b): describe the most efficient way of deciding whether a schedule is conflict serializable. Use this method on the below schedule:

T1: R(Z) R(Y) T2: R(Y) W(Y) R(V)

T3: W(V) W(Z)

5 Database APIs

Question 5(a): discuss the advantages and/or disadvantages of database APIs where the application (e.g. written in Java) assembles a database query as a string,

substituting in possible parameters on-the-fly.

Question 5(b): the original ANSI SPARC architecture identified three levels of database modeling; please name them. At which of these levels (highest, middle, lowest) can we see object-relational mappings (ORMs) such as Hibernate and the Entity Framework. Discuss the purpose (function) of this level.

6 Data Warehousing and NoSQL

Question 6(a): Name and explain two typical cube query operations.

Question 6(b): If you would need to do data analysis on some huge web log files with messy structure, and would have to choose between using MapReduce or a key-value store such as HBase; what would you choose? Motivate by naming some relevant characteristics of these systems.

Referenties

GERELATEERDE DOCUMENTEN

To determine the accuracy of this estimator, its standard deviation is estimated by means of the empirical bootstrap?. [4 points] Describe the steps of the empirical bootstrap

To test the null hypothesis that these two samples come from the same distribution we have performed the two-sample t-test and the Wilcoxon two-sample test on the original data, and

User agent style definitions have a higher priority than author style definitions.. User style definitions always have a higher priority than author

If the HTTP server is designed to be used by an AJAX client, it should never respond to HTTP POST requests.. A drawback of AJAX is that HTTP servers can no longer use the common

If the HTTP server is designed to be used by an AJAX client, it should never respond to HTTP POST requests.. A drawback of AJAX is that HTTP servers can no longer use the common

Write down the Lagrangian for the following system: a cart of mass m can roll without friction on a rail along

Write down the Lagrangian for the following system: a cart of mass m can roll without friction on a rail along the x-axis. Is that trans- formation canonical?.. 4. Make sure to see

In k-means clustering, selecting the value of k that produces the smallest Sum of Squared Errors (SSE) is not suited as a method to determine the number of clusters present in