Architectures using DBJSON

All the architectural solutions of databases with DBJSON interface fall into three categories:

A: Native DBJSON database
B: DBJSON mediator to RDBMS
C: DBJSON SQL Extensions


Native database of DBJSONtm objects. This is a kind-of-a hierarchical database. This is also kind-of-a OO database. It contains DBJSONtm objects. It does not require transformations of relational DB entities to/from DBJSON entities. Internal user language of the DBJSON native DB is JavaScript. Stored procedure and functions in that DB are written in JavaScript, and send receive only DBJSON messages.

DBJSON Mediator

This is separate component that provides DBJSON interface to the user/caller on one side, and  communicates with the RDBMS on the other side.

DBJSONtm Mediator can be local (running on the same machine as the caller) or global (running on the same machine as the RDBMS it uses)

DBJSONtm Mediator can be in-process or out-of-process component.

Out-of-process mediator is very interesting because it can act as a cache of DBJSON objects. It also can be synchronised with RDBMS in the back in a separate parallel process.

DBJSONtm can serve many users and use many RDBMS’s in the same time, thus acting as an TP Monitor.

One DBJSON Mediator product would be required to comprehensively mediate to one RDBMS product. DBJSONSQLSVR , DBJSONORACLE, DBJSON*MySQL, etc.

The messaging protocol

DBJSON is JavaScript interface to the data base. DBJSONtm interface is a kind-of-a message based interface. Users are interacting with RDBMS through a message based interface. Until now SQL was the language which was used to made messages to call RDBMS. Return was in a form of binary blob, which was readable with a help of an iterator called “cursor”. This is a curious asymmetry.

DBJSONtm interface communication protocol is symmetrical. Stream of DBJSON objects is flowing both ways : to the DB and from the DB. DBJSON is actually communication protocol based on JSON. (please visit http://json.org)

DBJSONtm message is always one single JSON object. This is it:

/* one dbjson message */
dbjson : {/* message content */ }

As obvious, dbjson object is one single json object with a single property called ‘dbjson’. Type of a ‘dbjson’ property is an object. The whole dbjson message is allwys inside this object.

Next page please.

6 thoughts on “DBJSON: SELECT * FROM persons AS JSON”

Comments are closed.