Database Code Added

Database code added and deleted not needed code. Also changed package
names