Avatar of curiouswebster
curiouswebster
Flag for United States of America asked on

Checking a SQL Server DB schema for Non-Normalized tables?

Checking a SQL Server DB schema for Non-Normalized tables?



I there an automated way to find tables which are not normalized? Or are there queries  which I can tailor to tell me which tables are not normalized?



Thanks.

DatabasesMicrosoft SQL ServerMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
Dustin Saunders

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Dustin Saunders

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Scott Pletcher

No, no tool does that.

But the short answer is likely that none of the tables are properly normalized.  That sounds bad, but it's almost certainly true.  Typically tables are created by developers who give zero thought to normalization.  
SOLUTION
ste5an

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
curiouswebster

ASKER
Ok, a few queries and the SSMS graphical tool can help identify candidates for normalization. But, I now worry that a single normalization could break countless store procedures, since they create and query the non-normalized data.

I have used SQL Server automation tools which could certainly help in this situation.

For example, Red Hat has a tool I once used to identify all uses of a certain variable name, which saved huge amounts of time, since it looked through all database objects.

Any suggestions on whether SSMS does this, or what tools to consider?
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
curiouswebster

ASKER
Wow! You mean I can change the underlying schema to be more normalized, then use Views to handle legacy queries from both the source code and the Analysts, who interact with the database throughout the day?

If this is true, is there any benefit to normalization?

Don't get me wrong, organizationally, this may be a life-saver. Then, as time permits, we upgrade code and Analyst queries to the new schema.

In fact, we are considering giving the Analysts their own database schema.

How would a dedicated Analyst schema help or hurt this effort?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.