Add initial database query service and test