SQL Commands for creating Binary Links from Legacy
Linkvalues?
Barry G. Sumpter
BarrySum at BigPond.Net.AU
Sat Jul 14 03:03:28 CDT 2007
My Answers in line...
-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Ivan Smahin
Sent: Saturday, 14 July 2007 4:50 PM
To: Valentina Developers
Subject: Re[2]: SQL Commands for creating Binary Links from Legacy
Linkvalues?
Hello Barry,
Saturday, July 14, 2007, 3:12:27 AM, you wrote:
> Hi Bart and any who care to comment,
> I did read that page but felt it need more explanation as to it purpose.
> As originally mentioned there are only the logical field values that
match.
So you have key candidates already.
A:Yes, The ShopNo from both tables.
Why not just to build RDB link?
A: Happy to if that's the direction we want to take in our procedure to
achieve Binary Link M:1. This this I believe would be
Step 1 - Create Foreign Key Link.
Later you can convert it to the BinaryLink for example.
A: If I'm following correctly then this would be
Step 2 - Create Binary Link.
But if you have "natural" keys why do you need BinaryLink at all?
A: Table 1 has 10,000 ShopNo and Table 2 has 100,000,000 Receipts
I can index both ShopNo fields and Build a Left outer Join Select
Statement but with that many records I believe it would take a considerable
about of time for even valentina to build a logical index on the fly.
If I am mistaken here then I would be very very interested in know that.
Because if I AM mistaken then I can stop here.
> There is NO current Valentina key created. Other than the RecIDs.
There is no problem to create ones.
A: Acknowledged. I'm just after the step-by-step procedure to get
Valentina to create the 1,000,000,000 links for me thru SQL.
> Where the "COPY LINKS FROM src_link_name TO dest_link_name"
> I believe valentina expect src_link_name to be some sort of pre built
> Valentina key.
Valentina expects the source link there. Creating FK constraint,
RDB-link with the same name is creating also.
A: I missed that. Keeping things in context, I think the src_Link_name
would the Foreign Key built in Step 1. As I understand FK constraints is to
do with the Deletion of parent records. ?
> So I looking for the procedure to get these tables into a Many to One
Binary
> Link.
> CREATE BINARY LINK
> Binary_Link_T1_M_1_T2
> ON TABLES (T1, T2) AS MANY TO ONE ???
> COPY LINKS FROM T1.ShopNo to Binary_Link_T1_M_1_T2 ???
> COPY LINKS FROM T2.ShopNo to Binary_Link_T1_M_1_T2 ???
So you are going to split single logical operation (Create linked
pairs) and each query fill the link partially in some way?
A: Those were just guessing on my part. I'm asking if that's the steps.
I think so far is FK first then Binary.
But why you need it?
We assume that logically two tables are linked. So we mean that we
have some virtual RDB-link. I don't see the problem to create RDB-link
here.
A: Can I ask, is the RDB-Link exactly the same at the FK creation?
If not then I'm not sure why we keep mentionion RDB instead of FK. And more
research will be required on my part.
> Or am I jumping to far ahead in the procedure where I would need
> To create Valentina forein keys first?
You should create FK first. Then you can convert this link into any
link kind.
A: Reads like a good start to me.
Thanks heaps,
baz
--
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list