updated the db script and the related files that manipulate the database tables