Please note, I deal only with the indexing side of things, you will still want to divide the data into seperate tables as Adam suggested, if you efficiently divide data so each table will primarily be serached on 1 (or 2) fields you can use a simple Primary key for each table. The best structure depends on how much data, the data and how you'll be searching. If you have a natural Primary Key (a good value to serach on) such as ISBN then you may want to order it simply by that in a flat table structure. A simple Primary key will also suffice if you will have small ammounts of data and search time isn't neccesarily critical. However, if you'll need to search lots of data quickly on different fields (e.g. Libraries a books held at) then you may want to think about extra indexes. If you'll often be searching on given sets of fields (e.g. Book title, Library, Borrowed) you could hash those fields for indexinbg a Hashtable. If you'll be searching inmdependently on many fields you could use a B-Tree or the like to index various fields seperately. This would speed up searching on the PC but may slow things down on the PIC. You could have indexes on the PC that weren't transferred to the PIC to reduce EEPROM usage on the PIC. You will still be able to search on other fields it'll just be a search of unordered records. If you looking for info on B-Trees and the like look for a book on Data Structures and Algorithms. Most Comp. Sci. courses include a course on different storage structures (B-Trees, AVL Trees, Hashtables etc.) and algorithms (Binary search, Insertion search etc). The textbooks for these courses provide quite a lot of info on efficient data structures\algorithms for different uses. Generally not aimed at PIC-level devices (e.g. assume caches and the like) but will help with the PC and give some ideas for the PIC. If you're not sure about concepts such as Primary\Foreign keys then I suggest looking for some introductory database material. Articles about writing database programs using existing database products should give you an adequate description of basic indexing\relationships. So, the best structure depends, among other things, on: How much data? How will it be searched? Whether it will be searched in the PIC? Tom. -----Original Message----- From: David Huisman [mailto:david.huisman@ADVMININGTECH.COM.AU] Sent: Monday, June 05, 2000 5:18 PM To: PICLIST@MITVMA.MIT.EDU Subject: [OT] Additional info regarding database requirement Maybe my last post was not specific enough. Here is a more precise example of what I need the database to operate like. The data saved in the eprom must reflect the above structure but the PC database must be fully searchable. ie. Address of library1, date opened, contact etc. I spose it all sounds fairly straight forward but it is the COMPILING that I have trouble with. I need an algorithm of how to search the database and place each data block in the appropriate sub directory. Regards David Huisman