Question regarding databases..



Hello,

I wasn't sure if this should go in this usenet or in something like
Perl.DBI.etc, so I apologize if this is in the wrong place.

Pretty simple question. I would like to create a Perl shell script
that actively monitors a table in a database. Let's exemplify this
before i go any further...

Let's say I have a table with some data:

ID Name Info is_processed

where ID, Name and Info are just arbitrary bits of data, not important
to this specifically. I'd also like an "is_processed" field that'll be
either 1 or 0. The idea behind this backend shell script is so that
some frontend application can add data to the database quickly and get
a quick response for the user on the website. The backend script will
be actively monitoring the database, and whenever it sees something
whose "is_processed" value is 0, it says "hey, let me process that,"
and if the action is successful changes the value to 1 and never has to
touch that record again. The "is_processed" value might be zero for two
reasons: 1) That record was just added by the frontend script (webpage)
and hasn't yet been touched by the backend script, or 2) The backend
script wasn't able to process that recordset on a previous attempt.

That's the idea... the only problem is, I don't know how to make this
database connection "live," ie I don't know how to write a program that
just sits there running, looking for changes in a database, without
ever terminating (unless by command).

Any ideas? Your help is more than greatly appreciated.

Thanks,
Burak

.



Relevant Pages

  • [NEWS] IBM Informix Web DataBlade Local Root by Design
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... that ease development of "intelligent", interactive, Web-enabled database ... person who has access to change the Perl script. ...
    (Securiteam)
  • RE: Need some MySQL query help...
    ... attempting to run the script: ... passed to the database. ... passwd entry to the current database entry. ...
    (perl.dbi.users)
  • Re: Cannot Open SQL Server Table in Access.ADP File.
    ... I dont think that SQL Server will take 'veiw dependencies' into effect; ... Generate Script Wizard did not work on my original database, ... After fixing some of my tables and a few stored procedures and views, ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Function that returns date of file.
    ... string after the date/time when it is used by itself. ... Is that your entire script? ... I make an IF statement that required the 'equals equals'. ... designed database your job will be all that much harder. ...
    (alt.php)
  • IBM Informix Web DataBlade: Local root by design
    ... IBM Informix Web DataBlade: Local root by design ... Impact: Any user who can: 1) Save a Perl script anywhere on the server's ... admin right on any database can do it by loading the WDB module into ...
    (Bugtraq)