Database query functions completed.