Drew Wutka
DWUTKA at Marlow.com
Fri May 4 15:39:31 CDT 2007
Stick to the right way. You are dealing with a many to many situation. There really isn't a lazy way, because putting a checkbox field in for group identification would be the un-normalized way. By having the fields as yes/no, you make things harder in many situations. For example, what if they want a list of groups on a form. With check boxes, you'll be making that list manually. Etc, etc. Not too mention, NEVER trust the users/owners. Everyone lies (just listen to House). Always develop to have as much wiggle room as possible. ;) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Elizabeth.J.Doering at wellsfargo.com Sent: Friday, May 04, 2007 9:36 AM To: accessd at databaseadvisors.com Subject: [AccessD] When to Use a Junction Table Hullo Gurus! I'm trying to decide if I am just lazy since it is Friday. Or if this will come around later to haunt me ..... A bank has a call center for handling people who have questions about their credit cards. Call center workers are divided into groups which have slightly different permissions to give certain kinds of credits. The list of groups is very limited--three groups--and the list of credits is pretty limited as well, perhaps 35. The right way to structure tables so that I can look up to see if a certain user in a certain group has a certain permission is absolutely to have a table Credit and another table Group and a junction table Permission with foreign keys CreditID and GroupID (and a primary key of PermissionID.) The lazy way causes me less grief in the short term: I make one table Credit, with three additional true/false fields for the three Groups. This way, I spent less time today documenting tables and sprocs to make officialdom happy. In the long run however, I have more grief if a new Group is added. Of course, everyone swears there will never be a new Group. In all of your combined experience, does "there will never be a new Group" mean, "there will be a new Group next week" or "there will be a new Group, but not for years and years" ? How would you structure this? Thanks, Liz Liz Doering elizabeth.j.doering at wellsfargo.com 612.667.2447 "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation" -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.