Can a listener tell you when a database changes?

1 回表示 (過去 30 日間)
Kieren Bradley
Kieren Bradley 2018 年 2 月 2 日
コメント済み: Kieren Bradley 2018 年 6 月 25 日
I wish to have a database that is accessed by multiple users and have a figure that will update a graph when another user changes the database. Can a listener be attached to a database object to tell when a particular table has been altered?

採用された回答

Arpan Badeka
Arpan Badeka 2018 年 6 月 22 日
Hello Kieren
There is no specific way to achieve this. But what you can do is, have a timestamp column in the database table for which you want to keep the track and a trigger on insert and update that updates this row to now. Have a cron job running which is fetching the count based on the timestamp and updates the graph accordingly.
Thanks,
Arpan Badeka
  1 件のコメント
Kieren Bradley
Kieren Bradley 2018 年 6 月 25 日
Thanks for answering, I was assuming this was the case but wanted confirmation as I may have missed something.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by