Use mbdata to query the DB