I'm debating three different approaches to to storing sitewide settings for a web application.

A key/value pair lookup table, each key represents a setting.

  • Pros Simple to implement
  • Cons No Constraints on the individual settings

A single row settings table.

  • Pros Per setting defaults and constraints
  • Cons - Lots of settings would mean lots of columns. Not sure if Postgres would have an issue with that

Just hard code it since the settings won't change that often.

  • Pros Easy to setup and add more settings.
  • Cons Much harder to change

Thoughts on which way to go?

Edit
Report