Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Table design question
"PeterS" <member_at_dbfoums.com> wrote in message news:1724237.1029973526_at_dbforums.com...
>
As another poster posted (how many posts can a poster post ... j/k!), it's common to have recursive relationships. I'm a proponent of surrogate keys which in this case would simplify things a bit ... just my opinion and has been flogged to death here before ... but here's how I'd do it:
table_x
id NUMBER(16) NOT NULL /* surrogate key */
...
parent_id NUMBER(16) NULL /* reference my parents */
Thx!
-- Pablo Sanchez, High-Performance Database Engineering mailto:pablo_at_hpdbe.com http://www.hpdbe.com Available for short-term and long-term contractsReceived on Thu Aug 22 2002 - 17:18:58 CDT