How do you structure config data in a database?

后端 未结 18 1293
后悔当初
后悔当初 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-31 05:16

    I can think of at least two more ways:

    (a) Create a table with key, string-value, date-value, int-value, real-value columns. Leave unused types NULL.

    (b) Use a serialization format like XML, YAML or JSON and store it all in a blob.

提交回复
热议问题