From: | Stuart Rison <stuart(at)ludwig(dot)ucl(dot)ac(dot)uk> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Primary keys: can they be alphanumerical? |
Date: | 1998-07-06 12:41:56 |
Message-ID: | l03110707b1c67506245f@[128.40.242.190] |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)ludwig(dot)ucl(dot)ac(dot)uk | UNITED KINGDOM. |
+-------------------------+--------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Stuart Rison | 1998-07-06 12:53:36 | How to split very long tables? |
Previous Message | Barracuda | 1998-07-06 12:09:46 | Thanks |