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 7609241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:07:37+00:00 2026-05-31T01:07:37+00:00

I am trying to design an efficient database schema for user settings in SQL

  • 0

I am trying to design an efficient database schema for user settings in SQL Server 2008 R2. The wrinkle here is that we need multiple levels of granularity, and I’m not sure how to efficiently represent that.

We have a handful of settings that can be applied to a full Account, a single Module, or a specific Feature. Currently the way the table has been set up is something to the effect of:

AccountId int
ModuleId int
FeatureId int
SettingData string

(please don’t get hung up on what SettingData is or isn’t, I just made it a string here in the example to distinguish it from the other Ids).

Problem: Many customers have access to many modules, and these modules have access to many features. A single Account making a change to SettingData can modify 4000 records. This is absolutely not tenable for obvious reasons, and I’m determined to fix it.

The solution is obviously to have a few different tables that, by their usage, override eachother and allow some account wide settings and granular preferences. However, I’ve never done this before and my attempts at designing it end up looking disturbingly similar to the inefficient table structure we currently have.

Thanks in advance, any help is appreciated.

  • 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-05-31T01:07:38+00:00Added an answer on May 31, 2026 at 1:07 am

    It sounds as though settings can currently be specified at the following levels:

    • Account
    • Module
    • Feature

    Given that there are probably already tables set up for each of Account, Module and Feature, it would appear to make sense to:

    • Remove the existing table.
    • Set up a new field for setting data on each of the existing Account, Module and Feature tables.

    Since the general principle is that the specific should override the general, a Module-level setting should override an Account-level setting, and a Feature-level setting should override a Module-level setting.

    The advantage of this approach is that any time a specific setting was updated, only a single record would need to be updated.

    The disadvantage is that to determine which setting should apply to a specific feature (for a specific account) in a specific module, 3 tables would have to be queried instead of one.

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

Sidebar

Related Questions

I've been trying to design a database schema for a side project but I
I have a bit of web design that I’m trying to solve with efficient
I'm trying to design an interface that tests whether a user is logged in
I'm trying to design a homepage for an MVC site that has two different
I am trying to design a location lookup in which the user can specify
I'm trying to design a database for a sports meeting. I think I've got
I am trying to design some kind of user to user relationship, such as
I'm writing an application that will have a SQL Server backend that will store
I'm trying to use domain driven design while creating a website that is publicly
I am trying to design a database for creating a school syllabus. In a

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.