Database for DOS C program

  • Thread starter matt.b.williams
  • Start date
M

matt.b.williams

I am writing a program for a handheld device. It is a simple C
program and it runs in a DOS like environment. I'm compiling it in
Microsoft Visual C v1.x. Anyway, as part of this application, I have
to search a rather large lookup file. Simply looping on a flat file
takes far too long and the processor isn't fast enough to compile an
index file of my own on the fly.

So, this brings me to the point of having to find a database library
that I can use in this situation. Something small and simple woudl be
preferable as space on this device will be limited. Is there a
database library that anyone knows of whichI may be able to use? If
so, any info and/or links would be very helpful.

Thanks in advance,
Matt
 
C

Clever Monkey

I am writing a program for a handheld device. It is a simple C
program and it runs in a DOS like environment. I'm compiling it in
Microsoft Visual C v1.x. Anyway, as part of this application, I have
to search a rather large lookup file. Simply looping on a flat file
takes far too long and the processor isn't fast enough to compile an
index file of my own on the fly.

So, this brings me to the point of having to find a database library
that I can use in this situation. Something small and simple woudl be
preferable as space on this device will be limited. Is there a
database library that anyone knows of whichI may be able to use? If
so, any info and/or links would be very helpful.
Google is your friend. Try "C library database".

I see: SQLite and DBM.
 
W

Wolfgang Mahringer

Hi Matt,

I am writing a program for a handheld device. It is a simple C
program and it runs in a DOS like environment. I'm compiling it in
Microsoft Visual C v1.x. Anyway, as part of this application, I have
to search a rather large lookup file. Simply looping on a flat file
takes far too long and the processor isn't fast enough to compile an
index file of my own on the fly.

I can recommend Faircom's "ctree" product.
Very stable and fast. Very immune against sudden power failures
or program crashes.
I am using it for years now, under various OSs, including
pure DOS.
You get the source, it is highly portable.

It costs $$, but it is worth every one of it :)
Maybe you can get an older version somewhere, version 6 will do nice.

HTH
Wolfgang
 
B

boa sema

I am writing a program for a handheld device. It is a simple C
program and it runs in a DOS like environment. I'm compiling it in
Microsoft Visual C v1.x. Anyway, as part of this application, I have
to search a rather large lookup file. Simply looping on a flat file
takes far too long and the processor isn't fast enough to compile an
index file of my own on the fly.

So, this brings me to the point of having to find a database library
that I can use in this situation. Something small and simple woudl be
preferable as space on this device will be limited. Is there a
database library that anyone knows of whichI may be able to use? If
so, any info and/or links would be very helpful.

Thanks in advance,
Matt

<OT (most likely)>

If your flat file is read only and its content is static, maybe you can
use GNU gperf to generate a perfect hash function for you?
http://www.gnu.org/software/gperf/gperf.html


</OT>
 
U

user923005

I am writing a program for a handheld device. It is a simple C
program and it runs in a DOS like environment. I'm compiling it in
Microsoft Visual C v1.x. Anyway, as part of this application, I have
to search a rather large lookup file. Simply looping on a flat file
takes far too long and the processor isn't fast enough to compile an
index file of my own on the fly.

So, this brings me to the point of having to find a database library
that I can use in this situation. Something small and simple woudl be
preferable as space on this device will be limited. Is there a
database library that anyone knows of whichI may be able to use? If
so, any info and/or links would be very helpful.

You want SQLite or FastDB.
You asked in a wrong place.
A web search will find this stuff for you easily.

http://www.garret.ru/~knizhnik/fastdb.html

http://www.sqlite.org/
 
C

CBFalconer

I am writing a program for a handheld device. It is a simple C
program and it runs in a DOS like environment. I'm compiling it
in Microsoft Visual C v1.x. Anyway, as part of this application,
I have to search a rather large lookup file. Simply looping on a
flat file takes far too long and the processor isn't fast enough
to compile an index file of my own on the fly.

So, this brings me to the point of having to find a database
library that I can use in this situation. Something small and
simple woudl be preferable as space on this device will be limited.
Is there a database library that anyone knows of whichI may be able
to use? If so, any info and/or links would be very helpful.

Not enough information. It is possible that hashlib may do what
you want. See:

<http://cbfalconer.home.att.net/download/>

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
 
C

CBFalconer

Wolfgang said:
I can recommend Faircom's "ctree" product. Very stable and fast.
Very immune against sudden power failures or program crashes. I
am using it for years now, under various OSs, including pure DOS.
You get the source, it is highly portable.

It costs $$, but it is worth every one of it :) Maybe you can
get an older version somewhere, version 6 will do nice.

That has been around for close to 20 years, so it should be highly
bug-free.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,182
Latest member
BettinaPol

Latest Threads

Top