postgresql - Is it better to read a data from file or database? -


in application, customer given set of 5 choice based questions. based on answers, offer. answer choices , offers mapped in following way.

[1,3,2,5,4] - offer no.5,

[1,1,1,2,1] - offer no.2

totally 30 mappings.

this need clarity. should store in application db or in file ? best approach , why ?

proper db better choice multiple reasons:

  1. it solves issues @ moment not aware exist face sooner or later (e.g. consistency, efficiency, atomicity, etc.).
  2. it allows easier scaling of app servers (if talking dedicated db servers).
  3. it easier manage (e.g. indexes, crud queries, etc.). don't reinvent wheel, use fruits of others hard work.
  4. can extended @ relatively low cost.

but if don't necessarly think ever need multiple machines sqlite still better choice manual file handling.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -