Updated the database scripts to have views