0

I have key value database that functions as though all keys exist, start with an empty/default value, and hold whatever value they are assigned. Of course implementation wise only keys with a non-empty/non-default values are stored; meaning non existent keys are created when set and keys set to an empty/default value are remove. This removes the need for an add or remove operation by removing nonexistence.

My question is: does this concept of a key value database without nonexistence have terminology for it?

Dennis Ranish
  • 573
  • 1
  • 4
  • 18
  • What do you mean by "database object"? – Dai Feb 05 '22 at 23:34
  • Does this answer your question? [What is meant by sparse data/ datastore/ database?](https://stackoverflow.com/questions/6587007/what-is-meant-by-sparse-data-datastore-database) – Noah Feb 05 '22 at 23:40
  • @Dai it was useless information in regards to the question; I removed it. – Dennis Ranish Feb 06 '22 at 00:12
  • @Noah no. I am interested in if there is any term/name for key value databases that outwardly do not have the idea of nonexistence for keys. – Dennis Ranish Feb 06 '22 at 00:15
  • @DennisRanish Do you mean a system that won't let you store a `NULL` value for any valid key? – Dai Feb 06 '22 at 00:17
  • @Dai not sure what exactly you mean by that? The value part can be whatever you need. Normal though when looking up a key in a dictionary the result can be that it does not exist. The question is about implementations where that is not a thing. Internally if a key actually does not exist that would mean it is the empty/default value. – Dennis Ranish Feb 06 '22 at 00:24
  • If it's a dictionary (your tag), then it's called a `DefaultDict` in Python. Maybe [that Python API doc](https://docs.python.org/3/library/collections.html#collections.defaultdict) will lead you to the term you want, if that's not it. If it's a database, and you don't mean a sparse DB, then -- are you sure that's a feature you've seen in the field? It's extremely easy to write user/client code to return a default value for not-found entries, so even if some DBMS do offer it, I'm skeptical that it's a "type of database" with a special term of art coined for it. – Noah Feb 06 '22 at 04:03
  • 2
    @Noah yeah it seems you might be right that there is no term coined for it. I did write my own code to do this and I was wondering if it had a name; it seems like the type of thing that would. – Dennis Ranish Feb 06 '22 at 13:16

0 Answers0