Bases de Données I

Examen

Il y a un projet à réaliser. Deux examens écrits seront organisés: le premier concerne les TP assurés par M. Buys, le deuxième A CAHIER FERME concerne la théorie. Si le projet est suffisant, la pondération est (cours: 14, TP: 4, projet: 2).

Références du cours

Examens antérieurs

 

Interpreter for the SPJRUD Algebra

Excellent tool developed by alumnus Sergio Mazzoleni. Here is a screenshot.
The tool is online available as a web application. Alternatively, the tool can be downloaded and installed locally.

Web Application

Local Installation

  • Download the tool.
  • Download the example files.
  • Installation steps under Windows:
    • Since the tool is a web application, install WampServer (say in C:\wamp).
    • Unzip the tool and copy it in C:\wamp\www
    • In a recent version of Google Chrome or Firefox, open http://localhost/spjrud_20160912/spjrud/index.html
      The tool may not work correctly in other browsers (and does not work in Internet Explorer).
    • Click « start SQF editor. »
    • Load one of the example files, e.g., exo_wijsen_02.sqf

Example

The following example illustrates the syntax.

@let Likes = @relation[Drinker,Beer]
{<Sergio, Orval>
<Sergio, Chimay>
<Sergio, La Trappe>
<Jef, Orval>
<Jef, Chimay>
<Jef, Duvel>
<Jan, Duvel>
<Jan, Orval>}

@let Trappists = @relation[Trappist, Country]
{<Orval, Belgium>
<Chimay, Belgium>
<La Trappe, Netherlands>}

% Who likes all belgian trappists in the Trappists table ?

@let Crossproduct = (@project {Drinker} Likes)
@join
(@rename {Trappist:Beer}
(@project{Trappist}
(@select {Country= »Belgium »} Trappists)))

@let NotLikesAll = @project {Drinker} (Crossproduct @minus Likes)

@let LikesAll = @project {Drinker} Likes @minus NotLikesAll

@print LikesAll