Another issue is that the data needed by this application is going to be sensitive - email addresses, names, etc. Many applications will encrypt these values with application logic. So a database function will need to perform it. The encryption key is going to be need to written into the query in this app if that works, adding more surface area to where that key lives. That's also assuming the simple use case of a single key, not per tenant, or roating, etc.