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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:06:13+00:00 2026-05-16T16:06:13+00:00

I have the following locations table: ———————————————————- | ID | zoneID | storeID |

  • 0

I have the following locations table:

----------------------------------------------------------
| ID | zoneID | storeID | address | latitude | longitude |
----------------------------------------------------------

and the phones table:

-----------------------
| locationID | number |
-----------------------

Now, keep in mind that for any giving store it can be up to five phone numbers, top. Order doesn’t matter.

Recently we needed to add another table which would contain stores related info which would also include phone numbers.

Now, to this new table doesn’t apply locationID so we can’t store the phones in the previous phone table.

Keeping the DB normalized would require, in the end, 2 new tables and a total of 4 joins to retrieve the data. Denormalizing it would render the old table like:

----------------------------------------------------------------------------------
| ID | zoneID | storeID | address | latitude | longitude | phone1 | ... | phone5 |
----------------------------------------------------------------------------------

and having a total of 2 tables and 2 joins.

I’m not a fan of having data1, data2, data3 fields as it can be a huge pain. So, what’s your opinion.

  • 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-16T16:06:14+00:00Added an answer on May 16, 2026 at 4:06 pm

    My opinion, for what it’s worth, is that de-normalisation is something you do to gain performance if, and only if, you actually have a performance problem. I always design for 3NF and only revert if absolutely necessary.

    It’s not something you do to make your queries look nicer. Any decent database developer would not fear a moderately complex SQL statement although I do have to admit I’ve seen some multi-hundred-line statements that gave me the shivers – mind you, these were from customers who had no control over the schema: a DBA would have first re-engineered the schema to avoid such a monstrosity.

    But, as long as you’re happy with the limitations imposed by de-normalisation, you can do whatever you want. It’s not as if there’s a band of 3NF police roaming the planet looking for violators 🙂

    The immediate limitations (there may be others) that I can see are:

    • You’ll be limited (initially, without a schema change) to five phone numbers per location. From your description, it doesn’t appear you see this as a problem.
    • You’ll waste space storing data that doesn’t have to be there. In other words, every row uses space for five numbers regardless of what they actually have, although this impact is probably minimal (e.g., if they’re varchar and nullable).
    • Your queries to look up a phone number will be complicated since you’ll have to check five different columns. Whether that’s one of your use cases, I don’t know, so it may be irrelevant.

    You should probably choose one way or the other though (I’m not sure if that’s your intent here). I’d be particularly annoyed if I came across a schema that had phone numbers in both the store table and a separate phone numbers table, especially if they disagreed with each other. Even when I de-normalise, I tend to use insert/update triggers to ensure data consistency is maintained.

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

Sidebar

Related Questions

I have a table with a structure like the following: LocationID AccountNumber long-guid-here 12345
I have following situation: I have loged user, standard authentication with DB table $authAdapter
I have following situation. A main table and many other tables linked together with
I have following table structure: Table: Plant PlantID: Primary Key PlantName: String Table: Party
I have the following DB Schema :- Data is ... Location Table 1. New
Consider a link table with the following columns: PersonID int NOT NULL LocationID int
I have the following in my web.config: <location path=RestrictedPage.aspx> <system.web> <authorization> <allow roles=Group1Admin, Group3Admin,
I have an application web.xml with the following entry: <error-page> <error-code>404</error-code> <location>/system_files/error/p_notfound.jsp</location> </error-page> However,
I have following string String str = replace :) :) with some other string;
I have following foreach-loop: using System.IO; //... if (Directory.Exists(path)) { foreach(string strFile in Directory.GetFiles(path,

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.