finished database chapter