Is it advisable to store things like a list of cities on db?

Hi, I use CakePHP, and I wonder if it is worth storing things that change little in the database, a list of cities?

+3
source share
4 answers

If your application already needs a database, why do you need to store data somewhere else?

If the list does not change (for each installation), and it is small enough and often used, then it may be worth reading it once during initialization and caching of the result to increase productivity and reduce the load on the database.

+5
source

, . , , .

+1

, - $0.02

( , , , enum ...), .

db find/Containable .

http://github.com/jrbasso/array_datasource

+1

, db, , . , db . , , . , . , .

, , , - . .

Bill Lizard , , . , db, , .

0

Source: https://habr.com/ru/post/1743617/


All Articles