[SQL] Client and server cursors
Gunnar Swan
GunnarSwan at PracticeToPass.com
Tue Mar 4 14:20:23 CST 2003
3/4/03 1:08:35 PM, Ruslan Zasukhin <sunshine at public.kherson.ua> wrote:
>Hi guys,
>
>Just want discuss a little issue of cursors for Valentina Client.
>
>As some of you know mySQL and Postgre, have client-side and server-side
>cursors.
>
>When e.g. MySQL create client-side cursor this means that found N records
>are transferred to client into its RAM, and there is no more overhead on
>Server side.
This is ok.
>
>Now you can ONLY read records of this cursor.
This is ok.
>
>IF you want change or add or delete some record of this cursor, you need
>send to server OTHER SQL command as
> "INSERT ... " or
> "UPDATE .. WHERE ID = N"
> "DELETE .. WHERE ID = N"
>
And create a new cursor to modify a record or add new record.
This is ok. I do this today.
Many times I use joins to fetch recordset (cursor). I rarely
write records to a joined recordset. I almost always open
new cursor and insert to the table, then refresh.
>-----
>What we try now implement for Valentina is ability to use the SAME cursor
>API, that we use for local dbs.
>
>So this looks as
>
> curs = db.SqlSelect( "SELECT ...", ReadWrite, kClient )
>
>Now if you want do modifications of records you can do simply:
>
> curs.Stringfield( "name" ) = 'something new'
> curs.Update(); <<<<<<<< this send command to server.
>
>>> What you think about this approach ?
Does this not imply many open, scrolling cursors on server ?
And lots of RAM for cursors ?
Over TCP/IP ?
If on internet, is data encrypted or the transmission ?
Best Regards,
Gunnar Swan
http://www.PracticeToPass.Com
Software Built For Statutory Courses
More information about the Valentina
mailing list