From: Stuart Rison <stuart@ludwig.ucl.ac.uk>
To: pgsql-sql@postgresql.org
Subject: Primary keys: can they be alphanumerical?
Date: Mon, 6 Jul 1998 13:41:56 +0100
Message-ID: <l03110707b1c67506245f@[128.40.242.190]> (raw)
Dear All,
I'm using postgreSQL to create a database of breast cancer patient data. I
am currently designing my tables.
I would like to know what is the general concensus on having alphanumerical
primary keys.
The reason for this is that, with a 15 character long alphanumerical key, I
could include hidden information in the key which could help users to
quickly get information without even having to search the database. For
example, the first to characters could be a two-letter code for the
refering hospital, the next four a numerical patient number and subsequent
characters refer to treating clinicians etc.
Is this a major 'faux-pas'? Am I introducing unwanted redundancy in the
key? Will it make indexing a lot slower? Should primary keys be purely
numerical?
I would be grateful for any comments/suggestions.
Best regards,
Stuart.
PS. could you cc me a copy of your posting(s).
+-------------------------+--------------------------------------+
| Stuart Rison | Ludwig Institute for Cancer Research |
| Tel. (0171) 878 4041 | Courtauld Building |
| Fax. (0171) 878 4040 | 91 Riding House Street |
+-------------------------+ London, W1P 8BT |
| stuart@ludwig.ucl.ac.uk | UNITED KINGDOM. |
+-------------------------+--------------------------------------+
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: stuart@ludwig.ucl.ac.uk
Subject: Re: Primary keys: can they be alphanumerical?
In-Reply-To: <l03110707b1c67506245f@[128.40.242.190]>
References: <l03110707b1c67506245f@[128.40.242.190]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox