Added db changes.
Modified code due to db table structure changed.