Update DATABASE.md

added query for allowed contacts and applications