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

Home -> Community -> Usenet -> c.d.o.server -> Should I denormalize this?

Should I denormalize this?

From: Steve Quezadas <steveeq2_at_tripperjones.com>
Date: Sun, 19 Jan 2003 02:51:20 GMT
Message-ID: <IooW9.258$Sv3.34606@newsread1.prod.itd.earthlink.net>


I am looking at this problem and I don't know how to handle it other than de-normalizing the table. Here is a simple table:

Case #		Defendant
--------	--------------
123		Shell
123		Arco
123		Exxon


Here is how I need the results to be in two different scenarios: Scenario #1) "Bring me all case numbers that have Shell AND Arco in them." Here, it would output case # 123
Scenario #2) "Bring me all case numbers that have Shell AND Union 76 in them." Here, it should return an empty set since Union 76 is not a company associated with any case.

I am not sure how to handle this. I was thinking about de-normalizing teh table and listing one record per case and all the defendants will be listed in a single field separated by a token like: "Shell~Arco~Exxon" and then doing a SELECT Case WHERE Defendant LIKE "Arco" AND Defendant LIKE "Shell" or whatever, but I am wondering if there is a more elegant way.

Received on Sat Jan 18 2003 - 20:51:20 CST

Original text of this message

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