PC Review


Reply
Thread Tools Rate Thread

duplicates and other problems

 
 
=?Utf-8?B?Z2FyeSBrZWVnYW4=?=
Guest
Posts: n/a
 
      13th Oct 2006
In my main table I have a lsit of 70 students each with a unique ID. I also
have a field for "advanced competency sign offs" which is a look up table of
more than 60 competencies. When I try to apply more than 1 competency to a
student Access wont let this happen as it says that it is a duplication. Is
it possible to get past this, otherwise I have to have a separate field for
each competency signed off?
Thanks
--
gk
 
Reply With Quote
 
 
 
 
Nikos Yannacopoulos
Guest
Posts: n/a
 
      13th Oct 2006


> ...when I try to apply more than 1 competency to a student

This hints a one-to-many relationship (one student to many competencies)
to begin with, but there is actually more to it...


> ...otherwise I have to have a separate field for each competency

No, no, no and no! This is absolutely wrong!


Actually, you are dealing with a many-to-many relationship here; a
student may (hopefully) possess several competencies, while each
competence may be (hopefully) possessed by several students. In a
relational database design, many-to-many relationships are implemented
by means of an intermediate table (commonly called a junction table,
among other names) which splits it into two one-to-many relationships,
by introducing an artificial "entity", being a unique combination of one
member of each of the two "sides" of the original many-to-many; in your
case, a StudentCompetence. So, in your example you need:

A students table, like:

tblStudents
StID (Primary Key)
FIrstName
LastName
DOB
(etc)


A competencies table, like:

tblCompetences
CmpID (Primary Key)
Competence
(etc)

And a stbStudentCompetencies (junction) table, like:

tblStudentCompetences
StID (Foreign Key)
CmpID (Foreign Key)

Where the two foreign key fields together are also defined as the
junction table's (composite) Primary Key, so it guarantees uniqueness
(among other things).

HTH,
Nikos
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find duplicates, sum column then delete duplicates aileen Microsoft Excel Programming 3 11th Dec 2008 05:03 PM
Check for Duplicates then Sum cells of duplicates aileen Microsoft Excel Programming 7 11th Dec 2008 03:15 PM
* causing problems with finding duplicates with conditional format Michele - DARCC Microsoft Excel Misc 1 26th Mar 2008 02:49 PM
Counting duplicates\Frequency of duplicates A.D. Microsoft Excel Worksheet Functions 3 30th Jun 2004 04:59 PM
Change index from No duplicates to duplicates allowed ReidarT Microsoft Access Form Coding 1 4th Jun 2004 04:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:57 PM.