Implemented the Query and Delete operations.