FROM DB to entities