I have a large databse contained in a Delphi 7 TTreeView. The database contains equipment with parameters situated on different floors in different buildings on different sites. The structure of the databse is as follows:
Heading - Level 0
Site - Level 1
Building - Level 2
Floor In Building - Level 3
Equipment on Floor - Level 4
Parameters of Equipment - Level 5
The bulk of the data is on the Equipment Parameter level 5, where some of the equipment may contain up to 150 lines of parameter information. The total database is now over 140000 lines in the TTReeView.
I need to search for specific equipment in specific buildings. When the databse was small my program worked quite well as searching entails the program reading through all the lines when searching for a piecei of equipment. With the larger size of the database however this in now very slow.
Is there a way to construct some indexing or other methods where the program will be able to search from the index for a building, floor and equipment without having to read through every line on especailly level 5, taking into account that the program is dynamic where equipment on level 4 is constantly added or removed?