menu

arrow_back How to describe such a data structure?

by
1 vote
Abstract:
There is a set of dictionaries, each containing many key-value pairs. The keys must match the keys from the other dictionaries, but may have different values. Some keys may be contained in one dictionary, or absent in another. The program needs to get the values on the key and be able to switch between the dictionaries. To do this, there is a conditional database, which stores references to the dictionaries.

When preparing such data, we have a list of all the possible keys from all the dictionaries in the database, so as not to dig into each dictionary separately and not to synchronize the keys between the dictionaries manually. By highlighting any key we can edit the values from different dictionaries, as well as delete keys (from the selected dictionary) and add (to the selected dictionary). And most importantly, to see which dictionaries the key-value is missing and add it, without the need to manually enter the key.

Does this approach to data structure have a name, and how correct is it?

1 comment

And how right is it?
Correctness depends on the task at hand.
You can think of a task for which this is the right approach.
You can think of a problem for which this is the wrong approach.

1 Answer

by
0 votes
dictionary id, key, value...

It's not called anything. It's just an attitude.