begin database implementation