implement the api in db level