-----Original Message-----
From: Postmaster [mailto:Postmaster]
Sent: None
To: [EMAIL PROTECTED]
Subject: Error delivering message to: [EMAIL PROTECTED]!

Your message was not delivered for the following reason:

E-mail Account: lists-mysql is over the limit of 31457280 bytes.

Automated Postmaster

--------Original E-mail--------
>From [EMAIL PROTECTED]  Sun Oct 20 16:38:42 2002
Return-Path: <[EMAIL PROTECTED]>
Received: from web.mysql.com ([213.136.49.183]) by  ; Sun, 20 Oct 2002
16:38:41 -0500
Received: (qmail 25298 invoked by uid 7797); 20 Oct 2002 23:37:46 -0000
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
(http://www.ezmlm.org)
List-ID: <mysql.mysql.com>
Precedence: bulk
List-Help: <mailto:mysql-help@;lists.mysql.com>
List-Unsubscribe:
<mailto:mysql-unsubscribe-lists-mysql=jeikenb.com@;lists.mysql.com>
List-Post: <mailto:mysql@;lists.mysql.com>
List-Subscribe: <mailto:mysql-subscribe@;lists.mysql.com>
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 25284 invoked from network); 20 Oct 2002 23:37:45 -0000
Reply-To: <[EMAIL PROTECTED]>
From: "bwarehouse" <[EMAIL PROTECTED]>
To: "Randy Hammons" <[EMAIL PROTECTED]>,
        <[EMAIL PROTECTED]>
Subject: RE: how do you define a relationship?
Date: Sun, 20 Oct 2002 14:38:26 -0700
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
In-Reply-To: <005201c2784f$56584490$0501a8c0@web>
Importance: Normal
X-Rcpt-To: <[EMAIL PROTECTED]>

You are on the right track..  but kill your relationships as you have them
currently defined...  think of it this way...  (one to many)..   you have
movies and you have directors..   it should be one director to many movies
seeing that a movie normally only has one director..   so   take you primary
key from directors and place that foreign key in the movies table. Remember:
one director has many movies, not one movie has many directors..

BOTTOM LINE.

Make a field in your movies table exactly the same as the primary key in the
directors table, but don't autonumber it if that is what is in the primary
key of the directors table, just make it the same type( ie. Number, text,
date, etc).  and make sure it has the exact same specs as the directors
primary key field except the autonumber type; and make sure the perimeter is
"allow duplicate key is set to yes, if you index the field in the movies
table), but you don't have to index the foreign key in the movie table if
the primary key of the directors table is already indexed.  Just make the
foreign key, "allow duplicates 'YES' in the movie table..

Hope this helps..
Later
b.ware

-----Original Message-----
From: Randy Hammons [mailto:rathlon1@;cox.net]
Sent: Sunday, October 20, 2002 8:43 AM
To: [EMAIL PROTECTED]
Subject: how do you define a relationship?

 I think I've firmed my "theoritical" understanding of relationships enough
to be dangerous.  Now for the logical part....how do you actually define a
relationship in mysql?  For instance...

 table movies
 columns (movie id(pk) , movie title , year filmed)

 table directors
 columns (director id(pk), movie id(fk), total movies)

 Here I have a primary key in each table which I have defined in my table
structure.  I also have a foreign key in the directors table, but where did
I define that to the database?  Is this a sort of relationship?  Like a one
to many?  I've noticed in some reading that certain keys are refered to by
their respective names ( column - whatever ) and the relatioship column is
defined as ( column - relwhatever ), is this the proper way to define a
relationship?  Is the primary/foreignkey,  relationship concept something
that is used by the database to replicate data or are they design tools used

to develope an independent, non repetitive data structure?  Someone please
help...I'm so confused.  Thanks so much....




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



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

Reply via email to