tables and binary links

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Feb 9 12:24:56 CST 2007


On 9/2/07 7:53 PM, "Bart Pietercil" <bart.pietercil at gmail.com> wrote:

>>> Schema:
>>> 
>>> Organisations --> cells <----members (personnel)
>> 
>> So cells is MANY to MANY link table, right?
> No, in my postgres design this would have been
> 
> organisations 1:M cells (= departments of organisations, but more
> flexible, ie projectgroups, special sales teams,....)
> 
> Here I understood that I could use a binary link ( organisation 1:M
> cells) ?

You can. But for 1:M case ObjectPtr currently is MORE effective.
We need yet improve BinaryLink for 1:M case to be as effective as ObjectPtr.


> cells M:M members (= personnel) so there would have been an extra
> table mm_cellmembers

AHA....so tables Cells and Members are linked as M:M ?
I have not realize this from your first letter.

table mm_cellmembers -- is EXCELLENT candidate to be replaced by BinaryLink.
 
> Here I understood that one could replace the middle table
> (mm_cellmembers) with a binary link  cells M:M members ?

YES

> Then back to the cells table
> An cell can have a status and a type (ie. status deactivated, type
> projectteam)
 
> This kind of information I normally store in a property table
> ( property_name,property_value) .

I see. Flexible table with 2 fields.
 
> and have in the cells table a fk_type and fk_status (both pointing to
> the property table (but different rec_ids of course)
 
> The relation would have been Property Table 1:M Cells for fk_type and
> the same for fk_status
> 
> Again in my understanding I translated this to binary links

ObjectPtr is MORE natural for this task!

    status_ptr ObjectPtr to tblProperty
    type_ptr   ObjectPtr to tblProperty

 
> There is clearly something I am missing, why not to use binary link?

Because right now BinaryLink for 1:M kind of link eat more space than do
ObjectPtr.

IT IS possible improve BinaryLink to be smarter. Was my mistake year ago.
And for now no time to re-write this part of code.

> I can say link(recid Property Table with (recid1,recid2,recid3,....)
> Cells) so this looks to me as a valid statement for a binary link.

YES this is valid and will work of course.
 
> I think the piece I'm missing is the part on the wiki that is not yet
> complete (advantages of using binary links)

Ok, good time to finish it.
 
> So please tell when to use binary links and when to use object pointer ?

Right now I'd recommend use

    ObjectPtrs for 1:1  and M:1

    BinaryLink      M:M to replace link-tables with 2 fields.


-- 
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