seperate DB to lib