Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database (likely noSQL) with built in data retention features

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.

like image 387
Prof. Falken Avatar asked Aug 06 '12 08:08

Prof. Falken


People also ask

Which data type is often stored in NoSQL databases?

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.

What are 3 common characteristics of NoSQL databases?

The three main features of NoSQL databases are scale-out, replication, and flexible data structure (Fig. 1).


1 Answers

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.

like image 86
Mark Hillick Avatar answered Oct 01 '22 08:10

Mark Hillick