Norsu schema is pretty simple. We will observe the main involved abstractions in the following sections and will provide just a brief outline here.
Four main tables:
Environments
to let logical segregation of content between tenants (spaces) and between stages (envs themselves)Objects
to store actual content and its versionsVersions
to track object modification historyNodes
to track the references to the current content versions
test_master
table which is actually a partition of the nodes created when a user created an environment master
in a space test
Auxiliary tables
Tags
to allow us to pin/freeze certain node tree versions in timeTable views allowing to easier access the content
E.g.Repository
****stitches the objects, nodes and versions together with joins, allowing for less SQL boilerplate to be written by the user.
👈 click to open schema diagram
Object or, to be even more, precise JSON object is the base unit of data stored in Norsu. Objects are stored in the corresponding Objects
table in schema.
JSON objects are identified with the value of sha256 hash calculated with pg_crypto
extension.
The main two types of objects stored in the table are:
Content objects, which are mere JSONs containing only business properties.
{
"foo": "qux"
}