Skip to main content
Updated the title to make clear that the question is about SQLite
Source Link
sunyata
  • 477
  • 1
  • 5
  • 17

Storing settings in a table in my SQLite database or separately?

I'm building an application which uses SQLite, and now want to add settings that are stored between sessions

I'm considering if I'm going to store the settings in a config file or if I'm going to use a table in the database for this

(Please note that I'm using SQLite which stores data locally and doesn't have a user accounts)

The reason I'm thinking of using the database is that I'd like to avoid adding more complexity and since I have already set up my SQLite database I'm thinking that I might as well use it for settings as well

What do I need to consider when choosing between these two options?

I'm leaning towards using a table in the database but am a bit worried because this answer says that storing settings inside the database is a bad separation of concerns.

However I'm not sure what practical drawbacks there would be. In terms of the code being self-documenting and in terms of readability it's clear where the settings are if the db table is just called "settings"

(One drawback I can think of might be if I expect the settings to change much more quickly than the db schema, since that would mean changing the database which is more complicated than changing the settings)

Grateful for help with this!

Similar questions:

Storing settings in a table in my database or separately

I'm building an application which uses SQLite, and now want to add settings that are stored between sessions

I'm considering if I'm going to store the settings in a config file or if I'm going to use a table in the database for this

The reason I'm thinking of using the database is that I'd like to avoid adding more complexity and since I have already set up my SQLite database I'm thinking that I might as well use it for settings as well

What do I need to consider when choosing between these two options?

I'm leaning towards using a table in the database but am a bit worried because this answer says that storing settings inside the database is a bad separation of concerns.

However I'm not sure what practical drawbacks there would be. In terms of the code being self-documenting and in terms of readability it's clear where the settings are if the db table is just called "settings"

(One drawback I can think of might be if I expect the settings to change much more quickly than the db schema, since that would mean changing the database which is more complicated than changing the settings)

Grateful for help with this!

Similar questions:

Storing settings in a table in my SQLite database or separately?

I'm building an application which uses SQLite, and now want to add settings that are stored between sessions

I'm considering if I'm going to store the settings in a config file or if I'm going to use a table in the database for this

(Please note that I'm using SQLite which stores data locally and doesn't have a user accounts)

The reason I'm thinking of using the database is that I'd like to avoid adding more complexity and since I have already set up my SQLite database I'm thinking that I might as well use it for settings as well

What do I need to consider when choosing between these two options?

I'm leaning towards using a table in the database but am a bit worried because this answer says that storing settings inside the database is a bad separation of concerns.

However I'm not sure what practical drawbacks there would be. In terms of the code being self-documenting and in terms of readability it's clear where the settings are if the db table is just called "settings"

(One drawback I can think of might be if I expect the settings to change much more quickly than the db schema, since that would mean changing the database which is more complicated than changing the settings)

Grateful for help with this!

Similar questions:

Clarified why this question is different from a previously asked question on this site
Source Link
sunyata
  • 477
  • 1
  • 5
  • 17

I'm building an application which uses SQLite, and now want to add settings that are stored between sessions

I'm considering if I'm going to store the settings in a config file or if I'm going to use a table in the database for this

The reason I'm thinking of using the database is that I'd like to avoid adding more complexity and since I have already set up my SQLite database I'm thinking that I might as well use it for settings as well

What do I need to consider when choosing between these two options?

I'm leaning towards using a table in the database but am a bit worried because this answer says that storing settings inside the database is a bad separation of concerns.

However I'm not sure what practical drawbacks there would be. In terms of the code being self-documenting and in terms of readability it's clear where the settings are if the db table is just called "settings"

(One drawback I can think of might be if I expect the settings to change much more quickly than the db schema, since that would mean changing the database which is more complicated than changing the settings)

Grateful for help with this!

Similar questions:

I'm building an application which uses SQLite, and now want to add settings that are stored between sessions

I'm considering if I'm going to store the settings in a config file or if I'm going to use a table in the database for this

The reason I'm thinking of using the database is that I'd like to avoid adding more complexity and since I have already set up my SQLite database I'm thinking that I might as well use it for settings as well

What do I need to consider when choosing between these two options?

I'm leaning towards using a table in the database but am a bit worried because this answer says that storing settings inside the database is a bad separation of concerns.

However I'm not sure what practical drawbacks there would be. In terms of the code being self-documenting and in terms of readability it's clear where the settings are if the db table is just called "settings"

(One drawback I can think of might be if I expect the settings to change much more quickly than the db schema, since that would mean changing the database which is more complicated than changing the settings)

Grateful for help with this!

Similar questions:

I'm building an application which uses SQLite, and now want to add settings that are stored between sessions

I'm considering if I'm going to store the settings in a config file or if I'm going to use a table in the database for this

The reason I'm thinking of using the database is that I'd like to avoid adding more complexity and since I have already set up my SQLite database I'm thinking that I might as well use it for settings as well

What do I need to consider when choosing between these two options?

I'm leaning towards using a table in the database but am a bit worried because this answer says that storing settings inside the database is a bad separation of concerns.

However I'm not sure what practical drawbacks there would be. In terms of the code being self-documenting and in terms of readability it's clear where the settings are if the db table is just called "settings"

(One drawback I can think of might be if I expect the settings to change much more quickly than the db schema, since that would mean changing the database which is more complicated than changing the settings)

Grateful for help with this!

Similar questions:

Source Link
sunyata
  • 477
  • 1
  • 5
  • 17

Storing settings in a table in my database or separately

I'm building an application which uses SQLite, and now want to add settings that are stored between sessions

I'm considering if I'm going to store the settings in a config file or if I'm going to use a table in the database for this

The reason I'm thinking of using the database is that I'd like to avoid adding more complexity and since I have already set up my SQLite database I'm thinking that I might as well use it for settings as well

What do I need to consider when choosing between these two options?

I'm leaning towards using a table in the database but am a bit worried because this answer says that storing settings inside the database is a bad separation of concerns.

However I'm not sure what practical drawbacks there would be. In terms of the code being self-documenting and in terms of readability it's clear where the settings are if the db table is just called "settings"

(One drawback I can think of might be if I expect the settings to change much more quickly than the db schema, since that would mean changing the database which is more complicated than changing the settings)

Grateful for help with this!

Similar questions: