Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes Database record change identification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Database record change identification" Watch "Database record change identification" New topic
Author

Database record change identification

Veshnu Ramakrishnan
Ranch Hand

Joined: Sep 27, 2005
Posts: 44
Hi
Is there any way of intimating a program automatically when a record in a database is changed by the database administrator without the program's knowledge.
And is there any way to check whether a record is changed since previous visit and to load that data only if that record has been changed.


Veshnu<br />SCBCD<br />SCWCD<br />SCJP
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

Veshnu,
Welcome to JavaRanch!


Is there any way of intimating a program automatically when a record in a database is changed by the database administrator without the program's knowledge.

Who changed it? You could have a trigger based on user id. But you would have to be able to determine whether it was the program or the user making the change.


And is there any way to check whether a record is changed since previous visit and to load that data only if that record has been changed.

You still have to do a query, but you can add a last updated column to your table.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
wood burning stoves
 
subject: Database record change identification
 
Similar Threads
How to watch when database table row has changed using java
Persistence of updated objects
Joda DateTime
how to use data on access in j2me?
NX: Bodgitt and Scarper: may I modify the javadoc of the interface DB.java?