<div dir="ltr">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><br><div class="gmail_quote">On Wed, Jul 23, 2008 at 6:10 PM, Lisa Imms <<a href="mailto:lisimms@copticvic.org" target="_blank">lisimms@copticvic.org</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;">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<br>
<div><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><br>
<br>
</div>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>><br>
<div>Moderator: IT Applications Mailing List<br>
<br>
If you Declare War - is it integer or boolean?<br>
_______________________________________________<br>
</div><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<br>
<div>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>
</div><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<br>
<div><div></div><div><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</div></div></blockquote></div><br></div>