Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Checking if a table is normalized using SQL

Re: Checking if a table is normalized using SQL

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 18 Mar 2007 11:49:22 -0800
Message-ID: <45fd89b2$1@news.victoria.tc.ca>


tech_Anay (tech.anay_at_gmail.com) wrote:
: Hi,

: Is there any way to check if a particular table in Oracle is in normal
: forms 1,2,3 using SQL statements? Any pointers would be appreciated!

If a value in one column can be derived from another column then the data is not normalized - or something like that. Each form has a rigorous definition but I don't know off hand what those definitions are.

In oracle, a good starting point for examining the data dictionary most easily and usefully is

	select 
	dbms_metadata.get_ddl('TABLE',upper('&enter_table_name.')) DDL
	from dual;

But you'd need to examine all the code that maintains the data, like forms used to input the data, since some dependencies may not be specified in the data dictionary at all.

And of course any relations that are maintained manually, such as a user knowing they must enter the same number into two different fields, can't be checked from the model or code at all. (You can analyze the data in that case to infer possible relationships in the data.)

$0.10 Received on Sun Mar 18 2007 - 14:49:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US