Best table design for application configuration or application option settings?

后端 未结 12 2566
说谎
说谎 2020-12-25 10:01

I need to store a series of configuration values in a database. A couple ways I thought of to store them are: a table with 2 colums(name,value) and a row for each pair, or

12条回答
  •  无人及你
    2020-12-25 10:54

    CREATE TABLE Configuration (
        Name ...,
        Value ...,
    );
    

    The best way. Adding a column to a table usually sucks, and what's the point of a table with one row?

    Not sure this is appropriate for SQL, but alas...question answered.

提交回复
热议问题