Link/Unlink Records M:1 ?

Barry G. Sumpter BarrySum at BigPond.Net.AU
Thu Jul 19 16:02:07 CDT 2007


>I.e. You always can design your db to have all Binary Links as 1:M.

 

Yes, I was just thinking out load there.

I look at the Query by Example type Graphical Relationships always flowing
from left to right.

 

So defining them right to left is confusing for me.

 

 

 

> I'm hoping I can use:

> UnLINK RECORD(1) OF Person USING PersonHasPone

 

Yes should work.

 

----

No, regrettably it doesn't.

 

As the Person table has other links like status, shift, state, etc as well.

 

So it looks like the links are (not ???) cascade deletes.

I have to know exactly which Link RecIDs are being used and submit

an Unlink command with exactly the correct existing RecIDs.

 

UnLINK RECORD(1) OF Person From Record(51) of Phone USING PersonHasPone

UnLINK RECORD(1) OF Person From Record(33) of Staus USING PersonHasStatus

UnLINK RECORD(1) OF Person From Record(3)  of Shift USING PersonHasShift

UnLINK RECORD(1) OF Person From Record(37) of State USING PersonHasState

 

Delete Person where RecID = 1

 

I'd like to see:

UnLINK RECORD(1) OF Person USING PersonHasPone

and 

UnLINK ALL RECORD(1) OF Person

As well.  i.e unlinking all links from Person with RecID of 1

 

----

 

Another flash, perhaps the links can be setup as cascade delete?

I'll have a look.

 

 

 

 

 

 

-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Ruslan Zasukhin
Sent: Monday, 16 July 2007 2:42 PM
To: valentina at lists.macserve.net
Subject: Re: Link/Unlink Records M:1 ?

 

On 15/7/07 11:21 PM, "Barry G. Sumpter" <BarrySum at BigPond.Net.AU> wrote:

 

Hi Barry,

 

>
http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:documen

> tation:vsql:reference:insert_link&s=unlink

> 

> 

> Is it OK to use a M:1 Binary Link?

> This scenario is missing from the above link entitled:

>  Valentina SQL: LINK/UNLINK Records

 

Actually M:1 link is 100% symmetry of 1:M link.

 

It is only issue of order of tables when you create a link.

For example:

 

1) tables Person and Phone linked as 1:M

 

    CREATE BINARY LINK linkname(Person, Phone) AS ONE TO MANY

 

 

2) tables Phone and Person linked as M:1

 

    CREATE BINARY LINK linkname(Phone, Person) AS MANY TO ONE

 

I.e. You always can design your db to have all Binary Links as 1:M.

 

 

> I'm hoping I can use:

> UnLINK RECORD(1) OF Person USING PersonHasPone

 

Yes should work.

 

 

-- 

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]

 

 

_______________________________________________

Valentina mailing list

Valentina at lists.macserve.net

http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list