Conceptual database questions...

Ruslan Zasukhin sunshine at public.kherson.ua
Thu May 26 12:26:41 EDT 2005


On 5/26/05 4:32 PM, "Lynch, Jonathan" <bnz2 at cdc.gov> wrote:

Hi Jonathan,

> Hello everyone...
> 
> I feel like I am just not getting some basic concepts in trying to use
> the Valentina kernal for RunRev. So, I have a few questions:

As I see you use VXCMD 1.x

Please note that in nearest days we will start beta testing of
    Valentina 2 for Revolution.
 

> 1) Is a base object (table) basically a set of columns?

BaseObject = Table as in mySQL, Postgre, ... And RDBMS.
 
Table have fixed number of columns
    and many number of rows

> 2) A base object can contain zero records, yet you are still allowed to
> set the value of a field in a base object. Does setting the value of a
> field, without any selected record, basically have no effect?

You can but What sense?
 
Usually after you set field values you will do Table.AddRecord()


> 3) Is the following the correct order of events for creating a record:
> a) Create database or make sure it exists
> b) Create table (base object) or make sure it exists
> c) Create columns in table or make sure they already exist
> d) add record, at which time that record becomes the selected
> record for that table
> e) insert information into that record

Not very correct.

Points (a-d) usually are located in special function as

    CreateMyDatabase()

This function is called only when you need create new db files on disk.
So more often you will just open db, and work with it.

> 4) Since a cursor is a selection of records, can you have a cursor if
> the table has zero records?

Yes. Then cursor have ZERO records.
 
> 5) When is it necessary, and when is it not necessary but probably
> better, to use a cursor rather than working directly with the base
> object?

In 2.0 we will introduce big set of new API to work directly with Tables.
Very big set of records and new features. It allow solve any task without
SQL. This is named Navigational Database Model.

VXCMD 1.x do not have such power.

Choice between API and SQL ways will depend on your task and your favor.
 

> 6) Do records have specific IDs, such that I could call up record 57 of
> base object "billingdata"?

Yes, RecID field

Also in 2.0 we have add OID - it identify record by unique id in the scope
of database.


> Thanks, and my apologies if I am asking ignorant questions for which I
> should know better.

-- 
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 Use-livecode mailing list