I have an environment that supports both dictionaries (json style) and databases (not relational or anything, just formatted data by row and column). My application doesn't really need database functionality, butI'm somewhat more comfortable with the database system than I am with dictionaries. Is there a major performance advantage to dictionaries? What situations are there where a dictionary is better than a database?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
If you want to know whether there is a performance advantage, the best thing to do is measure it yourself. The performance depends a lot on the type of data, the language, the amount of data, etc.
It's impossible to give a blanket statement as to when dictionaries are better than databases. Again, it depends on the data, the language, etc. Roughly speaking, dictionaries are better for simple and small datasets, and databases are good for complex and large data sets.
If you want to distribute your application you don't need a database when you use json-dictionaries.
I use dictionaries for 'small datasets', so I can maintain them - like my sourcecode - with an editor. If I would use a database, I need a administration tool for my DB.