MSFN Forum: Monitoring a MySQL database - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Monitoring a MySQL database Rate Topic: -----

#1 User is offline   mstester 

  • Newbie
  • Group: Members
  • Posts: 25
  • Joined: 17-July 06

Posted 09 May 2007 - 05:50 PM

Hi all,

Is it possible to wirte some VB.NET code which can detect a change to a database i.e. something being added to a table or deleted?

If it is I would really appricated any pointers on how to go about this :)

Thanks in advanvce


#2 User is offline   Phil Edwards 

  • Group: Members
  • Posts: 5
  • Joined: 09-July 07

Posted 09 July 2007 - 05:27 PM

Generally, you wouldn't want to do it that way. Most enterprise-level relational database software supports what are called 'trigger' functions. These are just little bits of code that you build into the database itself and which get fired when something specific happens, such as a row of data getting added to the database or an existing row getting updated.

You can use these trigger functions to do almost anything, but a typical usage would be to carry out some sort of sanity checking on the data being presented. By doing this job in the trigger function code, you end up with a more 'future proof' database, since it doesn't matter where the data is being presented to you from - it could be from a web-based app, from a command line prompt or from some DB management tool, it would all get validated in the same way. This keeps your data integrity rules where they belong, i.e. in the database itself and also means you don't have to re-code the validation every time you want to add a new interface between the data and the front end application.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy