-3

I want to monitor a " .db " continuously to see if it has been updated using python. And when the database is updated, I want to perform a certain task wrt what is updated. Any ideas?

This is the file I want to monitor. I specifically want to monitor the value column for change of bit from 1 to bit 0.

bruno desthuilliers
  • 75,974
  • 6
  • 88
  • 118
Arohi Gupta
  • 95
  • 1
  • 8
  • The question is too broad for monitoring by saying you want to monitor the db. With any client tool you may first want to define what you want to monitor. Another approach is to have triggers on every table, which i dont recommend. – Jas Dec 21 '15 at 15:13

1 Answers1

3

It sounds like you want something like a trigger.

Batman
  • 541
  • 4
  • 25
  • 1
    Could be the right answer. Pls provide more details why you suggest this approach and its limitations and I will upvote the answer. In this format, however, it feels more like a comment, than an answer. – Shadow Dec 21 '15 at 15:24
  • i can only use the python prompt and cannot use sql language to control my hardware appliances. Please suggest a way to monitor database using python. – Arohi Gupta Dec 21 '15 at 15:25
  • @ArohiGupta I would take a closer look at this answer which sounds similar to your situation: http://stackoverflow.com/questions/5771925/python-how-to-get-notifications-for-mysql-database-changes – Batman Dec 21 '15 at 15:29
  • @Batman i want to run it on rpi. And i'm not running it on cmd. – Arohi Gupta Dec 21 '15 at 15:30
  • Ya, this question seems to be out of the scope for this site without further research into this topic. – Batman Dec 21 '15 at 15:32