| View previous topic :: View next topic |
| Author |
Message |
Michael Aresti Guest
|
Posted: Fri Aug 25, 2006 7:47 pm Post subject: Database synchronization |
|
|
My application is working with MySQL Server. Using it I can modify every
row in some special schema in database. Suppose that my program is
running and I am only viewing query response (for example "select * from
employees") and somebody else using MySQL Query Browser is making some
changes in that table (deleting few rows).
My question is: is there enabled any kind of synchronization that I can
use in my program (if something is changing in tables in database it
will inform my program about it). I want that using my program I will
view always the most actual results. |
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Fri Aug 25, 2006 10:30 pm Post subject: Re: Database synchronization |
|
|
Michael Aresti wrote:
| Quote: | My application is working with MySQL Server. Using it I can modify every
row in some special schema in database. Suppose that my program is running
and I am only viewing query response (for example "select * from
employees") and somebody else using MySQL Query Browser is making some
changes in that table (deleting few rows).
My question is: is there enabled any kind of synchronization that I can
use in my program (if something is changing in tables in database it will
inform my program about it). I want that using my program I will view
always the most actual results.
|
No. The work others do is isolated from you until you requery the
database. Some databases have callback APIs to inform you of record
changes (or you can build them yourself on a table-by-table basis if you
have to) but they're tricky to implement. If you have a table that is
constantly changing for which you have to see the latest changes, the best
bet is usually just to refresh the dataset on some kind of timer.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html |
|
| Back to top |
|
 |
Paul Nichols [TeamB] Guest
|
Posted: Fri Sep 01, 2006 8:11 pm Post subject: Re: Database synchronization |
|
|
Michael Aresti wrote:
| Quote: | My question is: is there enabled any kind of synchronization that I can
use in my program (if something is changing in tables in database it
will inform my program about it). I want that using my program I will
view always the most actual results.
|
Kevin's answer is the only one that I know of that will work. In
addition, each update, insert, or delete could have a change/auditing
table associated with it with a timestamp. That way, you could use a
threaded call to see what rows need to be updated in the refresh, if any. |
|
| Back to top |
|
 |
Michael Aresti Guest
|
Posted: Sat Sep 02, 2006 6:49 pm Post subject: Re: Database synchronization |
|
|
Paul Nichols [TeamB] wrote:
| Quote: | Kevin's answer is the only one that I know of that will work. In
addition, each update, insert, or delete could have a change/auditing
table associated with it with a timestamp. That way, you could use a
threaded call to see what rows need to be updated in the refresh, if any.
|
Thanks for help. Your both answers are very good explanation of problem
I wanted to resolve. But I also think that at present my Java programing
skills are insufficiently to this alone... so I decided to change the
"Transaction Isolation" level to TRANSACTION_REPEATABLE_READ. This way
nobody else can make any changes in database tables and I have always
the most actual data. |
|
| Back to top |
|
 |
|