LB Booster
« RANDOM ACCESS LIBRARY? »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:49am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: RANDOM ACCESS LIBRARY?  (Read 550 times)
Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Re: RANDOM ACCESS LIBRARY?
« Reply #7 on: Oct 24th, 2015, 5:34pm »

I don't use Random Access Files because you can't access them randomly - unless you know the record number - which means a separate index file - which means more work keeping the index and main file in synch.

I think the simplest thing to do is use one-record files and access them (randomly !) with the file dialog statement.

r.m.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: RANDOM ACCESS LIBRARY?
« Reply #8 on: Oct 24th, 2015, 7:25pm »

on Oct 24th, 2015, 5:34pm, Alincon wrote:
which means more work keeping the index and main file in synch.

There's not much effort involved in keeping them 'in sync' because the only way they can ever lose synchronisation is when you rebuild the data file to recover the space occupied by deleted records. Typically you would perform that operation only infrequently.

Quote:
I think the simplest thing to do is use one-record files and access them (randomly !) with the file dialog statement.

That's likely to be very wasteful of disk space. Consider the classic example of a database - an address list. A record might need to be something like 200 bytes long to contain (for example) a name, address, telephone number and email. But the minimum amount of disk space occupied by a file (however small) is typically 4 Kbytes - and that doesn't take into account the size of the directory itself - so you could easily end up using more than 20 times the amount of disk space than your database should occupy!

Richard.

User IP Logged

joker
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 157
xx Re: RANDOM ACCESS LIBRARY?
« Reply #9 on: Oct 24th, 2015, 7:33pm »

Can you explain what application uses a "randomly" accessed file system?

on Oct 24th, 2015, 5:34pm, Alincon wrote:
I think the simplest thing to do is use one-record files and access them (randomly !) with the file dialog statement.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls