Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8311769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:55:13+00:00 2026-06-08T19:55:13+00:00

Our application has many configuration directives. Things like are multiple languages enabled? or which

  • 0

Our application has many configuration directives. Things like “are multiple languages enabled?” or “which CSS template should be used?” or “how many items should be shown per page?”.

We need to store the configuration directives in DB. Currently we have table for each “area” of configuration and the table has only one row containing the values in columns. This approach allows us to put constraints on the values – let it be ENUM, INT, VARCHAR, etc. But it’s huge PITA when we need to add new config directive — we need to update and redeploy DB schema. It also pollutes the table space with many setup_something tables.

My idea was to replace the tables with MySQL based key-value store (we use shared hosting with little configuration options, so we cannot use NoSQL). Some of the values MAY depend on locale or other variables, but I think that it can be solved by something like fallback (find key begining with “lang:fr” and if not found try one begining with “lang:default” (which will be always ready).

The constraints would be checked only in PHP using concrete setup classes, but there will be no DB checks.

  1. Are there any ready-made solutions for this (prefferably working well with Zend Framework).
  2. What are the pitfals of this solution (except the obvious – that I can’t fetch the whole “row” at once or many rows at once – which is not a problem)
  3. [Have you used|Would you use] similar solution or something completely different?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T19:55:15+00:00Added an answer on June 8, 2026 at 7:55 pm

    You could simply have one MySQL table with all your config settings. Perhaps something like this:

    config_id (INT autoincrement)
    config_group (VARCHAR) this gives you something to group your configuration setting with
    config_key (VARCHAR) this would be the key name by which you would reference the value
    data_type (VARCHAR) you can use this to tell your application how you want to treat this data within the application (i.e. treat it as integer, float, string, etc.)
    value (VARCHAR) the value
    

    Of course you would then need to take the string value and manipulates it in your code to treat it like an integer, float, string, etc.

    Maybe note the cleanest way to do things, but have seen this approach taken a number of times.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For our application, which has a website and a backend, we really like the
Our application has many controls that are created dynamically. For example, a navigation pane
Our Java application has a number of modules which implement a common interface. By
We have many instances in our application where we would like to be able
Our application has a service layer and a DAO layer, written as Spring beans.
Our application has a couple of shell scripts that are called from web-based Oracle
I'm currently going through the process of running FxCop through our application that has
I have a Windows application. The windows application has our XML Library on it.
In our application through the process of developing a lot of JAR files has
Our large application (VB.Net, Framework 3.5) has been developed more or less from the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.