Began implementation of database query method.