Added some data base logic into Library project.