create table constraint table view (still not working)