You haven't to repeat the name field in the telephone numbers table. This
table needs another primary key which is not "id".
"id" is the foreign key that allow you to have a one to many relationship.
It can be (IMHO):
Client table:
CLIENT_ID NAME
FoneNumber table:
FONE_ID FONENUMBER CLIENT_ID
HTH
Jayme.
-----Mensagem Original-----
De: Peter J. Krawetzky <[EMAIL PROTECTED]>
Para: Cal Evans <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Enviada em: terça-feira, 27 de março de 2001 14:55
Assunto: Re: [PHP-DB] Multiple rows for one column in a MySQL table?
> Even if you normalize your database design, you must still tell it who
owns
> the row. For example, you have a table containing the following columns:
> id name
>
> You have another table that contains the phone numbers:
> id name phone number
>
> In order to connect the rows via a foreign key, you must have the
> information in the first table and again in the second table.
Normalization
> only seperates repetative data. If you didn't normalize, your first table
> would look something like this:
> id name phone number 1 phone number 2 phone number 3 (etc,
> etc, etc).
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]