Re: Design question regarding data typing



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".

.



Relevant Pages

  • Re: Design question regarding data typing
    ... Banks and Schools tables. ... to scan for each InstutionId foreign key of interest in Banks Schools. ... REFERENCES buildings ); ...
    (comp.databases.theory)
  • Re: Design question regarding data typing
    ... Banks and Schools tables. ... to scan for each InstutionId foreign key of interest in Banks Schools. ... that what I assumed was my own ugly little kludge is in fact proper. ...
    (comp.databases.theory)
  • Re: Design question regarding data typing
    ... Banks and Schools tables. ... descriptor (or as I gather it's called from Roy's post above, ... to scan for each InstutionId foreign key of interest in Banks Schools. ...
    (comp.databases.theory)
  • Re: So... who pays for dinner?
    ... Toll collectors, cops, etc etc etc. That's the way it is. ... routine in everything, including banks, business and schools. ... When it comes to schools, you're going to have to fly that one past ...
    (rec.food.cooking)
  • Re: Design question regarding data typing
    ... and banks have a physical address, or location, as well as one or more ... latitude, perhaps modelling the physical property, ... then you would typically try to abstract the schools and banks as ... specializations of a base type, ...
    (comp.databases.theory)