build a database library