Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any design patterns for bitemporal NoSQL databases? [closed]

I'm curious if anyone has implemented or even knows of any bitemporal databases built on NoSQL platforms (e.g., riak).

like image 985
Pinko Avatar asked Oct 21 '10 16:10

Pinko


People also ask

Which of the below information can easily be answered using a Bitemporal data model?

With a bitemporal database, you can store and query data along two timelines with timestamps for both valid times—when a fact occurred in the real world (“what you knew”), and also system time—when that fact was recorded to the database (“when you knew it”).

What are NoSQL data architecture patterns?

Architecture Pattern is a logical way of categorizing data that will be stored on the Database. NoSQL is a type of database which helps to perform operations on big data and store it in a valid format. It is widely used because of its flexibility and a wide variety of services.

What are the limitations of NoSQL?

What are the drawbacks of NoSQL databases? One of the most frequently cited drawbacks of NoSQL databases is that they don't support ACID (atomicity, consistency, isolation, durability) transactions across multiple documents. With appropriate schema design, single-record atomicity is acceptable for lots of applications.

Why NoSQL databases are not always a good choice?

Most databases in NoSQL do not perform ACID transactions. Modern applications requiring these properties in their final transactions cannot find a good use of NoSQL. It does not use structured query language and are not preferred for structured data.


1 Answers

I don't know of any NoSQL datastore that are specifically designed to handle temporal data. In order to put the valid and transaction time periods onto data in Riak you would need to either:

  1. Wrap your documents/values with a structure that can hold metadata like:

    { meta:{ valid:["2001-11-08", "2001-11-09"], transaction:["2011-01-29 10:27:00", "2011-01-29 10:28:00"] } payload:"This is the actual document/value I want to store!" }

  2. Create a "meta-document" for each document and use Riak Links to link them up.
    I think this is a little bit cleaner but if you need to retrieve these times often then this method may be too slow.

If you want to retrieve documents by time then I don't think Riak (or any other key/value datastores that I know of) will be the right datastore to use. SQL or possibly some BigTable system may be your only good option.

like image 196
Andrew McKnight Avatar answered Sep 25 '22 04:09

Andrew McKnight