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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:47:47+00:00 2026-05-11T11:47:47+00:00

The current project I inherited mainly revolves around one unnormalized table. There are some

  • 0

The current project I inherited mainly revolves around one unnormalized table. There are some attempts at normalization but the necessary constraints weren’t put in place.

Example: In the Project table, there is a client name (among other values) and there is also a clients table which just contains client names [no keys anywhere]. The clients table is just used as a pool of values to offer the user when adding a new project. There isn’t a primary key on the clients table or a foreign key.

‘Design patterns’ such as this is common through the current state of the database and in the applications that use it. The tools I have my disposal are SQL Server 2005, SQL Server Management Studio, and Visual Studio 2008. My initial approach has been to manually determine which information needs normalization and running Select INTO queries. Is there a better approach than a case by case or anyway this could be automated?

Edit: Also, I’ve discovered that a ‘work order number’ isn’t an IDENTITY (autonumber, unique) field and they are generated sequentially and are unique to each work order. There are also some gaps in the existing numbering but all are unique. Is the best approach for this writing a store procedure to generate dummy rows before migrating?

  • 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. 2026-05-11T11:47:47+00:00Added an answer on May 11, 2026 at 11:47 am

    The best approach to migrating to a usable design? CAREFULLY

    Unless you’re willing to break (and fix) every application that currently uses the database, your options are limited, because you can’t change the existing structure very much.

    Before you begin, think carefully about your motivations – if you have an existing issue (a bug to fix, an enhancement to make) then go ahead slowly. However, it’s rarely worthwhile to monkey around with a working production system just to achieve an improvement that nonone else will ever notice. Note that this can play into your favour – if there’s an existing issue, you can point out to management that the most cost-effective way to fix things is to alter the database structure in this way. This means you have management support for the changes – and (hopefully) their backup if something turns pear shaped.

    Some practical thoughts …

    Make one change at a time … and only one change. Make sure each change is correct before you move on. The old proverb of ‘measure twice, cut once’ is relevant.

    Automate Automate Automate … Never ever make the changes to the production system ‘live’ using SQL Server Management Studio. Write SQL scripts that perform the entire change in one go; develop and test these against a copy of the database to make sure you get them right. Don’t use production as your test server – you might accidentally run the script against production; use a dedicated test server (if the database size is under 4G, use SQL Server Express running on your own box).

    Backups … the first step in any script should be to backup the database, so that you’ve got a way back if something does go wrong.

    Documentation … if someone comes to you in twelve months, asking why feature X of their application is broken, you’ll need a history of the exact changes made to the database to help diagnosis and repair. First good step is to keep all your change scripts.

    Keys … it’s usually a good idea to keep the primary and foreign keys abstract, within the database and not revealed through the application. Things that look like keys at a business level (like your work order number) have a disturbing habit of having exceptions. Introduce your keys as additional columns with appropriate constraints, but don’t change the definitions of existing ones.

    Good luck!

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

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer What you're talking about is called URL rewriting and yes,… May 11, 2026 at 11:43 pm
  • Editorial Team
    Editorial Team added an answer Per Martin Konicek's comment, to fully disable the selection of… May 11, 2026 at 11:43 pm
  • Editorial Team
    Editorial Team added an answer I would leave the parameters (cx,fx,r etc) untouched. Just multiply… May 11, 2026 at 11:43 pm

Related Questions

I have inherited a project that uses LLBLGen Pro for the DB layer. The
I have a project here that connects to an in-production database and grabs tables
I've inherited a ASP/VB6 code base (not my forte... yet) and I'm trying tease
I'm required to write documentation for my current project that lists all .c files

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.