Re: E/R questions

From: Phil Cook <pcook_at_iamerica.net>
Date: 1997/05/17
Message-ID: <01bc625f$af06b9c0$99f9adcd_at_phil-cook-laptp>#1/1


Jay,

Create the following :

City Entity

	City Code ( Primary Key )
	City Desc
[Quoted] 	Zip Code ( 1:m foreign key from Zip Code entity )

Zip Code Entity ( Primary Key )
	Zip Code
	Zip Code Desc

Distance Entity ( Primary Key - From Zip Code + To Zip Code )
	From Zip Code ( 1:m foreign key from Zip Code entity ) 
	To Zip Code ( 1:m foreign key from Zip Code entity )
	Distance


Jay Krishnamurthy <jkrish_at_lpp.sdi.agate.net> wrote in article <337B2D9B.6D04_at_lpp.sdi.agate.net>...
> I have an entity that contains zip code and city.
>
> I would like to establish another entity called distance that contains
> "From zip", "To zip" and "distance". Any ideas on how to represent this
> in an Designer/2000 E/R diagram?
>
> Should distance be a sub-type within zip, and have a recursive (pig's
> ear) relationship to itself? i.e.
> ZIP
> -------------------------
> | zip code |
> | city |
> | |
> | -------------- |
> | |distance | |
> | ------------- |
> |-----------------------|
>
> The sub-type has a recursive relationship to itself. Is this valid?
>
> Or is there a better way to represent this?
>
> Thanks.
>
Received on Sat May 17 1997 - 00:00:00 CEST

Original text of this message