[lug] Learning about databases

Ralf Mattes rm at ns.aura.de
Sat Jan 8 07:00:58 MST 2000


On Fri, 7 Jan 2000, bill ehlert wrote:

> 
> **  weird!  humph!  :)
> 
>     one of the pick companies (pick systems itself,
>     i think) used to use a slogan something like
>     "data management for the real world", and i
>     think the mv approach is a very good way of
>     dealing with that.
> 
>     after all, a customer may very well have multiple
>     orders and invoices, a class may have multiple
>     students in it, a patient multiple appointments
>     with the doc, etc, etc, etc ...

Well, yes. But i think the  weiredness doesn't lie in the
1:n data model (this is extremly common indeed) but rather
in the data representation of such a model. 

MV fields violate some of the basic concepts of relational
databases (atomicy of fields). Of course you might not want
to use this database model, but then you loose the elegance of 
underlying algebraic model.
There are several reasons why MV fields are problematic:
First of all, you seperate n:m relations from 1:n relations
where in reality the later is only a special case of the 
former. Modern DBMS take great care to optimize n:m queries
and once you start to use MV fields you will loose these
optimizing benefits. 
Querying MV fields starts to get odd pretty soon:
When you search for a particular value, do you search
for the value in all MV fields or do you search for
an MV field with that value(s) as elements.
MV fields might carry (meta)information (i.e. the
combination of values is an information by itself)
that is not represented in the values.
Second: Are MV fields sets or vectors or bags?
Since all three models are valuable for applecations
you need to be able to define the character of MV fields.

Object oriented DBMS try to solve these questions, but
what seems handy at first look might turn out to be a
pain in the end ...



>  but works well.
> 
> **  true, true  ~g~
> 

Well, this of course is THE argument ;-) for such a 
solution.


 Ralf
*-------------------------------------------------------------------*
|                                     |                             |==
| Ralf Mattes                         | rm at schauinsland.com         |==
| Programming, Administration         | rm at ns.aura.de               |==
|                                     |                             |==
*-------------------------------------------------------------------*==
   ====================================================================





More information about the LUG mailing list