Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 Tags
Subject: RE: Allow user to delete?
Thread ID: 269040 Message ID: 269049 # Views: 70 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Friday, July 16, 2010 9:07:21 AM         
   


> >
> >
> > 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

Yes. You never delete a master record. You could after checking that the master record has no records in other table pertaining to it. But I don't do that. I generally have an Inactive column which I mark as .T. A datetime field should be better if you need to know when a product becomes inactive. For an employee I do keep a date field.

Regards
Tushar

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