Hi Richard,
My first suggestion is using 2 files per entity.
Something like:
Customers.ind <-- Index for the database, sequentially read into an array.
Customers.dat <-- The actual database (either Random Access or Binary file)
Same thing for Orders:
Orders.ind <-- Index for the database, sequentially read into an array.
Orders.dat <-- The actual database Random Access file.
The main reason I suggest this is that of course you can retrieve your
information reading from the indexed (ordered) file. Then position yourself
in the data file itself.
The index should be basically your key value, RecordNumber So say you want
to order by customer name, your index would have
Sample:
"Alan Jackson", 3
"Mark Clayborn", 2
"Stephane Richard", 1
You could have a small sorting routine to order the index when you're
entering, modifying or deleting records. When you read that index you just
load them up sequentially in an array. and when you search, look in the
array first, get the record number you need, and do a GET #1, RecordNumber,
CustomerData (a user type for customer information).
This is primitive but should do the job rather nicely.
There's also SQLite http://www.sqlite.org/ which doesn't require any setup
on the part of the customer. I'm just not sure if SQLite can be used with
RB, I'll let someone else answer that one :-).
Hope this helps. If you want more details, feel free to contact me.
Stephane Richard
----- Original Message -----
From: "Richard Hillsdon" <[EMAIL PROTECTED]>
To: "REALbasic NUG" <[email protected]>
Sent: Monday, September 18, 2006 6:00 AM
Subject: Data(base) Files
Hi,
What's the best way of creating an Application that can be run which
needs to create/keep/use a customer database, without using MySQL etc.,
which would require the user to setup something external, which they are
unlikely to be able to do on a standalone machine.
Years ago I would have used an MSAccess database with my VB App, which is
then standalone, but obviously I can't do that now. Also, I will be
building the App to run on the Mac and Windows and Linux. Is using XML
any good? The database will have about 4000 customers in the end and
about 15000 orders.
Any ideas? Basically I need a flat file format database I guess. Can
you help?
Richard H
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.4/449 - Release Date: 9/15/2006
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>