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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:27:14+00:00 2026-06-17T18:27:14+00:00

I’m using sql-server-2008-R2 . I have a table that has three types of data

  • 0

I’m using sql-server-2008-R2. I have a table that has three types of data in it, and the types are in another table.

T = Table , F = Field , FK = Foreign Key , PK = Primary Key

T1: F1(PK), F2(TypeID), F3, F4, F5, F6, F7

T2: F1(TypeID, PK), F2(TypeName)

I want to add a fourth type but this type has an additional property(e.g. TypeRate).
My T1 table will have at least 3 million records on the first week of project start, and then it will slow that to something about 3 million records per month.

NOW I want to know which method is the best one among the ones listed below:

A. Add a field to the main table (T1):

T1: F1(PK), F2(TypeID), F3, F4, F5, F6, F7, F8(TypeRate)

F8 will be null most of the time (for records of other types), but I’ll have just one table


B. Add another table at all with all the fields that T1 has (T3):

T3: F1(PK), F2(TypeID), F3, F4, F5, F6, F7, F8

so that T1 does not have a null value most of the time, but I’ll have two tables which are mostly alike.


C. Add a description table (T4):

T4: F1(PK), F2(FK:T1.PK), F3(TypeRate)

so that my T1 table does not have null value, and for the records of the fourth type the additional data are in T4 (the description table)

  • 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-17T18:27:16+00:00Added an answer on June 17, 2026 at 6:27 pm

    You cannot ask for the “best” solution without describing what you are trying to accomplish. Well, I guess you can ask, but it makes the question impossible to answer.

    If you are trying to minimize space (memory and disk space), then splitting the table up into two — as implied by option (b) — would be the minimum space solution. However, it is very, very unlikely that you would choose this option. The gain in space efficiency is minimal and the splitting an entity into two tables is generally not the best solution.

    The first solution incurs about a bit over overhead per row for each NULL — a pretty trivial amount of space. This seems like a good solution in many cases. The data is available without an additional join.

    The third solution is also fine. It requires an additional join to fetch the data. But, if the reference table is small or if you build an index on the key, then the performance overhead should be negligible.

    There is another solution, which I will call (d). That is to have another table with the same primary key as the first table along with the additional columns. This can be useful when there are multiple different columns that form a natural grouping.

    In short, as a general rule, I would go with (c). It maintains the relational integrity of the databases with minimal performance hit. There may be some cases where I would go with (a) or (d), but that depends on the problem and what is considered “best”.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I have an array which has BIG numbers and small numbers in it. I
I have thousands of HTML files to process using Groovy/Java and I need to
I am using jsonparser to parse data and images obtained from json response. When
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

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.