Am Dienstag, 22.07.03 um 11:39 Uhr schrieb Nigel Stanger:


On 21/7/2003 10:26 AM, Max Horn at [EMAIL PROTECTED] spake thus:

For
example the fact that we have completely variable number of fields in a
package; most DBs (including all (rational) SQL DBs) have a fixed set
of records.

Easy to do in SQL, but it does require at least three tables:


* Package, which would contain the required fields that every package
  must have;

* Field, which is a lookup of all the different fields; and

* Package_Field, which associates a particular field with a
  particular package and specifies its value.

Well I don't call that "easy", I call that an artificial kludge :-)

Dealing with multi-valued fields is a bit more complex, but I don't think it
would be that difficult. I'll need to think a little more about it.


Oh, it won't be "difficult" in the sense that it won't be that hard to stuff the data into a DB. In the worst case you can just use a BLOB and stuff the data directly into it, then let the engine parse that data. That isn't as bad as you might think in the first moment, since most fields are only needed once you actually have to build a package. For normal operations, only a few (package/revision/version/description and some more) are actually needed.

However, I see no way to do it "naturally". Stuffing a variable length record, with a varying number of fields, which can contain multiple values, and even links to other packages, into a relational DB, will always end up as a kludge. There simply is no natural mapping.

In a certain sense, using an OO DB would fit much better
into the way Fink would make use of the DB.

I don't see how an OODB would help with the variable number of fields
problem, unless you include an associative list as an attribute of one of
the objects perhaps. But then it's going to be harder to query, isn't it?
(I'm really a relational guy, so I'm not sure.)


No. A OODB has a variable number of fields on a record. That is, fields can be optional, for example. The exact details vary between different implementations, of course. Just like different relational DBs have different feature sets, so do OODBs


Cheers,


Max



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to