| From: | Tomasz Myrta <jasiek(at)klaster(dot)net> |
|---|---|
| To: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu> |
| Cc: | Matthew Nuzum <cobalt(at)bearfruit(dot)org>, pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: lost on self joins |
| Date: | 2003-01-16 00:04:00 |
| Message-ID: | 3E25F6F0.6030501@klaster.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matthew Nuzum | 2003-01-16 01:01:30 | show data from two tables together |
| Previous Message | Peter Eisentraut | 2003-01-15 23:44:55 | Re: RFC: A brief guide to nulls |