🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #3393

C Database

#3393
From: Tony Butler
Date: Sun, 27 Sep 1992 14:02
24 lines
1523 bytes
Hi,

I'm trying to write a database application in C, and I want the records
to be in alphabetic order. The 'obvious' solution is to use a doubly
linked list to maintain this order. The problem is though that I
anticipate having a database too big to fit in memory, so I can't load
it all up, search the database, and add a new record in the appropriate
place. So the problem is, how do I search this database and add records
to it - with a linked list, the links point to memory locations, which
is no good if the records are on disk. Aslo, I would (presumably) want
to maintain a buffer of x records in memory top speed things up a bit -
what's the best way to go about this??

Any help would be much appreciated, please email me your response.


   Tony.


 ----------------------------------------------------------------------------
| Tony Butler                           Internet: abutler@ariel.demon.co.uk  |
| Surrey,                                 TCP/IP: 158.152.8.125              |
| England.                               Fidonet: Anthony Butler @ 2:250/408 |
 ----------------------------------------------------------------------------
Technical Details
Message-ID: <717610102snx@ariel.demon.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!demon!ariel.demon.co.uk!abutler

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
From: abutler@ariel.demon.co.uk (Tony Butler)
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!demon!ariel.demon.co.uk!abutler
Subject: C Database
Distribution: world
Organization: Megadodo, Inc.
Lines: 25
Date: Sun, 27 Sep 1992 14:02:23 +0000
Message-ID: <717610102snx@ariel.demon.co.uk>
Sender: usenet@gate.demon.co.uk