Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 To: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 Tags
Subject: RE: Allow user to delete?
Thread ID: 269040 Message ID: 269047 # Views: 72 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Friday, July 16, 2010 9:02:51 AM         
   


> > Hi all,
> > I have a scores.dbf which stores student scores, with a field "empl_id" that holds the identity of the teacher who recorded the score.
> > Shall I give the users the ability to delete employees? If an employee (a teacher) is fired and deleted, all scores that he has recorded will have no value "Recorded By:" in reports.
> > Or shall I add a field "teacher_name" to the scores.dbf and record the teacher's name in that field.
> > This question applies to many dbf files, and I have the same problem in my retail application: allow a user to delete a product and de-normalize the table, or remove the delete function from the app?
> >
> > May be some experts can give me advice...
> >
> > Regards
> > Samir
>
>
> Why wouldnt you just add a datetime field to store the date of end-of-relationship. When that date <= DATETIME(), you know the person no longer works for the school and you would not break any integrity.
>
> The same applies to products. If date <= DATETIME(), you are no longer offering that product and you nolonger print it in the product brochures but invoices remain intact.
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts

Hi Eric
I'm relatively new in relational-db and want to make sure I understood you well. You mean:
- Never delete a master record (employee, product etc...)
- Mark it as "gone" with datetime.
If this is what you meant, is this a common way to do things in database apps? It doesn't matter carrying old records, may be for years?


Regards
Samir

ENTIRE THREAD

Allow user to delete? Posted by Samir H. @ 7/16/2010 8:15:15 AM
RE: Allow user to delete? Posted by Eric den Doop @ 7/16/2010 8:44:09 AM
RE: Allow user to delete? Posted by Samir H. @ 7/16/2010 9:02:51 AM
RE: Allow user to delete? Posted by tushar @ 7/16/2010 9:07:21 AM
RE: Allow user to delete? Posted by Samir H. @ 7/16/2010 9:09:56 AM
RE: Allow user to delete? Posted by Mike Yearwood @ 7/16/2010 3:31:14 PM
RE: Allow user to delete? Posted by Samir H. @ 7/16/2010 3:40:28 PM
RE: Allow user to delete? Posted by Mike Yearwood @ 7/16/2010 7:08:49 PM
RE: Allow user to delete? Posted by Samir H. @ 7/16/2010 7:23:49 PM
RE: Allow user to delete? Posted by Samir H. @ 7/28/2010 7:50:51 PM
RE: Allow user to delete? Posted by Mike Yearwood @ 7/28/2010 8:45:57 PM
RE: Allow user to delete? Posted by tushar @ 7/29/2010 6:09:49 AM
RE: Allow user to delete? Posted by Samir H. @ 7/29/2010 6:16:56 AM
RE: Allow user to delete? Posted by Mike Yearwood @ 7/29/2010 6:37:48 AM
RE: Allow user to delete? Posted by Samir H. @ 7/29/2010 6:44:02 AM
RE: Allow user to delete? Posted by Mike Yearwood @ 7/29/2010 6:47:55 AM
RE: Allow user to delete? Posted by Samir H. @ 7/29/2010 6:51:16 AM
RE: Allow user to delete? Posted by Mike Yearwood @ 7/29/2010 6:53:54 AM
RE: Allow user to delete? Posted by Samir H. @ 7/29/2010 7:11:42 AM
RE: Allow user to delete? Posted by Jun Tangunan @ 7/16/2010 9:24:37 AM
RE: Allow user to delete? Posted by Samir H. @ 7/16/2010 11:07:02 AM
RE: Allow user to delete? Posted by Jun Tangunan @ 7/16/2010 11:36:30 AM
RE: Allow user to delete? Posted by Samir H. @ 7/16/2010 11:45:26 AM
RE: Allow user to delete? Posted by Jun Tangunan @ 7/16/2010 11:57:03 AM
RE: Allow user to delete? Posted by Samir H. @ 7/16/2010 12:06:24 PM
RE: Allow user to delete? Posted by Mike Yearwood @ 7/17/2010 12:06:21 AM
RE: Allow user to delete? Posted by Samir H. @ 7/17/2010 5:41:37 AM
RE: Allow user to delete? Posted by Mike Yearwood @ 7/16/2010 3:24:20 PM
RE: Allow user to delete? Posted by Samir H. @ 7/16/2010 3:35:58 PM
RE: Allow user to delete? Posted by Mike Yearwood @ 7/16/2010 6:58:12 PM
RE: Allow user to delete? Posted by Samir H. @ 7/16/2010 3:44:11 PM
RE: Allow user to delete? Posted by Mike Yearwood @ 7/16/2010 11:13:37 PM
RE: Allow user to delete? Posted by Binod Binani @ 7/17/2010 7:51:53 AM
RE: Allow user to delete? Posted by Samir H. @ 7/21/2010 6:17:52 AM
RE: Allow user to delete? Posted by Mike Yearwood @ 7/21/2010 3:30:07 PM
RE: Allow user to delete? Posted by Samir H. @ 7/21/2010 4:14:28 PM
RE: Allow user to delete? Posted by Samir H. @ 8/2/2010 7:38:23 AM
RE: Allow user to delete? Posted by Mike Yearwood @ 8/2/2010 3:42:57 PM
RE: Allow user to delete? Posted by Samir H. @ 8/2/2010 3:58:20 PM
RE: Allow user to delete? Posted by Mike Yearwood @ 8/2/2010 4:00:51 PM
RE: Allow user to delete? Posted by Samir H. @ 8/2/2010 4:10:57 PM
RE: Allow user to delete? Posted by Mike Yearwood @ 8/2/2010 4:27:01 PM
RE: Allow user to delete? Posted by Samir H. @ 8/2/2010 5:45:12 PM
RE: Allow user to delete? Posted by Mike Yearwood @ 8/2/2010 8:00:48 PM