![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The XDb2 script below creates/queries a person named john with black skin and red-blue hair; and a person named mary with smooth-white skin and red, silky-smooth hair. A similar RM implementation might use T_Person, T_Skin, T_Hair, T_Color and T_Texture. See www.xdb2.com/example/ex005.asp for more details. [] |
#3
| |||
| |||
|
|
neo55592 (AT) hotmail (DOT) com (Neo) wrote in message news:<4b45d3ad.0411091931.9faa461 (AT) posting (DOT) google.com>... The XDb2 script below creates/queries a person named john with black skin and red-blue hair; and a person named mary with smooth-white skin and red, silky-smooth hair. A similar RM implementation might use T_Person, T_Skin, T_Hair, T_Color and T_Texture. See www.xdb2.com/example/ex005.asp for more details. [] Other than beating us over the head with your syntax, what is the purpose of these posts? No one but you seems to post any new threads on XDb2. Is this a subtle set of SPAM postings? |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
"Person with uniqie hair color? That is, a person with a hair color such that there doesn't exist anybody else with this color" |
|
"Find a person with most frequent hair color" |
#6
| |||
| |||
|
|
Above type queries can only be resolved via code/API at this time. The psuedo code below solves similar but simpler case: |
|
"Person with uniqie hair color? That is, a person with a hair color such that there doesn't exist anybody else with this color" |
#7
| |||
| |||
|
|
Above type queries can only be resolved via code/API at this time. The psuedo code below solves similar but simpler case: Why would I want to write proceudral code for this things? "Person with uniqie hair color? That is, a person with a hair color such that there doesn't exist anybody else with this color" |
|
Or the hair occurs once in the population. Rewording makes life much easier. SELECT hair_color, MAX(person_id) FROM Population GROUP BY hair_color HAVING COUNT (*) = 1; And I agree with another comment; I do not see the point of these code postings. |
#8
| |||
| |||
|
|
jcelko212 (AT) earthlink (DOT) net (--CELKO--) wrote: Above type queries can only be resolved via code/API at this time. The psuedo code below solves similar but simpler case: Why would I want to write proceudral code for this things? "Person with uniqie hair color? That is, a person with a hair color such that there doesn't exist anybody else with this color" I have dark brown hair, and I also have grey hair. Then, there are shades. I smell a bad model. Or the hair occurs once in the population. Rewording makes life much easier. SELECT hair_color, MAX(person_id) FROM Population GROUP BY hair_color HAVING COUNT (*) = 1; And I agree with another comment; I do not see the point of these code postings. Since I have dark brown hair and grey hair, what is my hair_color? Sincerely, Gene Wirchenko |

#9
| |||
| |||
|
|
Here's something to think about: You participate in a 1:M relationship with hair color. Joe Celko does not participate at all ![]() |
#10
| |||
| |||
|
|
Above type queries can only be resolved via code/API at this time. The psuedo code below solves similar but simpler case: Why would I want to write proceudral code for this things? |
|
Person with uniqie hair color? SELECT hair_color, MAX(person_id) FROM Population GROUP BY hair_color HAVING COUNT (*) = 1; |
![]() |
| Thread Tools | |
| Display Modes | |
| |