1. more help!
Hi euphorians!
Last night i was taking a look to the simple(not simple for me!)
database program included in the Euphoria package( i don't
remember it's name right now!). I arrived to the conclusion
that it would read the database archive( with estructure of
sequence ) stored in the hard disk and put it as a *whole* in the
ram memory.What would happen if the data base archive is 300MB big
and i only have 8 MB of ram?(In the documentation says that it
doesn't works fine if it has over 1000 records).The creation of a
swap archive would slow down the speed of reading,finding,etc?
Thanks,
Luis Campos
2. Re: more help!
At 07:05 PM 4/28/98 +0000, Luis Campos wrote:
>Hi euphorians!
> Last night i was taking a look to the simple(not simple for me!)
> database program included in the Euphoria package( i don't
> remember it's name right now!). I arrived to the conclusion
> that it would read the database archive( with estructure of
> sequence ) stored in the hard disk and put it as a *whole* in
> ram memory.What would happen if the data base archive is
> 300MB big
> and i only have 8 MB of ram?(In the documentation says that it
> doesn't works fine if it has over 1000 records).The creation of
> swap archive would slow down the speed of
> reading,finding,etc?
>
It certainly would! Even with lots of memory, with a file this large (or
even a few megs) the speed of loading and saving would be too slow to make a
practical program.
There are two ways I can think of to solve the problem:
1. Create fixed-length records on disk, then you can do
reads and writes of single records (using seek, and
perhaps sorted index files)
2. Use doubly-linked lists - but this wouldn't be efficient with
variable length records, either, come to think of it.
Anybody have a better idea?
Irv
3. Re: more help!
>It certainly would! Even with lots of memory, with a file this large (or
>even a few megs) the speed of loading and saving would be too slow to make
a
>practical program.
>
>There are two ways I can think of to solve the problem:
> 1. Create fixed-length records on disk, then you can do
> reads and writes of single records (using seek, and
> perhaps sorted index files)
> 2. Use doubly-linked lists - but this wouldn't be efficient with
> variable length records, either, come to think of it.
>
>Anybody have a better idea?
Raul (or Luis?), Irv is right. That demo is just that, a demo ;) It tries to
show how easy you can create "records" with euphoria, and save/restore them
easily. You have two choices now:
1.- Use Ralf's EDOM2 to store/retrive your data structure to disk (and
compressed!). I'm not sure, but I think you can retrive "slices" of your
structure (if you can't, Ralf will invent a way... that's for sure!).
2.- Use my DBF engine. It's old, long-time-ago-last-updated.... but works! I
even was sanctified by a fellow euphorian who used these routines for a data
recovery. They use Dbase III+ format, so you can write/read files compatible
with old (and new... Access/Delphi/PowerBuilder...?) programs.
You can find both routines on RDS site... mine is at the archive (the
sarcofagus?) and at http://www27.pair.com/daber/architek)
I'm glad there's another user that's seems to be interested on Euphoria for
developing non-games apps.
Regards,
Daniel Berstein.