Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E7009475C26 for ; Thu, 16 Jan 2003 04:55:33 -0500 (EST) Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id A810B475B8C for ; Thu, 16 Jan 2003 04:55:32 -0500 (EST) Received: from klaster.net (pe26.krakow.cvx.ppp.tpnet.pl [213.76.40.26]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id 19B122B848; Thu, 16 Jan 2003 10:52:18 +0100 (CET) Message-ID: <3E25F6F0.6030501@klaster.net> Date: Thu, 16 Jan 2003 01:04:00 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Ross J. Reedstrom" Cc: Matthew Nuzum , pgsql-sql@postgresql.org Subject: Re: lost on self joins References: <3E25BDAF.8060109@klaster.net> <003101c2bcd3$720ab1a0$6700a8c0@mattspc> <20030115225444.GB29593@wallace.ece.rice.edu> In-Reply-To: <3E25BDAF.8060109@klaster.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/255 X-Sequence-Number: 11120 Ross J. Reedstrom wrote: >>>>Finaly, a table to allow a many to many join called files_folders >>>>| files_folders >>>>================ >>>>x| ffid >>>>| folderid (fk to folders.folderid) >>>>| fileid (fk to files.fileid) >>> >>>Strange. Do you need this table? Can one file exist in several >>>directories? >>>If not, you can just add "folderid" field into table files. >> >>Good point. No, it can't exist in multiple folders, so I guess it's >>overkill to do a many to many here. Thanks for the moment of clarity. > > >Unless you're attempting to accurately map Unix filesystem sematics, where >the exact same file _can_ be in more than one place in the filesystem >(hard links). It's all about the inode. One of the wierder bits of unix >that you don't often see used in common occurances. > >Ross If we are talking about Unix filesystems - this solution doesn't let you change filename when using hard (symbolic) links. Anyway I wish I could use symbolic link on windows machine the same like on linux one... I think more important for Matthew would be protection against circular join which causes query to hang up. Tomasz