Path: utzoo!attcan!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.databases Subject: Re: Tricky database definition problem Message-ID: Date: 11 Jan 90 23:22:10 GMT References: <49@arkham.enet.dec.com> Sender: davidm@cimshop.UUCP Organization: Consilium Inc., Mountain View, California. Lines: 49 In-reply-to: cimshop!davidm@uunet.UU.NET's message of 11 Jan 90 20:52:38 GMT In article I write: I'm beginning to see that I left out a key ingredient to my question. Forgive me, but I've been looking at this some more and maybe my question wasn't as wrong as I thought. Let me see if I can make the problem more concrete. I have a database consisting of observations. Each observation consists of a pair (the observation might be water height or machine temperature or any number of other things). Associated with each pair is a list of pairs that help identify where the observation occurred. This can be defined simply (and rather redundantly) in one table like (with some example data): Observation DataType DataValue LocType LocValue WaterHeight 10 Shore South " " Time 12:30 " " Observer Bill WaterHeight 15 Time 12:30 " " Observer Fred WaterTemp 60 Time 1:30 " " Observer Tom WaterTemp 50 Time 2:30 " " Observer Gerry With a table like this (or more normalized), can a query be written like to find that are constrained by some pairs. For instance: 1. Find the WaterHeight when Time was 12:30 and Observer was Bill. 2. Find the WaterHeight for Observer Fred and Shore is South. 3. Find the WaterTemp for Observer (Tom or Fred) and Time was 1:30. Since the qualification clause is used to qualify a row in a table (either in the database or joined in memory), none of the above rows qualify as direct answers to the query. Yet, this is obviously not what is wanted. There seems to be nothing in the definition of that would suggest normalizing it into more attributes. The application treats all the right hand side information as just location information (lots of strings). Any ideas? -- =================================================================== David Masterson Consilium, Inc. uunet!cimshop!davidm Mt. View, CA 94043 =================================================================== "If someone thinks they know what I said, then I didn't say it!"