SQL, shared access to db // Codebase Database API

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Aug 9 01:30:48 CDT 2006


On 8/8/06 11:36 PM, "Robert Sneidar" <bobs at twft.com> wrote:

> My Holy Grail for my project would be if a driver could be written,
> perhaps for something like a Codebase server which can access xBase
> tables directly, where I could open shared tables and indexes, and
> then peruse through the data in precicely the same way as I did in
> Foxpro. I personally think t his would be very advantageous for
> Revolution in general, as there must be a lot of users who don't want
> to learn SQL, they just want to:

> open a table
> sort it
> find some data
> stuff some variables
> get user input
> check for data validity
> lock the record/table
> check that the record has not been updated
> write the data back
> unlock the table.

Robert, all this present right now in Valentina 2.
And let me repeat, IMHO in better way then Fox did have.

> All in a shared environment. (meaning multiple users can open the
> file at once)
 
> In SQL sorting, finding, and rewriting data in any kind of complex
> way forces the developer to learn complex SQL syntax, which is what
> Revolution promises to avoid.

* When Revolution did promise this?
    RevDB is built around SQL as I see.

* why you say SQL it is complex. It is soooo simple actually.

    SELECT f1, f2, f3
    FROM T1
    WHERE f1 > 5 and f1 < 25 or f3 LIKE 'Pet%'
    ORDER BY f2 Desc

4 lines of code on natural English.
Try this write in API style. Will be about 10-20 lines of code.
As for Fox so for Valentina's API style.

And the main advantage of SQL over API style is -- SQL was invented for
access to REMOTE dbs.

Above SQL is just few bytes which will be sent via inet. All work is done on
SERVER, and back you get data. Now tell me please scenario for API style?
You must issue many commands between client and server computers, load to
client may be even indexes, do calculations on client side and send it to
server....

SQL wins on client-server environment. No doubts here.


> Valentina seems to provide this using it's API methodology,

right

> but I was given to understand that the files
> created using the non-sql method are not opened shared.

Hmm, not right.

> This is  critical for my application. I suppose I can create a stack that can
> open tables and return data to the user's runtime apps, but I am  still
> bottlenecking the traffic, and any request for a lot of data  will inevitably
> bring other users to a halt.

You have told me about Code Base SERVER. Right? So you are ready to use
SERVER? I.e. You are ready to use Client Server model in your app. Right?

Then you talk NOT about SHARED access to db files,
    but about CLIENT - SERVER access.

And Valentina is able do this with help of V4REV and Valentina Server.

What we do not support in Valentina and never wont - is SHARED ACCESS.

SHARED ACCESS means that
    * db files are on some server computer,
    * there is no SERVER application
    * client applications open db files in shared mode.

    This is much slower then client/server model.
    Mainly because in this way not exists cache on server side.

 
>   I can learn SQL alright, but time is my enemy. Already people are
> talking about "the future of SBT" around the office, meaning they
> want to get rid of it. I want to port it and make it what they want
> it to be. I am stuck at the database model, and I need a solution
> soon. If Valentina can provide a non-sql way to access tables and
> indexes directly, in a relational model, I would be very interested
> in knowing how. Since I already purchased Valentina, I am willing to
> give it another go.

Robert, 

In Valentina for Revolution Examples folder exists API_Way folder,
Where we have examples more than in SQL way. :)

Please check this API example.
They show all major operations.

-------------------------
About indexes:

    to create index with some complex expression, you need create in the
    table so called Method = aka Calculated field = aka Virtual field.

E.g. On Valentina list present Jon (jda), he make in table index that join
all other fields, and mark it as indexed by words. In this way he get
ability do search by all fields of table. It is very reach feature. By
features exactly like as in Fox.

Also you can note that exists RAM tables - for tmp data.

Also you can create these Methods marked as Temporary. Then they will not be
stored into system tables.

In 2.4 we have add also ability to create in a Table - Temporary field. Nice
thing here is again - it is not stored into sys tables, and its data are
stored on .tmp volume. So in case of any failure, you main .dat file is not
touched at all.   


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