Re: storing deleted appoitments
Posted by: Rick James
Date: January 22, 2015 09:44AM

I can't say that one approach is decidedly better than another. Here are my opinions...

Plan A: Delete the row

Plan B: Keep the row, but flag it as deleted -- The business logic may require that you keep a record of it.

Plan C: Move the record to another table. This is clumsy, but it is the most efficient for other queries that need to look through still-valid records.

You need to do a cascading delete to get rid of the services tied to that appointment.

Plan X: Use ON DELETE CASCADE -- This ties you into Plan A, and needs to be thought through carefully to make sure that it does all the records, and not extra ones.

Plan Y: Write code in the API to do the work -- I trust this better. (That's a personal preference.) This also allows for flagging (Plan B) or moving (Plan C) the records instead of actually DELETEing them.

Options: ReplyQuote


Subject
Written By
Posted
Re: storing deleted appoitments
January 22, 2015 09:44AM
January 23, 2015 01:27PM
January 23, 2015 05:58PM
January 26, 2015 11:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.