Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"deleting entries from tables without losing pointers to those entries

Status
Not open for further replies.

striker73

MIS
Jun 7, 2001
376
US
I have a table in my database called Employee. I also have a Job table that links one employee to each Job. My client wants to be able to add Employees (which should be easy), but also be able to remove Employees (when people quit, etc.). I don't want to just delete the employee from the table because that would possibly leave dangling pointers from the Job table (and I don't want to go through and re-assign the Jobs to different employees). I was thinking about adding another field to my Employee table that is called Active. If the employee is "removed", then active would be set to no. I have quite a few other tables where I would like to implement the same technique. Does anyone see a problem with this idea? Any better ideas on how to get around this? Thanks!
 
Good idea. This is the one thing I use in all my DBs. The data never gets deleted and the security limitations can be set to only allow update and select. Therefore the DB is more secure.

hth
Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top