4 ms·
No, you'll have created a paging system, and it'll probably fight with your OS's pager. The disk paging system is but one of the components of a database, but
by lsb 13y ago
No, you'll have created a paging system, and it'll probably fight with your OS's pager.
The disk paging system is but one of the components of a database, but what makes a database a database is the leverage that you get over your data, versus just a blob on disk.
- Arwill 13y agoActually what i find to be the core question in deciding to use a database or not, is whether all data can be loaded at program start into memory or not. Loading all data at start is pretty simple and efficient. In this regards, there is another problem, getting the changes from memory back to the disk. Writing all data to disk, and even overwriting existing data is out of question, so such a system is needed which saves the changed data incrementally. Is there such a "database", which: a. loads up all the data at the start + loads the incremental changes, b. writes the incremental changes in transactional manner to disk, while not messing up the OS paging? I wonder if there is such a "persistent paging file" library available?
- marcosdumay 13y ago>Is there such a "database", which:...? As far as I know, no, all of them are lazy and load only what you query into the memory. But if your data fits in memory, it'll stay there, and subsequent queries will be faster. Also, you can take the quotation marks from database, you have some quite generic requisites, most of them implement all requisits, except for the caching at startup one.
- delian66 13y agoI think you may be interested in checking out Redis (it is an in-memory data structure server); see especially http://redis.io/topics/persistence#append-only-file http://redis.io/topics/persistence#append-only-file .