[AccessD] Accomodation Register - Was: On DB Bloat...

Stuart McLachlan stuart at lexacorp.com.pg
Thu May 27 17:47:29 CDT 2004


On 27 May 2004 at 9:22, Mitsules, Mark S. (Newport Ne wrote:

> Andy's interpretation of my comments is correct.  Here is an example:
> 
> tblPhotos		tblProperties
> pkPhotoID_________fkPhotoID
> PhotoPath		pkPropertyID
> PhotoDate		etc.
> PhotoComments	etc.
> 

This won't work - Properties->Photos and AccomUnits->Photos are both OneToMany  

> Or
> 
> tblPhotos		tblPropertyPhotos
> pkPhotoID_________fkPhotoID			tblProperties
> PhotoPath		fkPropertyID____________pkPropertyID
> PhotoDate		etc.				etc.
> PhotoComments	etc.				etc.
> 

Since it's not ManyToMany. the tblPropertyPhotos is redundant, you could 
achieve exactly the same thing with a fkPropertyId in tblPhotos.

Unfortunately, neither deal with the current situation,  which is that some 
photos relate to tblProperties and some photos relate to tlbAccomUNits.

I'm actually looking for pointer as to the best way to handle child records 
which are identical except that they have parents in different tables (in this 
case with a further parent/child relationship to consider)

AccomUnits are Children of Properties.
Photos can be either children of AccomUnits( therefore Grandchildren of 
Properties) or direct children of properties. (Sort of like a hillbilly family 
<g>)

where you will have EITHER  a direct link through FKProp or FPAccomUnit (but 
never both) and  where tblAccomUnit also has a FKProperty. 

 
-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.






More information about the AccessD mailing list