resouce builder for db