Added primary key and sets to database