Database question.....

J

John D.

I have a small (fewer than a few thousand records) database with the
following properties:

Each record has four fields: A, B, C, D.
Fields A and B are unique:
there is one B for every A and one A for every B.
Fields C and D are not unique.
Sometimes I need to use A as the key, other times B is the key:
I use A to return B, C, D and also B to return A, C, D.
The items may all be represented as short ASCII strings.

Currently I am storing this in a 100KB file and converting this to two
dictionaries. I am reading and writing the entire file to update single
records, which is inefficient. I am thinking about using anydbm, but then
how do I do the two-way dictionary lookup? Would I have to store the whole
database twice? What if I had ten items, would I have to store it ten
times? Is this what a relational database allows?

John
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top