Two applications are using the same MSSQL database.
My application is using sqlalchemy with pymssql and wants to receive a notification when a row is added to a specific table by another application.
What is the correct way of doing this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Lets call your application “consumer”, and the other application “producer”.
There are several approaches, the best fit will depend on how many records, producers and consumers you are expecting.
falseas the default value. New entries should have this field set to false, so other application can set “ack” to true after processing new entries.Be aware that any algorithm that involves polling the database for changes has potential to tax heavily on the underlying DBMS.
[update]
Suggestion from van: