You are here: Re: standard and easy way to do schema design « MsSQL Server « IT news, forums, messages
Re: standard and easy way to do schema design

Posted by Summercoolness on 08/16/07 08:22

> and for any ">>>>>>>>" line, we will need to create a separate table,
> if that table doesn't already exist.
>
> and for those ">>>>>>>>" lines, we will simply remove them from the
> original table.


I think one correction is this:

When there are plurals, then that means yes, there needs to be a
separate table for those items, but if it is actually one-to-many
relationship, then those items would most likely already be in another
existing table.

Example:

Suppliers
id
name
products it supply >>>>>>>
address
phone
etc

So we need another table for "Products"

Assuming 1 product can only come from 1 supplier (cannot come from 2
or more suppliers), so we don't need an additional table besides
"Suppliers" and "Products" tables.

The only situation where we need an additional table is that when the
2 entities are related by the many-to-many relation, such as one movie
can show in many theaters, and one theater can show many movies. In
that case, we need this additional table in the middle, so that the
"Movies" table is connected to it in a "one-to-many" relation, and the
"Theaters" table is also connect to it in a "one-to-many" relation.

Thus, it seems like any "line" draw between two tables can only be 1-
to-1 or 1-to-many, but not many-to-many, because the many-to-many
relation becomes a table itself.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация