Tables

Bart Pietercil bart.pietercil at cognosis.be
Mon Sep 22 03:11:42 CDT 2008


Hi Ruslan,


On 22 Sep 2008, at 08:09, Ruslan Zasukhin wrote:

> On 9/21/08 10:54 PM, "Bart Pietercil" <bart.pietercil at cognosis.be>  
> wrote:
>
> Hi Bart,
>
>> can you explain a bit more about
>>
>> CREATE [OR REPLACE] [ {GLOBAL | LOCAL} TEMPORARY] [RAM]
>>
>> creating tables:
>>
>> this is what I am looking for
>>
>> I need a way to convert some csv-string (I take csv but any delimiter
>> will do) that I pass as an argument into a stored procedure to be
>> converted to an array.
>> After some looking and reading I understood that in SQL arrays need  
>> to
>> be interpreted as tables (no arrays defined in sql).
>
> Yes no arrays, although we have on TODO such field type for future.
>
>> So this makes me think I can use this vector for resolving the  
>> problem
>>
>> 1) sp receives in argument of type string (varchar?) which is in fact
>> a list (a,b,a,f,d,r,...)
>
>> 2) string is passed to a function that generates a table (if not
>> exists ?)  and inserts (after parsing the string) the passed info  
>> into
>> the table function returns the table id to the calling sp
>
>> sp does a select on the temp table and receives the arguments as a
>> cursor and now we are in business.
>> I can loop over the arguments.
>
>> The most important question for now is twofold:
>
>> 1) Can I create a 'private' temp table. Private meaning in the same
>> scope as connection variables. If not wouldn't that be a good feature
>> request ?
>
> GLOBAL | LOCAL  -- not works yet.
> Always works as GLOBAL now.
>
> Yes of course this is very nice feature.
> LOCAL TMP TABLEs in the scope of user connection.
>
> Nice here is that other users do not see your tables.
> All users can use the same table name not caring about conflict with  
> other
> users.
>

I suppose this is not something that will be available next week ?
I think I will need to work with  connection based (@) userid's in the  
global table then.
Next question: what is difference between temp and permanent and is  
RAM only applicable for temp ?
Of course I understand what the difference between temp and permanent  
is but would like to have more details on the impact of choosing one  
or the other in the light of what I need for the stored procedures.
So a few more questions:

can a temp table relate to other tables with all referential checking  
intact?

What does make an end to the live of a temp table ?

That's it for now

Bart


>> Or is this what the LOCAL means in the create table statement (I
>> didn't find explanations on global/local temporary and ram based in
>> the WIKI)
>
> Yes LOCAL means exactly this. LOCAL for my connection.
>
>> 2) If it can't be private what would be the best type to use ?
>
> Without LOCAL tables, your main trouble is -- provide unique name  
> for this
> new tables.
>
>
> -- 
> 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