Can a database act as the signing agent for a stellar smart contract? I.e. the sender or receiver of payment requests to query the database and if certain conditions are met in the database, the agreed upon funds are transferred?.
Yes that is easily possible, for ease of coding, you can even refer your favorite SDK :)
Stellar is available in all coding platforms(officially and unofficially) that you can think of :-
Official SDK are available here
yes this is possible. I'm working on different smart contract solutions to be provided as services. See e.g. https://smartstellar.org for a beta version on timed transactions.