Thread: Can a database notify all clients when something changes?
Can a database notify all clients when something changes and send the changes to the clients? Let me explain. Suppose that there are 3 workstations connected to a central database. When Workstation A changes something, Workstation B and C must get the changes. So, can any database do that? If it does, what is called? Is there a library for that? Or Do I have to write 1 myself.( I hope not ! ). thanx! __________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250
Satan Devil wrote: > Suppose that there are 3 workstations connected to a > central database. When Workstation A changes > something, Workstation B and C must get the changes. Not really clear what you are trying to accomplish. The simple fact that all 3 workstations are communicating with a central database means that they all "get the changes". Are you saying that B and C might be displaying the old version of data that A has just changed, and you want B and C to automatically see the updated values? If that is what you are after, then you'll need to do something application-wise. What application are these clients using to view data? You can either (1) broadcast changes entirely through your application, or (2) set up a trigger in the database to kick off the notifications. Depending on how many changes you want to monitor, solution 2 might be burdensome (lots of triggers.) -- Guy Rouillier
On Wed, Dec 15, 2004 at 03:37:05PM -0800, Satan Devil wrote: > Can a database notify all clients when something > changes and send the changes to the clients? Sure. Use LISTEN and NOTIFY. -- Alvaro Herrera (<alvherre[@]dcc.uchile.cl>) Al principio era UNIX, y UNIX habló y dijo: "Hello world\n". No dijo "Hello New Jersey\n", ni "Hello USA\n".