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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Database Normalization-Outdated?

Re: Database Normalization-Outdated?

From: Bill Pass <wbpass_at_yahoo.com>
Date: Fri, 03 May 2002 06:53:28 -0800
Message-ID: <F001.00457401.20020503065328@fatcity.com>

Ok. Since we are telling old stories around the campfire and at the risk of extending this thread even more, here are my 2bit stories :)

Absolutely positively you must have RI on any tranactional system critial to your bussiness. If someone recommends otherwise, politely disagree then run if they go that way anyway. I have consulted at a number of Telcos and the biggest problem is data integrity. Combine this with no RI at a database level and you are looking at an even worse disaster...

On the otherside of the coin the name/value pair (NVP) approach to data modeling is extremely flexible. I have designed several systems with varying degrees of success using this data modeling approach. It closes models OO within a relational database. You create an object relational model with object definitions and instances of those objects. You can implement something like this with very few objects (object definition, attribute definition, object instance, attribute instance).

Like I said it is very flexible and you can model anything in a very dynamic manner without the need to spend alot of time recoding (if you layer a meta-data driven GUI on top of this). The problem as Tim indicated is that it is almost impossible to denormalize data out of this into something meaningful without joining the same tables to themselves and performing union operators all over the place.

One approach to mitigate this problem is to use nested tables for the attributes. I did some experimentation with this approach that looked promising, but the project got killed before we got much further. Essentially, you can flatten the attributes associated with an object from a nested table using a view. You could dynamically regenerate the views (smells like Remedy) based on the definitions in the definition hierarchy to get a data model that is meaningful to real people (instead of us tech heads).

The last problem that needs to be tackled with this symplistic data model is how to you capture referential integrity in the object definitions and implement in the object instances? If you omit this part you have come full circle to the beginning of this e-mail (no data integrity). It is essential that you model relationships between object definitions then implement some means of enforcement in the object instances.

To implement this we added an additional table to the two previoiusly defined called association. It modeled associations between object definitions. We also had a counterpart in the instance tree. We then implemented triggers in the database to enforce these relationships.

Other issues that I can recall off the top of my head are:
- You need someway of constraining attribute values. We did this by adding characterestics to the attribute definitions such as data type, length, mandatory, primary key, etc... and enforced in attribute instances via triggers.
- You need someway to access data via something other than the primary key. This was an issue we did not tackle and is something that still haunts the implementation today.

In summary, there are at lease two systems that I designed like this that are still in operation (don't know about the third) today. They work well for what they were designed (complete flexibility), but are very difficult to get data out of. In that regard I would call them failures.

Bill

P.S.: In Oracle there exists a set of tables that does essentially the same thing. It is called the data dictionary ;-}


Do You Yahoo!?
Yahoo! Health - your guide to health and wellness http://health.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Bill Pass
  INET: wbpass_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri May 03 2002 - 09:53:28 CDT

Original text of this message

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