LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-02-2001, 05:08 PM   #1
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Rep: Reputation: 30
Question MySQL Relationships Question?


Hi guys, hows it going

Just a quick one this time

I know how to define foreign key relationships in MySQL but i,m wondering if you also need to define the type of relationship i.e. one to one,one to many or many to many relationships?

Does MySQL support these or is it controlled by PHP at the input terminal?

Any help would be appreciated.

Cheers Guys

Stay Kewl

RecoilUK
 
Old 08-02-2001, 06:05 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
You do not explicitly define the type of relationship under sql. Using a foreign key you will create a 1:M relationship, which can then be restricted back to 1:1 by setting unique for the foreign key as well as the primary being naturally unique.

M:M keys are only theoretical, and need to be modelled with 2 M:1 relationships connected via an intermediate pairs table.

Well, that's my Database theory knowledge i learnt last year.. only go 60% in the exam tho.....

chris
xxxx
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
Nessus Plugin Variable Relationships BoarderX Linux - Software 1 04-20-2005 07:06 PM
mysql relationships question czarherr Programming 2 03-04-2005 12:57 AM
MySQL question dmedici Fedora 1 07-21-2004 01:16 PM
Samba 3.0 Alpha 23 Adding Trusted Relationships Vishi Linux - Networking 0 05-14-2003 02:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration