How do you structure config data in a database?

后端 未结 18 1500
后悔当初
后悔当初 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 04:57

    Storing hierarchy and documents in a relational DB is madness. Firstly you either have to shred them, only to recombine them at some later stage. Or there bunged inside a BLOB, even more stupid.

    Don't use use a relational db for non-relational data, the tool does not fit. Consider something like MongoDB or CouchDB for this. Schema-less no-relational data stores. Store it as JSON if it's coming down the wire in any way to a client, use XML for serverside.

    CouchDB gives you versioning out of the box.

提交回复
热议问题