Merges in complex querying for database objects

Ryan Hamer