<div dir="ltr">Sorry when I wrote "0 or 1 to many" at the end there I really meant "0 or 1 to 1". Big apology for confusing things further.<br><br>I suggest anyone reading this skips my prior long-winded discussion and just refers to Allan's example - it captures the idea nicely.<br>
<br>Mia<br> <br><br><div class="gmail_quote">On Wed, Jul 23, 2008 at 9:14 PM, Allan Barnes <<a href="mailto:abarnes@aiet.com.au" target="_blank">abarnes@aiet.com.au</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">An example of a one-to-one relationship would be something like
a 'person' entity and a 'medicare card' entity –
one person can only have one medicare card, and one medicare card can only
belong to one person.</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Kind regards</span><span style="color: rgb(31, 73, 125);"></span></p>
<p><span style="color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Allan Barnes, CEO</span><span style="color: rgb(31, 73, 125);"></span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Australian Institute of Education and Training</span><span style="color: rgb(31, 73, 125);"></span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">P.O. Box 171</span><span style="color: rgb(31, 73, 125);"></span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Brunswick West 3055</span><span style="color: rgb(31, 73, 125);"></span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Ph: (03) 9387 2051</span><span style="color: rgb(31, 73, 125);"></span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">FAX: (03) 9387 3470</span><span style="color: rgb(31, 73, 125);"></span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Mobile: 0409 428 221</span><span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:itapps-bounces@edulists.com.au" target="_blank">itapps-bounces@edulists.com.au</a> [mailto:<a href="mailto:itapps-bounces@edulists.com.au" target="_blank">itapps-bounces@edulists.com.au</a>] <b>On
Behalf Of </b>Mia Alexiou<br>
<b>Sent:</b> Wednesday, 23 July 2008 9:05 PM<div><br>
<b>To:</b> Year 12 IT Applications Teachers' Mailing List<br>
</div><b>Subject:</b> Re: [Year 12 IT Apps] Database relationships</span></p>
</div><div><div></div><div>
<p> </p>
<div>
<p style="margin-bottom: 12pt;">Hi all,<br>
<br>
I'm an intruder here (I tech year 11 not year 12) but I thought I could share
my somewhat rusty knowledge of databases.<br>
<br>
In response to Lisa's question the employee/department relationship is
one-to-many. As for "true" one-to-one relationships I've never
seen one in action and so doubt they are common at a small database
level. That being said, I can think of a couple of situations where they
might be useful such as splitting commonly needed data from that which is
rarely needed, to reduce the time it takes to run queries over a huge table.
Another reason might be security, with highly sensitive data being stored in a
separate table.<br>
<br>
A 0 or 1 to-many relationship is much more common and is what most people (even
in industry) usually mean when they talk about one-to-one relationships.
These are explained nicely (under the one-to-one heading!) at <a href="http://www.onlamp.com/pub/a/onlamp/2001/03/20/aboutSQL.html" target="_blank">http://www.onlamp.com/pub/a/onlamp/2001/03/20/aboutSQL.html</a>.<br>
<br>
I hope this was helpful<br>
<br>
Mia Alexiou<br>
RMIT TAFE<br>
Information Technology<br>
Sessional Teacher<br>
<br>
</p>
<div>
<p>On Wed, Jul 23, 2008 at 6:10 PM, Lisa Imms <<a href="mailto:lisimms@copticvic.org" target="_blank">lisimms@copticvic.org</a>>
wrote:</p>
<p>Hi Mark,<br>
<br>
Firstly, thanks for the resource :-)<br>
<br>
I hate to even contemplate disagreeing with you as my ITA class and I regard
you as the ITA font-of-all-knowledge, but I will try this anyway.....<br>
<br>
Your example for one-to-one: "E.g. an employee's department data in one
table matches a corresponding department in another table, allowing data
relating to that department to be fetched."<br>
<br>
Wouldn't this be a one to many relationship? Even the line you have joining
them has the 'many feathers' at the employees table? Although each employee can
belong to only one department, each department can (and will) have multiple
employees? So it is actually a one to many relationship?<br>
<br>
Am I correct in assuming that a well organised database would not have any
one-to-one relationships? The two tables in a one-to-one relationship
could/should just be merged into one table?<br>
<br>
Lisa Bairstow<br>
St Mary's Coptic Orthodox College<br>
<br>
________________________________<br>
<br>
From: <a href="mailto:itapps-bounces@edulists.com.au" target="_blank">itapps-bounces@edulists.com.au</a>
on behalf of Mark Kelly<br>
Sent: Wed 7/23/2008 2:24 PM<br>
To: Year 12 IT Applications Teachers' Mailing List<br>
Subject: [Year 12 IT Apps] Database relationships</p>
<div>
<p style="margin-bottom: 12pt;"><br>
<br>
<br>
Hi all. It's been mighty quiet here for a while. To perk things up,<br>
here's a little revision for database relationships (1-1, 1-many,<br>
many-many) that may or may not be useful.<br>
<br>
Cheers<br>
Mark<br>
<br>
--<br>
Mark Kelly<br>
Manager - Information Systems<br>
McKinnon Secondary College<br>
McKinnon Rd McKinnon 3204, Victoria, Australia<br>
Direct line / Voicemail: 8520 9085<br>
School Phone +613 8520 9000<br>
School Fax +613 95789253<br>
kel AT <a href="http://mckinnonsc.vic.edu.au" target="_blank">mckinnonsc.vic.edu.au</a></p>
</div>
<p>Webmaster - <a href="http://www.mckinnonsc.vic.edu.au" target="_blank">http://www.mckinnonsc.vic.edu.au</a> <<a href="http://www.mckinnonsc.vic.edu.au/" target="_blank">http://www.mckinnonsc.vic.edu.au/</a>><br>
IT Lecture notes: <a href="http://vceit.com" target="_blank">http://vceit.com</a>
<<a href="http://vceit.com/" target="_blank">http://vceit.com/</a>></p>
<div>
<p>Moderator: IT Applications Mailing List<br>
<br>
If you Declare War - is it integer or boolean?<br>
_______________________________________________</p>
</div>
<p><a href="http://www.edulists.com.au" target="_blank">http://www.edulists.com.au</a>
<<a href="http://www.edulists.com.au/" target="_blank">http://www.edulists.com.au/</a>>
- FAQ, resources, subscribe, unsubscribe</p>
<div>
<p>IT Applications Mailing List kindly supported by<br>
<a href="http://www.vcaa.vic.edu.au/vce/studies/infotech/itapplications3-4.html" target="_blank">http://www.vcaa.vic.edu.au/vce/studies/infotech/itapplications3-4.html</a>
- Victorian Curriculum and Assessment Authority and</p>
</div>
<p><a href="http://www.vitta.org.au" target="_blank">http://www.vitta.org.au</a>
<<a href="http://www.vitta.org.au/" target="_blank">http://www.vitta.org.au/</a>>
- VITTA Victorian Information Technology Teachers Association Inc</p>
<div>
<div>
<p><br>
_______________________________________________<br>
<a href="http://www.edulists.com.au" target="_blank">http://www.edulists.com.au</a>
- FAQ, resources, subscribe, unsubscribe<br>
IT Applications Mailing List kindly supported by<br>
<a href="http://www.vcaa.vic.edu.au/vce/studies/infotech/itapplications3-4.html" target="_blank">http://www.vcaa.vic.edu.au/vce/studies/infotech/itapplications3-4.html</a>
- Victorian Curriculum and Assessment Authority and<br>
<a href="http://www.vitta.org.au" target="_blank">http://www.vitta.org.au</a>
- VITTA Victorian Information Technology Teachers Association Inc</p>
</div>
</div>
</div>
<p> </p>
</div>
</div></div><p>_______________________________________________ <br></p><div>
<a href="http://www.edulists.com.au" target="_blank">http://www.edulists.com.au </a>- FAQ,
resources, subscribe, unsubscribe <br>
IT Applications Mailing List kindly supported by <br>
</div><a href="http://www.vcaa.vic.edu.au/vce/studies/infotech/itapplications3-4.html%20" target="_blank">http://www.vcaa.vic.edu.au/vce/studies/infotech/infotechindex.html
</a>- Victorian Curriculum and Assessment Authority and <br><div>
<a href="http://www.vitta.org.au" target="_blank">http://www.vitta.org.au </a>- VITTA Victorian
Information Technology Teachers Association Inc</div>
<p> </p>
<div style="text-align: center;" align="center">
<hr size="1" width="100%" align="center">
</div>
<p>Message protected by MailGuard: e-mail anti-virus, anti-spam
and content filtering.<br>
<a href="http://www.mailguard.com.au/mg" target="_blank">http://www.mailguard.com.au/mg</a><br>
<br>
<a href="https://login.mailguard.com.au/report/1vuYjlI9hA/408s2xedFO3BSztpPnlZPi/0.004" target="_blank">Report
this message as spam</a> <br>
</p>
<p><span style="font-size: 10pt;">No virus
found in this incoming message.<br>
Checked by AVG - <a href="http://www.avg.com" target="_blank">http://www.avg.com</a><br>
Version: 8.0.138 / Virus Database: 270.5.4/1567 - Release Date: 7/22/2008 4:05
PM</span></p>
</div>
_______________________________________________
<br><div>
<a href="http://www.edulists.com.au" target="_blank"> http://www.edulists.com.au </a> - FAQ, resources, subscribe, unsubscribe <br>
IT Applications Mailing List kindly supported by <br>
</div><a href="http://www.vcaa.vic.edu.au/vce/studies/infotech/itapplications3-4.html" target="_blank"> http://www.vcaa.vic.edu.au/vce/studies/infotech/infotechindex.html </a> - Victorian Curriculum and Assessment Authority and
<br><div>
<a href="http://www.vitta.org.au" target="_blank"> http://www.vitta.org.au </a> - VITTA Victorian Information Technology Teachers Association Inc</div></div>
</blockquote></div><br></div>