ObjectPtr - What's the best way to create a new ObjectPtr link for two existing tables. Both have existing data.

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Jun 10 02:25:35 CDT 2007


On 9/6/07 11:43 PM, "Barry G. Sumpter" <BarrySum at BigPond.Net.AU> wrote:

> Hi all,
> 
> For my sample scenario:
> 
> I have a SoldInPostCode table with 100,000 records.
> (I've sold 100,000 widgets.)
> Each record has just a single field of a Postcode in it.
> It is numeric.
> And the max value is 99999.
> The PostCode is NOT unique.
> 
> I have a PostCodeWithState table with all the PostCodes with their States.
> (I want to know how many widgets were sold in each state)
> 99999 postcodes within 52 states.
> There are two fields.
> Each record has a single field of a Postcode in it.
> It is numeric.
> And the max value is 99999.
> 
> Each record also has a single field of a State in it.
> Lets say for now it is a string.
> 2 characters long.
> And contains the 52 State abbreviations.  TX, OK, CA.
> 
> So the Left table has 100,000 Records.
> I want to like to the right table that has 99,999 records.
> 
> For this scenario I want an ObjectPtr
> So I've already created an ObjectPtr field: SoldPC_PCState.

Yes, 
 
> To now link by actually populating the SoldPC_PCState ObjectPtr:
> 
>   Do I have to write code to do the following?:
>      1) Step thru each of the 100,000 SoldInPostCode records
>      2) Find the corresponding Post Code in PostCodeWithState
>         (retrieving the PostCodeWithState.RecID)
>      3) Update the  SoldInPostCode.SoldPC_PCState ObjectPtr with
> PostCodeWithState.RecID
> 
> Happy to do it.
> I'm coming from a MSAccess DB background and we didn't have to do this.
> So it just feels strange to me.

> Thanks for your patience and understanding.

Nothing strange here !!!

Excuse me, but MS Access do not have ObjectPtr.

Using MS Access you will live and work with above 2 tables AS IS. Right?

Barry, let me remind that Valentina perfectly can work with this structure
also. We name this as RB-link. Then Valentina will looks for you as MS
Access, right? :-)

But you have decide to switch from RDB link to ObjectPtr right?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


THIS IS WHY you need to do this step:
      Transform RDB link into ObjectPtr link


-----------------------------------------------------------------------
Now ATTENTION please. Last 5-7 days we work EXACTLY to introduce this
feature for Valentina engine!

I am happy, that we have catch this correctly, and that people soon, will be
more and more need it.

Please read on this page

<http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:docume
ntation:vkernel:vlink:vlink>

section "Refactoring"

And Your task above is described on this page:
    Convert Foreign Key to ObjectPtr



NEXT WEEK we will introduce 3.1 build or its beta where will exists these
new 

    Link.CopyFrom() methods

And SQL command 

    COPY LINKS FROM ... TO ...



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