How do you structure config data in a database?

后端 未结 18 1282
后悔当初
后悔当初 2021-01-31 04:37

What is people\'s prefered method of storing application configuration data in a database. From having done this in the past myself, I\'ve utilised two ways of doing it.

18条回答
  •  梦谈多话
    2021-01-31 05:01

    You can expand option 1 to have a 3rd column, giving a data-type. Your application can than use this data-type column to cast the value.

    But yeah, I would go with option 1, if config files are not an option. Another advantage of option 1 is you can read it into a Dictionary object (or equivalent) for use in your application really easily.

提交回复
热议问题