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

Home -> Community -> Usenet -> comp.databases.theory -> Re: Demo: Modelling Cost of Travel Paths Between Towns

Re: Demo: Modelling Cost of Travel Paths Between Towns

From: Nick Landsberg <SPAMhukolauTRAP_at_SPAMworldnetTRAP.att.net>
Date: Fri, 03 Dec 2004 23:50:51 GMT
Message-ID: <vZ6sd.1025522$Gx4.983875@bgtnsc04-news.ops.worldnet.att.net>


Neo wrote:

>>What does the DDL look like?  e.g. "aspirin is a thing", 
>>"tylenol is a thing", "Nyquil is a thing" etc. some are "cold medecines",
>>which are a sub-class of medicines, but some could be
>>used as simply a "headache remedy."  
>>Thus they belong to two hierarchies.

>
>
> // Create classes to categorize things
> CREATE *medicine.cls = thing;
> CREATE *headache remedy.cls = thing;
> CREATE *cold medicine.cls = thing;
>
> // Assuming asprin is a medicine and headache remedy
> CREATE *asprin.cls = medicine;
> CREATE asprin.cls = headache remedy;
>
> // Assuming tylenol is a medicine and cold medicine
> CREATE *tylenol.cls = medicine;
> CREATE tylenol.cls = cold medicine;
>
> // Assuming nyquil is a medicine, headache remedy and cold medicine
> CREATE *nyquil.cls = medicine;
> CREATE nyquil.cls = headache remedy;
> CREATE nyquil.cls = cold medicine;
>
> // Assuming garlic is a headache remedy and cold medicine
> // but not a medicine
> CREATE *garlic.cls = headache remedy;
> CREATE garlic.cls = cold medicine;
>
> // Assuming ginger is a cold medicine only
> CREATE *ginger.cls = cold medicine;
>

First - how does one enter the fact that 179 units of Nyquil were sold in the Cooperstown, NY store on Dec. 3rd. ? (Having each sale as a separate entry is an option. Does the "thing" Nyquil have an attributes other than its name?

(Multiply this by about a million times in order to approximate the sales valume for Walmart or a competitor.)

Then, show the query which could track the sales, over the last three months, optionally summarized by week, of all cold and/or headache memories for all retail stores in the the Northeast Region for Walmart.

Note: I have heard that this is actually done by these retail stores in order to ensure that there is sufficient stock in case of a flu epidemic. (Actually, they can track the epidemic from the west side of a town to the east side by these sales figures.)

This data is also used to make doubly sure that the cold remedies are NOT on sale!

Any number of folks can do that query using RM (with or without NULL fields, and I don't really understand your fixation about non-nulls, anyway). Most experienced DB folks would not do it using a pure 3NF RM, but bite the bullet and use a "dimensional" model, e.g. "fact" tables and summary tables.

Oh geez... now I've done it. Putting on flak jacket to protect myself from the 3NF purists. :) Received on Fri Dec 03 2004 - 17:50:51 CST

Original text of this message

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