Dette emnet er erstattet av include:ref: null.


Oppgave 2.5.1, 6.1.5, 6.x.1 fra sett5

Oppgave 3.x.6. For hvert av punktene (a)-(d), gjør følgende:

  1. Dekomponer relasjonen tapsfritt til BCNF.
  2. Avgjør om dekomposisjonen kan ha støyinstanser.

(a) Relasjonen R(A,B,C,D,E,F,G) med FDene ABC → E og AB → DF.

(b) Relasjonen S(A,B,C,D,E,F) med FDene BCDE → F og AD → B.

(c) Relasjonen T(A,B,C,D,E,F,G) med FDene ABD → F og CDE → G.

(d) Relasjonen U(A,B,C,D,E,F) med FDene ABC → E, C → D og CF → A.


Oppgave 10.2.1 The relation

  Flights(airline, frm, to, departs, arrives)

from Example 10.8 has arrival- and departure-time information that we did not consider. Suppose we are interested not only in whether it is possible to reach one city from another, but whether the journey has reasonable connections. That is, when using more than one flight, each flight must arrive at least an hour before the next flight departs. You may assume that no journey takes place over more than one day, so it is not necessary to worry about arrival close to midnight followed by a departure early in the morning.

a) Write the recursion in SQL.


Oppgave 10.2.3 Suppose we have a relation

  SequelOf(movie, sequel)

that gives the immediate sequels of a movie, of which there can be more than one. We want to define a recursive relation FollowOn whose pairs (x,y) are movies such that y was either a sequel of x, a sequel of a sequel, or so on.

a) Write the definition of FollowOn as a SQL recursion.

Publisert 12. feb. 2016 16:26 - Sist endret 12. feb. 2016 16:26