add library to database