mediachain / concat

Mediachain daemons
MIT License
42 stars 13 forks source link

Query Language #9

Closed vyzo closed 7 years ago

vyzo commented 7 years ago

We need a query language so that we can search and retrieve statements from the node.

Basic structure, following SQL:

SELECT <selector> FROM <namespace> [WHERE <condition>] [LIMIT <limit>]

The selector dictates what parts of the statement are retrieved; it can be the whole statement, or any (combination) of fields from the envelope. Conditions should support at minimum retrieval by publisher id and timestamp, which is a baseline requirement for implementing pubsub synchronization.

Open Issue: Semantics of statement retrieval get murky when we involve compound and republished statements, which are composite. Which parts of the statement should we retrieve in this case?

parkan commented 7 years ago

Hmm I'm wondering how much relational algebra we are going to implement. Maybe a lot, so this is actually a pretty appropriate approach.