Re: [gtk-list] DataBase
- From: Larry Morley <lmorley albany net>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] DataBase
- Date: Sun, 26 Mar 2000 21:47:17 -0500
Whenever I've got a relatively small database (which is seemingly
too often :) I do one of three things: either store records fixed
length in a file and use fseek() to access them, read certain fields
into an array and use qsort() and bsearch() to access them (== a
quick and dirty quasi-btree; performance is quite good); if I'm
feeling adventurous or bored, use C++ STL collection classes to
accomplish the same thing; or just put them in text files and
scan them with strtok() or lex, depending upon the complexity of
All three ways work quite well, even up around 10K 256-byte
records. If you want, I'll send you the source I usually cut,
copy and mess with to get what I'm trying to do done.
I've found using a record manager or database to be more of a pain
in the neck than its worth most of the time when my record set
is relatively small, and I'm not doing anything horrifically
fancy with it. When I do use a database, my personal preference
runs towards Oracle because its really, really fast and the C API
is pretty staightforward. Most of the better-known packages perform
pretty well, though, and as far as I'm concerned to a large degree
its a matter of personal preference.
- Larry Morley
Pablo Fernández Navarro wrote:
> Hi there!
> I'm trying to make a new e-mail client with GTK and C (just for
> integrating my knowleadge), and I wish to use a DataBase to make the
> access to each E-Mail faster.
> Could anyone tell me which DataBase should I use?
> To unsubscribe: mail -s unsubscribe email@example.com < /dev/null
] [Thread Prev