Temporary Index

General development discussion.

Moderators: Susan Smith, admin, Gabriel

Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

The FileIO library is a tool you can use to implement a true database in BR. If you use it properly, you wouldn't create any indexes outside of FileIO, and therefore you're database would be as true as you want it to be.

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
Rick Graham
Posts: 45
Joined: Sun Jun 07, 2009 10:50 pm

Post by Rick Graham »

I can't disaggree with anything you have said. I'm just trying to point out that if you give someone a loop-hole they will take advanage of it every time

Rick
Gabriel wrote:The FileIO library is a tool you can use to implement a true database in BR. If you use it properly, you wouldn't create any indexes outside of FileIO, and therefore you're database would be as true as you want it to be.

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



Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

I understand what you're saying, and I know people will take advantage of any shortcuts they can find. Not only that, we need to support legacy code, which was written long ago before the standards were in place. That's the reason that we automatically detect when indexes are out of date and rebuild them for you.

If this doesn't address the problem, please let me know. I'm always trying to make FileIO better and more useful.

Gabriel

Rick Graham wrote:I can't disaggree with anything you have said. I'm just trying to point out that if you give someone a loop-hole they will take advanage of it every time

Rick
Gabriel wrote:The FileIO library is a tool you can use to implement a true database in BR. If you use it properly, you wouldn't create any indexes outside of FileIO, and therefore you're database would be as true as you want it to be.

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

Post Reply