dollidb
v1.0.5
Published
## Overview
Downloads
5
Readme
DolliDB
Overview
DolliDB was inspired by Reddit's Thing DB. In DolliDB there are Items and there is Data. Each Item has Data associated with it. For example, say you want to store a list of Users and their details. There would be a User Item table, which would have an ID and any fields that would be indexable. Items would be arbitray data that is linked to the User item by its ID. Each Item has an ItemID that references the item it belongs to.
Under the hood DolliDB coverts objects to paths. This allows for easy writing and updating of deeply nested, artibtraily named objects.
Here's an example of how DolliDB would convert an object to paths:
const userData = {
address: {
street: '1 Sansome',
state: 'CA',
city: 'San Francisco',
},
name: 'Chester',
}
Say we created a User item with the ID as 1. The above object would be converted to the following and each primative field would be saved as its own row in Dynamo with 3 fields, ItemID, Path, and Value:
| ItemID | Path | Value | | ------ | ---- | ----- | | 1 | address.street | 1 Sansome | | 1 | address.state | CA | | 1 | address.city | San Francisco | | 1 | name | Chester |