I am thinking of a use case for this database, and one point is building a layer of abstration on top of this underlying simplicity. One of my goals is to reduce the data footprint by storing data with singularity. In order to do that though, I would need to be able to do a single operation where I have a value and I want to either insert it as a new item and return the item id, or if it already exists, I want to return the item id of the existing item and not insert it.
I am thinking of a use case for this database, and one point is building a layer of abstration on top of this underlying simplicity. One of my goals is to reduce the data footprint by storing data with singularity. In order to do that though, I would need to be able to do a single operation where I have a value and I want to either insert it as a new item and return the item id, or if it already exists, I want to return the item id of the existing item and not insert it.
Here is what that might look like in TySON: