BONSAMURAIS / BONSAMURAIS/schema

Reference unit is not implemented

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
design initial-release
Dominant language
PLpgSQL
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

@boweidema I am having trouble understanding the language here, or at least how it would be implemented. For example, the [wiki says](https://github.com/BONSAMURAIS/bonsai/wiki/Data-Storage):

> Reference unit: This is the quantity of the flow to which the quantity of a datapoint should be seen as proportional to. For example, a flow of a specific quantity of CO2 from an activity may be related to another flow of this activity (e.g. 1 km) or to a time period (it may for example be the annual operation of this activity). In RDF, these relations must be made explicit for each datapoint, while in most raw data sources, the reference unit is implicit in the underlying schema (e.g. a schema-specification can be that numbers are always given per unit of the determining output of the activity).

However, it seems like we could just add a self-referential foreign key in `flow` which would accomplish the same, and drop the idea of a activities having reference flows altogether. It seems like there could be plenty of data sources where we might only have either activities or flows. Seems like an artificial limitation.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Data-Storage wiki section cited in the issue and compare its reference-unit model with the proposed self-referential foreign key in flow. Resolve whether activities may contain only activities or flows, then document the chosen schema behavior and its constraints; no implementation file or test is named in the payload.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.