implemetation of database