Database script updated

AND remove function in progress