Table structure (1 Viewer)

Kayleigh

Member
Local time
Today, 07:45
Joined
Sep 24, 2020
Messages
706
I am considering the best way to structure one component of my DB.
The scenario is that each person has certificates so there is a table for people and another table for certificates. However we also have the education details for some people which we record in another table with foreign key to people table. My question is how can I have certificates linked to the education table whilst allowing certificates to be entered individually not linked to a specific record in education?
 

plog

Banishment Pending
Local time
Today, 01:45
Joined
May 11, 2011
Messages
11,638
Indirectly--
Education is directly connected to people.
Certificates is directly connected to people.
Education isn't directly connected to people but you can go thru people to get there.

If that doesn't work, provide a more concrete example to demonstrate.
 

Kayleigh

Member
Local time
Today, 07:45
Joined
Sep 24, 2020
Messages
706
So you are saying to have two parallel tables and the connection between education and certificates is indirect but I would like to associate a certificate with an education record. Would it be denormalising the data to have 2 foreign keys in certificates - to education, as well as to staff?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 07:45
Joined
Feb 19, 2013
Messages
16,610
The scenario is that each person has certificates so there is a table for people and another table for certificates
this does not sound right to me - the relationship should be many to many (people, certificates and a joining table). Or are you saying only one person can have 'certificate A'? It would be this joining table that would hold a link to the education table if such a record exists.

I'm guessing the education table does not have any structure as such - for example if 5 people have education 'class A' there will be 5 repeats of 'class A'
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:45
Joined
Feb 19, 2002
Messages
43,233
Aren't certificates always connected to some type of education, even if it is just, read this pamphlet and take a test? So you have both formal and informal education.

People-->Education--->Certificates
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 01:45
Joined
Feb 28, 2001
Messages
27,148
So you are saying to have two parallel tables and the connection between education and certificates is indirect but I would like to associate a certificate with an education record. Would it be denormalising the data to have 2 foreign keys in certificates - to education, as well as to staff?

As other have mentioned, it depends. If you need to take a course to get a certificate and that is the ONLY way you get a certificate, then the certificate can be as simple as a check-box on the educational course.

However, I have a feeling that it is possible to take a course and get credits but not an actual certificate, and it is also possible to "challenge" a certificate without the course. If that is the case, then your insistence on their linkage is misplaced. The linkage in the latter case is illusory. If it is possible to get one without the other, there is no linkage and it is, in fact, a parallel relationship.
 

plog

Banishment Pending
Local time
Today, 01:45
Joined
May 11, 2011
Messages
11,638
certificates to be entered individually not linked to a specific record in education?
... I would like to associate a certificate with an education record.

So, certificates may or may not be associated with education. In that case I would make all certificates relate to an education record and put a dummy record in education that unassociated certificates link to.
 

Users who are viewing this thread

Top Bottom