Logo F2FInterview

CouchDB Interview Questions

Q   |   QA

If there's a strong correlation between time (or some other regular monotonically increasing event) and document deletion, a DB setup can be used like the following:

  •     Assume that the past 30 days of logs are needed, anything older can be deleted.
  •     Set up DB logs_2011_08.
  •     Replicate logs_2011_08 to logs_2011_09, filtered on logs from 2011_08 only.
  •     During August, read/write to logs_2011_08.
  •     When September starts, create logs_2011_10.
  •     Replicate logs_2011_09 to logs_2011_10, filtered on logs from 2011_09 only.
  •     During September, read/write to logs_2011_09.
  •     Logs from August will be present in logs_2011_09 due to the replication, but not in logs_2011_10.
  •     The entire logs_2011_08 DB can be removed. 

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: