GithubHelp home page GithubHelp logo

Datasource for all elements about carsus HOT 3 CLOSED

tardis-sn avatar tardis-sn commented on August 23, 2024
Datasource for all elements

from carsus.

Comments (3)

mishinma avatar mishinma commented on August 23, 2024

The idea there was that quantities are related to one line or level that already have a datasource. Therefore, the datasource for the quantities can be obtained by joining them on the levels/lines table. Another way could be to add the datasource field to QuantityMixin and then all quantities would have it. But then levels and lines also have a datasource and IMO that is bad.

Relevant scheme:
https://trello-attachments.s3.amazonaws.com/5720fd4f7dc76ef0c90c43c5/1115x599/b3a9c949603806aeb5ec7075b63716cc/pr_transition_mapping_classes.png

from carsus.

yeganer avatar yeganer commented on August 23, 2024

That's a point I can understand.
My idea was to make it easier to purge all data connected to one datasource from the database.

The current model does not allow updating data inside the database and ingesting new data will at some point corrupt the database if for example a level is ingested twice.

So in the long run, if we don't want to rebuild the database every time, we need a mechanism to easily update data or make it easy to remove all data linked to one datasource.

from carsus.

mishinma avatar mishinma commented on August 23, 2024

From database design point of view I think it would be really beneficial to abstract levels and transitions (like atoms and ions) based on some inherent properties. Then Quantities could have the datasource field, as they are measured and therefore are not absolute. But it turned out to be a very nontrivial task, so I added datasource to levels and transitions themselves.

Thinking about it again now, I agree that adding datasource to quantities is a good idea. We just need to have a rule (maybe implicit and not enforced) that a level and its related quantities must come from the same datasource. I also think we should not allow to ingest a level from the same datasource twice (maybe as a constraint). No constraints are enforced presently.

from carsus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.