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

  • SEARCH
  • Home
  • 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 7033055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:00:48+00:00 2026-05-28T01:00:48+00:00

I am a little confused about how I would restructure my database, currently I

  • 0

I am a little confused about how I would restructure my database, currently I am engaged with three tables:

  1. Items: which contains the basic information of an “item” (user.id, name, description, feature_1(bool), feature_2(bool) .. etc)

  2. Feature_1: Which contains some optional values for an “item”, so if the user decides to have Feature 1 to his item we it will create a record in Feature_1 and fill in those values. 1 item cannot have more than one record in “Feature_1” table so either it has 1 record or none.

  3. Feature_2: Same as Feature_1 but has different optional values, so the user could add Feature_1 to his Item and/or Feature_2. Again each item can have 0 or 1 Feature_2 record.

I am not sure if it is the best practice or not, one of the options was mashing all values in 1 table “Items” with many NULL values.

Any advice and pointers will be greatly 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-28T01:00:49+00:00Added an answer on May 28, 2026 at 1:00 am

    Separating out values like this can be helpful in terms of dealing with locking issues. If you have multiple daemons/scripts running that are updating and those tables and holding locks on them, it can be an issue to keep all those values together on one table. Of course, now that the values for the ‘item’ are separated on to three tables, you are going to have issues with chasing them down if/when you need all of them. Generally it is fine to keep these tables split up like this.

    Additional, before anyone goes down the road of splitting data like this, it is generally better to try/exhaust each of the following:

    Use ‘with (nolock)’ as much as possible to prevent locking issues where you can.

    Modify the scripts that maintain this data to use ‘begin tran’ type transactions as little as possible.

    Modify the execution of the scripts that maintain the data so they are more likely to be called sequentially than concurrently. e.g. put them in the same job.

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

Sidebar

Related Questions

I'm a little confused about which jQuery method and/or selectors to use when trying
I'm a little confused about how to do something that I thought would be
I'm a little confused about clustering with gproc as a pubsub. I would like
I'm learning some basic stuffs in razor . I'm a little confused about the
I'm a little confused about how the standard library will behave now that Python
I'm a little confused about HTML classes and IDs, as I'd like to use
I am a little confused about how I set and get the instance variables
I'm a little confused about what is going on in Perl constructors. I found
I'm a little confused about JBOSS and running it under different JDKs. For example,
I am a little confused about object assignment and pointers in Ruby, and coded

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.