On Fri, Mar 08, 2002 at 02:35:59PM -0500, Bob Hall wrote:
> On Fri, Mar 08, 2002 at 04:21:09AM +0200, savaidis wrote:
> > Is MySQL a relational database?
> > If yes, how is implemented a "one to one" and "one to many" relation?
> 
> Sir, there is no such thing as a one-to-one or one-to-many relation. 
> Those are joins, and they are implemented in 
> queries, as is the case with all relational database management 
> systems; e.g. Oracle, Sybase, Informix.

Yikes! I messed up that one. There are, of course, one-to-one and 
one-to-many relationships, but not relations. A relation is something 
different. Relationships are typically implemented as joins in queries.
Most RDBMSs allow you to define primary-key/foreign-key relationships, 
and enforce them with varying levels of integrity constraints. They 
often use the PK/FK definitions to automate joins. MySQL follows the 
standard syntax for MAKE TABLE statements, but doesn't do anything 
with the FK clause. That means that there's no integrity constraint 
to enforce relational integrity on the PK/FK relationship.

I think I did a little better the second time around. 

Bob Hall
--
"And Moses spake unto Pharaoh "Database, table, and query?
 Codd of our fathers, what are you talking about!'"

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