What open source databases have features for automatic "aging out" of data, so that you can specify for how long a piece of data must be stored?
I.e. a set date or time on a piece of data, after which, the database is free to remove every trace of it.
Update: I am more looking for an age out time of days to years, more than minutes or seconds. So a cache mechanism isn't exactly what I am looking for.
In a NoSQL database, a book record is usually stored as a JSON document. For each book, the item, ISBN, Book Title, Edition Number, Author Name, and AuthorID are stored as attributes in a single document. In this model, data is optimized for intuitive development and horizontal scalability.
The three main features of NoSQL databases are scale-out, replication, and flexible data structure (Fig. 1).
MongoDB has something in the new release 2.2, which may be of interest - TTL Collections.
Collections expire by way of a special index that keeps track of insertion time in conjunction with a background mongod process that regularly removes expired documents from the collection. You can use this feature to expire data from replica sets and shard clusters.
It's pretty easy to create a TTL collection from the mongo shell -
db.mycollection.ensureIndex( { "status": 1 }, { expireAfterSeconds: 3600 } )
Download 2.2rc0 here (release candidate, not quite production ready...there will be one more release candidate before the production build)
Change Log here
2.2 release notes can be found here.
I can't speak for the other solutions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With