Mac compatible DB's
Rob Cozens
rcozens at pon.net
Fri Apr 15 14:15:13 EDT 2005
Oak, et al,
>So in thinking about how the db would work if it doesn't support
>relational fields, can you give me an example in Serendipity of how you
>would do a query for information in multiple tables that had a related field
>like matching a customer with their orders as in these 2 tables:
>
>Table 1
>Customer_ID
>Name
>Address
>
>Table 2
>Customer_ID
>Order_ID
First, let me say that my only experience with relational databases was a
couple of years in the 1980s when the company I was working for shifted
from Data General INFOS to SUN INGRES. Other than that, I have spent most
of the last three decades customizing corporate & small business systems
based on a hierarchical (B-Tree) database. I have never been limited by
the database in accomplishing what the client requested--though admittedly
I have had to manuallly code logic to support multiple indexing of a single
record.
There are multiple possibilities:
1. Table 1 includes a field listing the keys (or Revolution Card ID's
within an SDB database stack [SDB databases are stacks) of the customer's
orders
2. Table 2 can be keyed [Cust ID]&[Order #]. An approximate keyed read on
[Cust ID] retrieves the first order for that customer, or an exact keyed
read on [Cust ID]&[Order #] retrieves a specific order.
3. The findSDBRecord command can search any table and return all or
designated fields for each record matching specified selection criteria
4. One can script logic to create and maintain alternate indexes to any
table, including support for duplicate key values.
5. Table 1 could include all the order data for that customer and a cross
index table, Order # --> Cust ID could support processing of multiple
orders by Order #.
The "Q" in "SQL" stands for "ad hoc query", which is what SQL was designed
for. My clients rarely need ad hoc query capabilities--they want a
database built to facilitate the regular, day-in day-out operational and
informational needs of their businesses.
Rob Cozens CCW
Serendipity Software Company
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list