![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am still fighting with the theoretical underpinning for 1NF. As such, any comments would be greatfully accepted. The reason for my concern is that there /seems/ instances where 1NF is insufficient. An example occurred to me while I was wiring up a dimmer switch (at the behest of mrs. JOG, to whom there may only be obeyance). Now I don't know the situation in the US, but in the UK a while back the colour codes for domestic main circuit wiring changed. Naturally the two schemes exist in tandem, as exhibited in every house I've had the joy of doing some DIY in: Brown -> live. Red -> live Blue -> neutral. Black -> neutral. Green and yellow -> earth. The issue with encoding these propositions is that the candidate key for each proposition may consist of one _or_ two colours. Now I have a couple of options, none of which seem satisfactory. I could leave green & yellow as some sort of set-value composite, but obviously this would affect my querying capabilities, so thats out straight off the bat. Similarly adding attributes Colour1 and a nullable Colour2 is simply so hideous it isn't worth consideration. So, I could ungroup to give me: Colour Type ----------------- Brown live Red live Black neutral Blue neutral Green earth Yellow earth ----------------- But again this is unsatisfactory as I have lost the information that one wire is green and yellow, but none is brown /and/ red. I could introduce a surrogate to give me: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green earth 5 Yellow earth ----------------- But this seems wholly artificial given that all the information I required for identification was available in the original propositions, and that did not require some artificial id. A [shudder] non 1NF variation such as: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green, earth Yellow ----------------- is clearly hideous as it denies the fundamental mathematical principle that that one attribute should take one value from one domain, nevermind the fact that it introduces query bias. I could of course introduce nested relations, but I am uncertain as to the theoretical consequences of having nested relation as a key (I guess it would be fine, if adding seemingly unnessecary complexity to subsequent queries). But moreover it again seems unintuitive, given that in this case it would indicating that the original propositions contained, as a value for one of their attributes, a further proposition, and this was not the case. I am having a crisis of faith with the way 1NF is currently viewed. Any ideas to solve my dilemma? Am I on my own in being perturbed? Regards, Jim. |
#3
| |||
| |||
|
|
I am still fighting with the theoretical underpinning for 1NF. As such, any comments would be greatfully accepted. The reason for my concern is that there /seems/ instances where 1NF is insufficient. |
|
An example occurred to me while I was wiring up a dimmer switch (at the behest of mrs. JOG, to whom there may only be obeyance). Now I don't know the situation in the US, but in the UK a while back the colour codes for domestic main circuit wiring changed. Naturally the two schemes exist in tandem, as exhibited in every house I've had the joy of doing some DIY in: Brown -> live. Red -> live Blue -> neutral. Black -> neutral. Green and yellow -> earth. |
#4
| |||
| |||
|
|
"JOG" <j... (AT) cs (DOT) nott.ac.uk> wrote in message news:1188303981.637381.32500 (AT) r29g2000hsg (DOT) googlegroups.com... I am still fighting with the theoretical underpinning for 1NF. As such, any comments would be greatfully accepted. The reason for my concern is that there /seems/ instances where 1NF is insufficient. Insufficient for what? I wasn't able to infer this from your example. An example occurred to me while I was wiring up a dimmer switch (at the behest of mrs. JOG, to whom there may only be obeyance). Now I don't know the situation in the US, but in the UK a while back the colour codes for domestic main circuit wiring changed. Naturally the two schemes exist in tandem, as exhibited in every house I've had the joy of doing some DIY in: Brown -> live. Red -> live Blue -> neutral. Black -> neutral. Green and yellow -> earth. In the US, house current is typically at a nominal 120V, except for a few circuits, like stoves that are driven at a nominal 240V. Nominal 120V can vary all the way down to 110V. At some point below that, "brown out" begins. Where the coded meaning of the wires gets to be "interesting" is where you have an overhead light controlled by a wall switch. If there are two double pole switches controlling the same light it gets more interesting. In general, the meaning is: Black -- live Red -- live (out of phase with black) White -- neutral Green -- ground bare -- ground. However, in many homes, the wire from the appliance to the controlling switch has been The stove in my house has a clock/timer on it that is driven by 120V is wired with the standard 3 connector wire consisting of a white wire, a black wire, and a bare wire. In this case, the black wire is used to carry (unswitched) power from the overhead junction box to the switch. The companion white wire is used to carry (switched) power from the switch to the power side of the light circuit, which is a black wire. The above results in a white wire being connected to a black wire. This looks "wrong" to a DIY neophyte. The official code uses bits of colored tape to indicate such things as "white coded as black", but that's over my head. The electrical wiring in some homes dates back about a century, before the wires had colors. Things get really interesting then. |

|
All of this is a digression from 1NF. Again, 1NF is insufficient for what? |
#5
| |||
| |||
|
|
I am still fighting with the theoretical underpinning for 1NF. As such, any comments would be greatfully accepted. The reason for my concern is that there /seems/ instances where 1NF is insufficient. An example occurred to me while I was wiring up a dimmer switch (at the behest of mrs. JOG, to whom there may only be obeyance). Now I don't know the situation in the US, but in the UK a while back the colour codes for domestic main circuit wiring changed. Naturally the two schemes exist in tandem, as exhibited in every house I've had the joy of doing some DIY in: Brown -> live. Red -> live Blue -> neutral. Black -> neutral. Green and yellow -> earth. The issue with encoding these propositions is that the candidate key for each proposition may consist of one _or_ two colours. Now I have a couple of options, none of which seem satisfactory. I could leave green & yellow as some sort of set-value composite, but obviously this would affect my querying capabilities, so thats out straight off the bat. Similarly adding attributes Colour1 and a nullable Colour2 is simply so hideous it isn't worth consideration. So, I could ungroup to give me: Colour Type ----------------- Brown live Red live Black neutral Blue neutral Green earth Yellow earth ----------------- But again this is unsatisfactory as I have lost the information that one wire is green and yellow, but none is brown /and/ red. I could introduce a surrogate to give me: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green earth 5 Yellow earth ----------------- But this seems wholly artificial given that all the information I required for identification was available in the original propositions, and that did not require some artificial id. A [shudder] non 1NF variation such as: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green, earth Yellow ----------------- is clearly hideous as it denies the fundamental mathematical principle that that one attribute should take one value from one domain, nevermind the fact that it introduces query bias. I could of course introduce nested relations, but I am uncertain as to the theoretical consequences of having nested relation as a key (I guess it would be fine, if adding seemingly unnessecary complexity to subsequent queries). But moreover it again seems unintuitive, given that in this case it would indicating that the original propositions contained, as a value for one of their attributes, a further proposition, and this was not the case. I am having a crisis of faith with the way 1NF is currently viewed. Any ideas to solve my dilemma? Am I on my own in being perturbed? Regards, Jim. |
#6
| |||
| |||
|
|
JOG wrote: I am still fighting with the theoretical underpinning for 1NF. As such, any comments would be greatfully accepted. The reason for my concern is that there /seems/ instances where 1NF is insufficient. An example occurred to me while I was wiring up a dimmer switch (at the behest of mrs. JOG, to whom there may only be obeyance). Now I don't know the situation in the US, but in the UK a while back the colour codes for domestic main circuit wiring changed. Naturally the two schemes exist in tandem, as exhibited in every house I've had the joy of doing some DIY in: Brown -> live. Red -> live Blue -> neutral. Black -> neutral. Green and yellow -> earth. The issue with encoding these propositions is that the candidate key for each proposition may consist of one _or_ two colours. Now I have a couple of options, none of which seem satisfactory. I could leave green & yellow as some sort of set-value composite, but obviously this would affect my querying capabilities, so thats out straight off the bat. Similarly adding attributes Colour1 and a nullable Colour2 is simply so hideous it isn't worth consideration. So, I could ungroup to give me: Colour Type ----------------- Brown live Red live Black neutral Blue neutral Green earth Yellow earth ----------------- But again this is unsatisfactory as I have lost the information that one wire is green and yellow, but none is brown /and/ red. I could introduce a surrogate to give me: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green earth 5 Yellow earth ----------------- But this seems wholly artificial given that all the information I required for identification was available in the original propositions, and that did not require some artificial id. A [shudder] non 1NF variation such as: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green, earth Yellow ----------------- is clearly hideous as it denies the fundamental mathematical principle that that one attribute should take one value from one domain, nevermind the fact that it introduces query bias. I could of course introduce nested relations, but I am uncertain as to the theoretical consequences of having nested relation as a key (I guess it would be fine, if adding seemingly unnessecary complexity to subsequent queries). But moreover it again seems unintuitive, given that in this case it would indicating that the original propositions contained, as a value for one of their attributes, a further proposition, and this was not the case. I am having a crisis of faith with the way 1NF is currently viewed. Any ideas to solve my dilemma? Am I on my own in being perturbed? Regards, Jim. There is one obvious way to represent that in 1NF: Create a color domain where a single value represents green and yellow, another value represents green, and a third represents yellow etc. The domain could even represent thick green/thin yellow as a separate value from thick yellow/thin green if one chooses. Regardless whether one creates only the domain or also uses it as a candidate key for some sort of lookup table, the resulting relation is simply: Colour Type ======= ------- ... Your ID above is one example of such a domain. However, the domain need not be numeric or have any external numeric representations. It need only exist with a distinct value for green and yellow. |
#7
| |||
| |||
|
|
I am still fighting with the theoretical underpinning for 1NF. As such, any comments would be greatfully accepted. The reason for my concern is that there /seems/ instances where 1NF is insufficient. An example occurred to me while I was wiring up a dimmer switch (at the behest of mrs. JOG, to whom there may only be obeyance). Now I don't know the situation in the US, but in the UK a while back the colour codes for domestic main circuit wiring changed. Naturally the two schemes exist in tandem, as exhibited in every house I've had the joy of doing some DIY in: Brown -> live. Red -> live Blue -> neutral. Black -> neutral. Green and yellow -> earth. The issue with encoding these propositions is that the candidate key for each proposition may consist of one _or_ two colours. Now I have a couple of options, none of which seem satisfactory. I could leave green & yellow as some sort of set-value composite, but obviously this would affect my querying capabilities, so thats out straight off the bat. Similarly adding attributes Colour1 and a nullable Colour2 is simply so hideous it isn't worth consideration. So, I could ungroup to give me: Colour Type ----------------- Brown live Red live Black neutral Blue neutral Green earth Yellow earth ----------------- But again this is unsatisfactory as I have lost the information that one wire is green and yellow, but none is brown /and/ red. I could introduce a surrogate to give me: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green earth 5 Yellow earth ----------------- But this seems wholly artificial given that all the information I required for identification was available in the original propositions, and that did not require some artificial id. |
|
A [shudder] non 1NF variation such as: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green, earth Yellow ----------------- is clearly hideous as it denies the fundamental mathematical principle that that one attribute should take one value from one domain, nevermind the fact that it introduces query bias. I could of course introduce nested relations, but I am uncertain as to the theoretical consequences of having nested relation as a key (I guess it would be fine, if adding seemingly unnessecary complexity to subsequent queries). But moreover it again seems unintuitive, given that in this case it would indicating that the original propositions contained, as a value for one of their attributes, a further proposition, and this was not the case. I am having a crisis of faith with the way 1NF is currently viewed. Any ideas to solve my dilemma? Am I on my own in being perturbed? Regards, Jim. |
#8
| |||
| |||
|
|
On Aug 28, 5:05 pm, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: JOG wrote: I am still fighting with the theoretical underpinning for 1NF. As such, any comments would be greatfully accepted. The reason for my concern is that there /seems/ instances where 1NF is insufficient. An example occurred to me while I was wiring up a dimmer switch (at the behest of mrs. JOG, to whom there may only be obeyance). Now I don't know the situation in the US, but in the UK a while back the colour codes for domestic main circuit wiring changed. Naturally the two schemes exist in tandem, as exhibited in every house I've had the joy of doing some DIY in: Brown -> live. Red -> live Blue -> neutral. Black -> neutral. Green and yellow -> earth. The issue with encoding these propositions is that the candidate key for each proposition may consist of one _or_ two colours. Now I have a couple of options, none of which seem satisfactory. I could leave green & yellow as some sort of set-value composite, but obviously this would affect my querying capabilities, so thats out straight off the bat. Similarly adding attributes Colour1 and a nullable Colour2 is simply so hideous it isn't worth consideration. So, I could ungroup to give me: Colour Type ----------------- Brown live Red live Black neutral Blue neutral Green earth Yellow earth ----------------- But again this is unsatisfactory as I have lost the information that one wire is green and yellow, but none is brown /and/ red. I could introduce a surrogate to give me: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green earth 5 Yellow earth ----------------- But this seems wholly artificial given that all the information I required for identification was available in the original propositions, and that did not require some artificial id. A [shudder] non 1NF variation such as: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green, earth Yellow ----------------- is clearly hideous as it denies the fundamental mathematical principle that that one attribute should take one value from one domain, nevermind the fact that it introduces query bias. I could of course introduce nested relations, but I am uncertain as to the theoretical consequences of having nested relation as a key (I guess it would be fine, if adding seemingly unnessecary complexity to subsequent queries). But moreover it again seems unintuitive, given that in this case it would indicating that the original propositions contained, as a value for one of their attributes, a further proposition, and this was not the case. I am having a crisis of faith with the way 1NF is currently viewed. Any ideas to solve my dilemma? Am I on my own in being perturbed? Regards, Jim. There is one obvious way to represent that in 1NF: Create a color domain where a single value represents green and yellow, another value represents green, and a third represents yellow etc. The domain could even represent thick green/thin yellow as a separate value from thick yellow/thin green if one chooses. Regardless whether one creates only the domain or also uses it as a candidate key for some sort of lookup table, the resulting relation is simply: Colour Type ======= ------- ... Your ID above is one example of such a domain. However, the domain need not be numeric or have any external numeric representations. It need only exist with a distinct value for green and yellow. Well, practically, the surrogate key is the way that I would go. My question is rather whether this corresponds naturally to the original propositions, which don't require a new domain in order to be manipulated in FOL. |
|
discussion involving Marshall and a few others considering situations where a nested relation was /necessary/ (I need to have a dig for it), and it didn't sit comfortably then. |
#9
| |||
| |||
|
|
"JOG" <j... (AT) cs (DOT) nott.ac.uk> wrote in message news:1188303981.637381.32500 (AT) r29g2000hsg (DOT) googlegroups.com... I am still fighting with the theoretical underpinning for 1NF. As such, any comments would be greatfully accepted. The reason for my concern is that there /seems/ instances where 1NF is insufficient. An example occurred to me while I was wiring up a dimmer switch (at the behest of mrs. JOG, to whom there may only be obeyance). Now I don't know the situation in the US, but in the UK a while back the colour codes for domestic main circuit wiring changed. Naturally the two schemes exist in tandem, as exhibited in every house I've had the joy of doing some DIY in: Brown -> live. Red -> live Blue -> neutral. Black -> neutral. Green and yellow -> earth. The issue with encoding these propositions is that the candidate key for each proposition may consist of one _or_ two colours. Now I have a couple of options, none of which seem satisfactory. I could leave green & yellow as some sort of set-value composite, but obviously this would affect my querying capabilities, so thats out straight off the bat. Similarly adding attributes Colour1 and a nullable Colour2 is simply so hideous it isn't worth consideration. So, I could ungroup to give me: Colour Type ----------------- Brown live Red live Black neutral Blue neutral Green earth Yellow earth ----------------- But again this is unsatisfactory as I have lost the information that one wire is green and yellow, but none is brown /and/ red. I could introduce a surrogate to give me: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green earth 5 Yellow earth ----------------- But this seems wholly artificial given that all the information I required for identification was available in the original propositions, and that did not require some artificial id. It may seem artificial, but it isn't. A wire is not identified by an element of the Colour domain, but rather by a subset of the Colour domain. Even if a wire has only one colour, a wire is not identified by that colour, but by the set of colours which just happens to consist of the single colour. If you want to avoid a second-order predicate (one that ranges over subsets of the Colour domain), you can assign a name to each colour combination. (That's all that a surrogate is: a name.) |
|
In this way all of the domains remain simple, and the queries remain simple, but at the same time all of the relationships amongst Wires and Colours and Types are retained. A [shudder] non 1NF variation such as: Id Colour Type ----------------- 1 Brown live 2 Red live 3 Black neutral 4 Blue neutral 5 Green, earth Yellow ----------------- is clearly hideous as it denies the fundamental mathematical principle that that one attribute should take one value from one domain, nevermind the fact that it introduces query bias. I could of course introduce nested relations, but I am uncertain as to the theoretical consequences of having nested relation as a key (I guess it would be fine, if adding seemingly unnessecary complexity to subsequent queries). But moreover it again seems unintuitive, given that in this case it would indicating that the original propositions contained, as a value for one of their attributes, a further proposition, and this was not the case. I am having a crisis of faith with the way 1NF is currently viewed. Any ideas to solve my dilemma? Am I on my own in being perturbed? Regards, Jim. |
#10
| |||
| |||
|
|
JOG wrote: ... Brown -> live. Red -> live Blue -> neutral. Black -> neutral. Green and yellow -> earth. ... Hey JOG, if you think that's cumbersome, try describing a typical motorcycle or car's wiring diagram. Unlike the your UK domestic wires the colour combinations are often not so nice and disjoint, eg., different parallel circuits have permutations of colours, so you might have a Blue-White wire as well as a White-Blue wire! |

|
Personally, I'm not bothered at all in letting 1NF allow a key that names an rva, although it might be thought unwieldy by some UI programmers. It bugs me more that it won't work for motorcycles. For those, I'd need more than one relation, eg., Solids: Colour Polarity ------ -------- Yellow Positive Black Negative Blue Positive Stripes: Colour Stripe Polarity ------ ------ -------- Blue White Positive White Blue Negative Plus, there are so many exceptions that you have to add in manufacturer, year and model as attributes, eg., IIRC ground/earth for Honda's is usually green but not so for Suzuki/Yamaha/Kawasaki. For all I know Harley-Davidson's use the US domestic house wiring colours, ha ha. If one wants to minimize rva's, why not use two relations for the UK house wiring colours? (When it comes to UI programming, there will always be "jobs for the boys"!) cheers, p |
![]() |
| Thread Tools | |
| Display Modes | |
| |