Collection Object
Ruslan Zasukhin
sunshine at public.kherson.ua
Sun Jul 30 21:47:13 CDT 2006
On 7/30/06 9:23 PM, "Philip Mötteli" <philip.moetteli at econophone.ch> wrote:
Hi Philip,
> Hi
>
> I have to implement the database representation of collection objects.
> Lets take as an example an NSSet:
> In database language, this means, that ONE record in the table NSSet
> can have any number of links to any other table of the database, even
> links back to the NSSet table itself. Kind of "n1:nM".
> How should I implement that with the tools offered by Valentina?
> Which type of link should I take? If I should take a link?
In short:
* Each table have RecID and OID
* This kind of "Link to many tables" can be made on OID.
* We have no own kind of link that will support this.
in draft we have new field type "ObjectsPtr"
Note "s" at end of "Objects"
ObjectsPtr => point OID field of ANY table.
ObjectPtr => point RecID field of some table.
* I have stop move in this direction because I have not found effective and
simple API and logic for such kind of field.
It seems such field/link cannot support e.g. CASCADE deletion like this do
FK or ObjectPtr...
* So, you can simply make in your CENTRAL TABLE one field of ULLONG type
(8 bytes) and store here OID values of tables around.
* Now how this works.
Note that
OID = (TableID << 32) + RecID
If you have OID value you can easy define TableId,
then get this table by ID and go to RecID of this table.
Simple and fast. Right?
Let me know if any questions.
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list