update to database and views

edited unique and primary keys in the database