FW: Male/female
Show quoted text
-----Oorspronkelijk bericht-----
Van: H.J. Sanders [mailto:hjs@rmax.nl]
Verzonden: vrijdag 8 december 2006 16:33
Aan: Raymond O'Donnell
Onderwerp: RE: [GENERAL] Male/femaleHi ray.
We have done it with a integer whereby
0 = woman
1 = manalso self-documenting :-)
Henk Sanders
-----Oorspronkelijk bericht-----
Van: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]Namens Raymond O'Donnell
Verzonden: vrijdag 8 december 2006 16:23
Aan: pgsql-general@postgresql.org
Onderwerp: [GENERAL] Male/femaleJust wondering.....how do list member represent gender when storing
details of people in a database?I've done it two ways:
* A bool column, with the understanding that true/false represents
one gender or the other.* Create a domain, something like:
CREATE DOMAIN gender_domain
AS character varying(7)
NOT NULL
CONSTRAINT gender_domain_check CHECK ((((VALUE)::text =
'male'::text) OR ((VALUE)::text = 'Female'::text)))I personally prefer the second, as it's self-documenting...is there
any other/better way of doing it?--Ray.
----------------------------------------------------------------------
Raymond O'Donnell
Director of Music, Galway Cathedral, Galway, Ireland
rod@iol.ie
-------------------------------------------------------------------------------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
H.J. Sanders wrote:
We have done it with a integer whereby
0 = woman
1 = manalso self-documenting :-)
Why not use unicode symbols 0x2640 and 0x2642?
--
Alban Hertroys
alban@magproductions.nl
magproductions b.v.
T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede
// Integrate Your World //
Just wondering.....how do list members represent gender when storing
details of people in a database?I've done it two ways:
* A bool column, with the understanding that true/false represents
one gender or the other.
[snip]
We have done it with a integer whereby
0 = woman
1 = manalso self-documenting :-)
[snip]
This gave me my first good laugh of the day... I will never accuse DBAs of not having a sense of
humor albeit unique!
Regards,
Richard Broersma Jr.
0 = woman
1 = manThis gave me my first good laugh of the day... I will never accuse DBAs of not having a sense of> humor albeit unique!
Richard,
gmail extended my laugh with the sponsored links:
How To Be A woman
How To Be The Girl That Every Man Secretly Wishes He Was Married To!
Relationship-Advice.com
PostgreSQL Replication
Stable, fast and native replication for PostgreSQL 8.0 and 8.1
www.commandprompt.com/
PostgreSQL GUI admin tool
Manage, Sync, Backup, Schedule Task Import/ Export, Report, Download!
pgsql.navicat.com
Now we just need fast, stable and native replication for " The Girl
That Every Man Secretly Wishes He Was Married To!"
Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.
On Fri, Dec 08, 2006 at 05:26:22PM +0100, Harald Armin Massa <haraldarminmassa@gmail.com> wrote:
Now we just need fast, stable and native replication for " The Girl
That Every Man Secretly Wishes He Was Married To!"
I want replication WITH that girl!
Any chance for 8.3?
bkw
On Fri, 2006-12-08 at 17:39, Bernhard Weisshuhn wrote:
On Fri, Dec 08, 2006 at 05:26:22PM +0100, Harald Armin Massa <haraldarminmassa@gmail.com> wrote:
Now we just need fast, stable and native replication for " The Girl
That Every Man Secretly Wishes He Was Married To!"I want replication WITH that girl!
Any chance for 8.3?
Well, all of you who ask for this, don't forget that the main mantra of
open source is "scratch your own itch" ;-)
So go out and get it yourself...
Cheers,
Csaba.
Csaba Nagy wrote:
On Fri, 2006-12-08 at 17:39, Bernhard Weisshuhn wrote:
On Fri, Dec 08, 2006 at 05:26:22PM +0100, Harald Armin Massa <haraldarminmassa@gmail.com> wrote:
Now we just need fast, stable and native replication for " The Girl
That Every Man Secretly Wishes He Was Married To!"I want replication WITH that girl!
Any chance for 8.3?
Well, all of you who ask for this, don't forget that the main mantra of
open source is "scratch your own itch" ;-)
You know, here in the US not that many years ago we had a Surgeon
General who lost their job because she suggested that people "scratch
their own itch" ;-)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/08/06 12:38, Matthew O'Connor wrote:
Csaba Nagy wrote:
On Fri, 2006-12-08 at 17:39, Bernhard Weisshuhn wrote:
On Fri, Dec 08, 2006 at 05:26:22PM +0100, Harald Armin Massa
<haraldarminmassa@gmail.com> wrote:
[snip]
You know, here in the US not that many years ago we had a Surgeon
General who lost their job because she suggested that people "scratch
their own itch" ;-)
She lost her job because she advocated schools teaching children how
to "scratch their own itch". As if they need instruction...
- --
Ron Johnson, Jr.
Jefferson LA USA
Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFebknS9HxQb37XmcRAkZyAJ9W/iRiBbCJM3ojokyBf1jH1UMrjACdGE9Y
hKRdTKdKppz6es2eMN36blM=
=3PNr
-----END PGP SIGNATURE-----
On Fri, Dec 08, 2006 at 04:50:16PM +0100, Alban Hertroys wrote:
Why not use unicode symbols 0x2640 and 0x2642?
A clever idea, however, it does not cover
transsexual, female phenotype
transsexual, male phenotype
hermaphrodite, intersexual phenotype
which we (GNUmed, that is) need to support in a medical
database.
In fact, most (all?) of the approaches I have seen in this
thread lack that. Using bool would even preclude extension
of the constraint in that direction if it were ever needed.
So, one is better of with, say, char(2) or something
similar.
I would also suggest using a *coded* gender, not "male",
"female" strings which will make gender-based calculations a
lot easier down the road.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
I would also suggest using a *coded* gender, not "male",
"female" strings which will make gender-based calculations a
lot easier down the road.
Which will also make it easier to have a "multi-langual" solution.
Henk Sanders
On Mon, Dec 11, 2006 at 01:34:17PM +0100, H.J. Sanders wrote:
I would also suggest using a *coded* gender, not "male",
"female" strings which will make gender-based calculations a
lot easier down the road.Which will also make it easier to have a "multi-langual" solution.
Which, precisely, is one of the reason GNUmed does it that
way. We then have a table gender_label which can translate
the code into a string (both English as a base language and
a local language via "select _(label) from gender_label".
(Yes, we sort of re-implemented gettext in SQL ;-)
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346