News for hackers. Stuff that matters.
Re:Write code. Not too much. Mostly functions. by wxd2351 on Tuesday December 22, 2020 @08:14AM (#25505901)
I definitely agree, I've realized that most programming languages store data in a hierarchy (structs within structs) which you then "query" in a very static way with the "." operator. Normalizing data and storing it relationally seems way more flexible for a lot of use cases which is why most databases are relational and not hierarchical.

However, I've tried to figure out how to actually store and query data relationally in a language like C++ and haven't been able to figure out a good way. I don't want to use SQLite because of performance, this needs to be close to real time (like a game or something similar). I just want a way to store data relationally in memory in C++. I'm still trying to figure out the right approach here. C++ is very static which makes it difficult. I've been able to figure it out in Javascript though.

Re:Write code. Not too much. Mostly functions. by lenkite on Wednesday December 23, 2020 @09:46PM (#25524615)
Could try something like Apache Arrow https://arrow.apache.org/docs/cpp/tables.html