DB porting almost complete