If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Track changes, Audit and rollback

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-06-07, 12:45
avihai avihai is offline
Registered User
 
Join Date: Jul 2003
Posts: 24
Track changes, Audit and rollback

Hey, does any one can give me some references or advices on how to control on changes in the DB, audit them and have the ability to rollback.
My application is in Java

Thank you
Reply With Quote
  #2 (permalink)  
Old 05-08-07, 06:09
aschk aschk is offline
Registered User
 
Join Date: Mar 2007
Location: 636f6d7075746572
Posts: 770
So long as you maintain a connection to the DB and are using transactions then you can do the following :

1. Begin transaction
2. Make changes to your data
3. Select from tables that have changed data
4. If correct commit, else rollback.
Reply With Quote
  #3 (permalink)  
Old 05-09-07, 15:08
avihai avihai is offline
Registered User
 
Join Date: Jul 2003
Posts: 24
The problem is that i am talking about long period

I mean that the client can do changes, temporary save.
and after a week can do cancel or apply changes
Reply With Quote
  #4 (permalink)  
Old 05-09-07, 21:31
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
THis article will give you some ideas on Point in Time database architecture.
Reply With Quote
  #5 (permalink)  
Old 05-10-07, 03:48
aschk aschk is offline
Registered User
 
Join Date: Mar 2007
Location: 636f6d7075746572
Posts: 770
After a week
What happens if two people make a change to the same data then try to commit that information after a week? Which one gets priority? The person who submits first will have their information overwritten by the person who submits second.
Reply With Quote
  #6 (permalink)  
Old 05-10-07, 04:13
avihai avihai is offline
Registered User
 
Join Date: Jul 2003
Posts: 24
The same answer like transaction

Let say user a and user b open a transaction to the DB.
They dont see each other changes. (in the default behavior).
at the end they both ask for commit.

The same behavior in this case will be in my case.

the client open a " transaction " write in some temporal workspace (he dosnt overide the data , i dont know how to do this).
The other users can see his changes.
At the end he will ask for apply changes.

If the data has already changed the user will get a message on conflict and he will need to do a merge.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On