SSP-1368 , SSP-1224

* applied primary key constraints on external_data tables
* used the concatination of natural key values as external view ID's