Jump to content

General question


dc_jt

Recommended Posts

Hi

 

Ive got a staff table which contains all staff details and a course table which contains all course details. I then have a table which links staff to a particular course i.e link_id, staff_id, course_id.

 

Now I was wondering, when I delete a staff member from the staff table, should I also delete all links this staff member has in the link table?

 

I.e If the link table was like this:

 

link_id staff_id course_id

1        35        2

2        35        7

3        35        3

4        35        9

 

Now when I delete staff_id 35 from the staff table should I also delete all from link table where staff_id = 35?

 

Thanks

Link to comment
Share on other sites

It really depends. I find it useful to just make the staff member id "inactive" That way in case of an accidental deletion you still have them there and do not lose all the data.

 

Than when you pull out links you reference the staff table and only pull out links where the staff is active.

 

It is all about how you want to do it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.