I am developing a firefox extension which is to serve as a user profiling and web personalization engine. It needs to store TF-IDF related data of web pages. My question is, which would produce faster simple search results?
a. Using a custom data structure and storing the entire data structure in a file, loading it to memory and querying it?
OR
b. Storing and querying and the data off an SQLite database?
It is safe to assume a worst case scenario of around 250,000 rows in one of the tables.
Your question basically boils down to:
a. Should I write my own custom implementation of a data storage system?
or
b. Should I use an off-the-shelf, proven data storage system?
I would say if you go with the first approach, that:
Another way of looking at this is: why would you NOT use SQLite? Is there some kind of problem with it for your scenario? I can’t think of any.
I would certainly be inclined to start with SQLite (or something similar). If it proves to not work in some way, only after exhausting any other off the shelf alternatives would I consider writing my own data storage library.