chain script
fetching given database
api for chains