Ported some methods of Library to Sqlite.