api: Database: ruby implementation