Database

Basic concept

  • You have items which are from type product.

  • Items can be in other items or locations.

  • An item shouldn’t have set both, but if, the item wins over the location.

  • Locations can only be in locations.

  • Against the location or item where the item usually sits is the current-item or current-location.

  • This is the actual real-world state.

  • You can override the usual location or item with an overlay.

  • Overlays are temporary changes in the usual state.

  • Overlays can be (de-) activated any time.

  • Some view shows you the difference between usual and current state of the items.

  • There is a global data management using key-value pairs.

  • Keys are defined in advance.

  • Items can get filtered and compared by keys and values.

  • There is a global tag system.

  • Each tag can be a sub-tag of some other.

Tables

ENTITY

  • Organisation or person

  • Can own locations or items

LOCATION

  • Usually a not moving thing

  • Helps organize your stuff

PRODUCT

  • eg Dell XPS13, LAN Cable 3m

ITEM

  • Is an instance of a product

  • Has a location or item as a marker to location your stuff

TAG

  • Tag system to group and easily filter your stuff

OVERLAY

  • Some temporary changes or planning of stuff for events

ERD

erDiagram ENTITY { string name text note } LOCATION { string name text note } PRODUCT { string name text note } ITEM { string name text note uint amount } ENTITY }o--o| ENTITY : part-of LOCATION }o--o| ENTITY : belongs-to LOCATION }o--o| LOCATION: in-location ITEM }o--o| ENTITY : belongs-to ITEM }o--o| LOCATION : in-location ITEM }o--o| LOCATION : current-location ITEM }o--|| PRODUCT : product ITEM }o--o| ITEM : in-item ITEM }o--o| ITEM : current-item TAG { string name } TAG }o--o| TAG : parent TAG }o--o{ ENTITY : tag TAG }o--o{ LOCATION : tag TAG }o--o{ PRODUCT : tag TAG }o--o{ ITEM : tag DATA-TYPE { string name text note } ENTITY-DATA { text value } ENTITY-DATA }o--|| DATA-TYPE : type ENTITY-DATA }o--|| ENTITY : entity LOCATION-DATA { text value } LOCATION-DATA }o--|| DATA-TYPE : type LOCATION-DATA }o--|| LOCATION : location PRODUCT-DATA { text value } PRODUCT-DATA }o--|| DATA-TYPE : type PRODUCT-DATA }o--|| PRODUCT : product ITEM-DATA { text value } ITEM-DATA }o--|| DATA-TYPE : type ITEM-DATA }o--|| ITEM : item INVENTORY-ID-SCHEMA { string name text note } INVENTORY-ID { string value } INVENTORY-ID }o--|| INVENTORY-ID-SCHEMA : schema INVENTORY-ID }o--|| ITEM : iventory-id INVENTORY-ID }o--|| PRODUCT : inventory-id OVERLAY { string name text note boolean active } OVERLAY }o--o| OVERLAY : parent OVERLAY-ITEM }o--|| OVERLAY : overlay OVERLAY-ITEM }o--|| ITEM : item OVERLAY-ITEM }o--o| LOCATION : in-location OVERLAY-ITEM }o--o| ITEM : in-item