Database code modified and added