Domeinmodellering-Opdracht/2 Activiteiten/Assignments/Opdracht07-B05/2 Opdrachtbeschrijving

Uit Werkplaats
Ga naar: navigatie, zoeken

Domeinmodellering-Opdracht


 © comments



== Lecture B6: Handling recursive data in SQL


Background

In this course we have so far restricted ourselves to highly structured object. Objects have fixed sets of attributes, and are identified by their attributes. Furthermore, we assume to have complete knowledge. Querying done by specifying the requested set of objects by imposing a (membership) condition on object attributes. Objects either satisfy that property, or fail on that condition.

A more general approach is that objects may have some properties, may even have properties more than once, and are also identified by their contents. We also speak of documents in such situations.

In this lecture, we consider how recursive data may be handled efficiently by a relational system as SQL. We discuss the main ideas and show how these hierarchical structures are represented in tables and how they are queried. We show some examples in the context of MySQL in combination with the script language PHP as a typical application when building websites. In this task we introduce some extra modeling constructs that have to do with grouping mechanisms.

Targets

After this study task you will be able:

  • To represent hierarchical data in relational tables.
  • To use SQL for the elementary tree manipulation algorithms.
  • Have an idea how this is handled in an internet application

Instruction

--

The tasks

Carefully read the sheets on the Blackboard. (1h)

Products:

Make the exercises in the presentation. (2h)

Deadline for submitting exercises: Jan 11, 2010


Reflection/Discussion