I don't agree 100% Some times it is desirable to create a schema like this.
For example [Document] title author / | \ [Lease] [divorces] [Sales] leasee plantif salesdate rate defendant seller In other words if you are mapping a "extends" type relationship. In the above example, [Lease], [divorces], [Sales] are the same family of objects, all are documents. In fact if you look at J2ee CMP spec. there are seven different relationships including one-to-one, one-to-many etc. for this very reason. Sometimes normalisation is not the best model. Justin -----Original Message----- From: Gordon Thomas [mailto:[EMAIL PROTECTED] Sent: 31 October 2003 15:41 To: [EMAIL PROTECTED] Subject: RE: [ cf-dev ] one-to-one relationship if you are down to 1-1 relationships, then the data is 'incorrectly' organised and you need to rethink the table structure, as probably this can be shrunk down to a single table. Fundementals of Database Systems by Elmasri/Navarthe explains the whole thing very well and has been my stalwart design/normalisation book for more years than i care to think about. G. Gordon Thomas Database Administrator Channel Four Television [EMAIL PROTECTED] Tel +44 (0) 20 7306 8278 http://www.channel4.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 31 October 2003 15:23 To: [EMAIL PROTECTED] Subject: [ cf-dev ] one-to-one relationship This is a very simple question, but something I've never really given much thought before. If you've got two tables with a one-to-one relationship, how do you deal with the foreign keys? e.g. lets say you had FootballTeams and FootballGrounds (and lets pretend there aren't any teams that share grounds). In which table would you store the foreign key linking it to the other table? Or would you duplicate data and store in both. e.g: Team, GroundID Rangers, 2 Celtic, 3 Hearts, 5 Hibs, 1 Aberdeen, 4 Ground, TeamID Easter Road, 4 Ibrox, 1 Parkhead, 2 Pittodrie, 5 Tynecastle, 3 I'm sure there's a logical rule for dealing with this, but I can't think what it is. Not a very difficult issue, just something I'm pondering. Duncan Cumming IT Manager http://www.alienationdesign.co.uk mailto:[EMAIL PROTECTED] Tel: 0141 575 9700 Fax: 0141 575 9600 Creative solutions in a technical world ---------------------------------------------------------------------- Get your domain names online from: http://www.alienationdomains.co.uk Reseller options available! ---------------------------------------------------------------------- ---------------------------------------------------------------------- -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] ############################################################################ ######### Note: Any views or opinions are solely those of the author and do not necessarily represent those of Channel Four Television Corporation unless specifically stated. This email and any files transmitted are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error, please notify [EMAIL PROTECTED] Thank You. ############################################################################ ######### -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
