db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Baker" <gary.ba...@movielink.com>
Subject RE: Tables with foreign keys to themselves don't maintain Lists ofrelated rows.
Date Tue, 23 Sep 2003 21:01:12 GMT
No, that's not true, the semantics may seem confusing, but it is
perfectly legal to have a self-referential foreign key (at least in the
databases with which I'm familiar DB2, SQLServer, Oracle).  This is
really the only way to build a proper tree structure out of your data.

-----Original Message-----
From: Dave Newton [mailto:dave@solaraccess.com] 
Sent: Tuesday, September 23, 2003 2:02 PM
To: Apache Torque Users List
Subject: Re: Tables with foreign keys to themselves don't maintain Lists
ofrelated rows.


On Tue, 2003-09-23 at 16:54, Gary Baker wrote:
> I've got a table with a foreign key to itself.

I'm definitely not an SQL guru (I write printers, fer gosh's sake :)
but... isn't a foreign key by definition a key in another table?

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message