trouble converting from mysql

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Nov 6 00:21:37 CST 2007


On 6/11/07 2:38 AM, "Joseph Morgan" <joseph at checkos.com> wrote:

>> 2) Valentina allow for ULONG field to have flag IDENTITY
>>     although this variant of auto-increment field in fact uses RecID
>>     i.e. Reuses values.
> So then recid would be bad for invoice numbers because eventually
> if an invoice gets deleted, that number would end up getting reused
> and have the potential to refer to 2 different invoices with same
> number.
> 
>> 3) people also use way in BIG DBMS and you can use it also:
>> 
>>         make Table IDs with 2 fields.  TableID, LastID
>> 
>> And write procedure which will
>> 
>>     GetNextIDFor( tableID )
> 
> Ok, so are there any big benefits of doing it with a stored
> procedure instead of something like this?:
> 
> cursor = "select max(_rowID) from table1"
> 
> x = cursor.field(1).integervalue + 1
> 
> "insert into table1(_rowid,otherfields) values(x,otherfields)"
> 
> I am usually only entering one single row at a time so
> speed probably won't be a concern.

If you work with vserver, but not local db,
Then stored procedure is only way, because it will do this few changes
atomically. 


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