I can give someone a screwdriver. But that doesn't mean they won't use the screwdriver to try to pry something. Just because you have a tool doesn't mean you have to use it properly. But if you do use it properly, you can achieve some truly amazing results.
That having been said, I need to mention, that if you create an index but you access the file outside of fileio, so the index is not being updated, FileIO handles this too.
In your example, if you use a file outside the context of FileIO, and you don't open every index, your unopened index would get out of date, just as you are saying.
However, any time you try to use FileIO to access a file, it checks the indexes automatically to make sure they are all up to date. If it discovers that an index file is not up to date, it automatically rebuilds the index for you before opening the file. That way any time you ARE using the index, it is guaranteed to be up to date.
Therefore your program never has to know, or worry about the index files. As I said, FileIO takes care of this for you. Think of it as a Screwdriver that has a pry bar and a swiss army knife built into it.
And best of all, its free.
Gabriel
Rick Graham wrote:However you could still create an index outside of FileIO that would never be updated. A true database would never allow this.
Rick
Gabriel wrote:Just a piece of shameless advertising for a piece of free software: If you use FileIO, the indexes are always updated for you. FileIO handles all that stuff so you don't have to worry about it.
Gabriel
Rick Graham wrote:If you really think about it, all indexes are temporary. They are only indexes when you link them to the data file with an open statement, otherwise they are just another file to the operating system. If you forget to open one when you are updating the data file, the index is not updated. This can be both a blessing and a curse.
Rick Graham