Re: Design question regarding data typing

From: Bob Hairgrove <invalid_at_bigfoot.com>
Date: Fri, 24 Feb 2006 16:07:30 +0100
Message-ID: <j78uv15ai36cchr79n8mtf6mrvhaj2ca19_at_4ax.com>


On 24 Feb 2006 06:56:47 -0800, "Jacob JKW" <jacobcdf_at_yahoo.com> wrote:

>Bob Hairgrove wrote:
>> It does sound like an awkward design to me. For example, both schools
>> and banks have a physical address, or location, as well as one or more
>> mailing addresses and a variety of phone and fax numbers, e-mail, etc.
>> So do ordinary people. And there might some day be an additional new
>> entity with the same attributes. Therefore, I would keep the address
>> and phone data, etc. in separate tables.
>This is what I'm already doing.
>
>> If you are more interested in modelling a map with longitude and
>> latitude, perhaps modelling the physical property (i.e. real estate),
>> then you would typically try to abstract the schools and banks as
>> specializations of a base type, perhaps "building". The usual way of
>> modelling this would be to have a table of buildings, schools and
>> banks. The schools and banks tables would have a 1-to-1 foreign
>> constraint on the primary keys, e.g.:
>Again, this is what I'm doing. It's just that I call my table
>"Institutions" instead of "Buildings".

But you said you had some kind of type ID in your tables ... care to clarify, please?

--
Bob Hairgrove
NoSpamPlease_at_Home.com
Received on Fri Feb 24 2006 - 16:07:30 CET

Original text of this message