On Saturday 28 July 2001 15:09, Scott Goldstein wrote:
> I'm new to MySQL and database design and I have a questions concerning
> entities with common attributes.
>
> Suppose I have two entities, foo and bar with the following attributes:
>
> foo: (id, A, B, C, D, F)
> bar: (id, A, B, C, X, Y)
Well, I just played with it here, using an addressbook and Zipcode tables and
it seemed to work, should work for you too:-)
select * from foo,bar where foo.id=bar.id;
You would put 'A,B,C, in one of the tables then based on the id's of the two
tables, all the fields would then be displayed:-)
>
> Both entities have several attributes in common. Is there any way to
> take advantage of this? I recall reading the MySQL does not support
> table inheritance. Is there any other mechanism that I can use?
>
> Thanks for the help.
>
> Scott
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php