Index: build/DatabaseStructure.sql
===================================================================
diff -u -rad2a5ea28040c4887578b062706c42556a6c5cc2 -rcc406f5aa04e824a7b39692695165c5923155758
--- build/DatabaseStructure.sql	(.../DatabaseStructure.sql)	(revision ad2a5ea28040c4887578b062706c42556a6c5cc2)
+++ build/DatabaseStructure.sql	(.../DatabaseStructure.sql)	(revision cc406f5aa04e824a7b39692695165c5923155758)
@@ -1,6 +1,6 @@
 /* ---------------------------------------------------- */
 /*  Generated by Enterprise Architect Version 12.0 		*/
-/*  Created On : 28-Mar-2018 11:33:36 				*/
+/*  Created On : 29-Mar-2018 11:05:25 				*/
 /*  DBMS       : SQLite 								*/
 /* ---------------------------------------------------- */
 
@@ -384,14 +384,14 @@
 	CONSTRAINT 'FK_AssessmentSectionEntity_HydraulicLocationCalculationCollectionEntity7' FOREIGN KEY ('HydraulicLocationCalculationCollectionEntity7Id') REFERENCES 'HydraulicLocationCalculationCollectionEntity' ('HydraulicLocationCalculationCollectionEntityId') ON DELETE No Action ON UPDATE Cascade,
 	CONSTRAINT 'FK_AssessmentSectionEntity_HydraulicLocationCalculationCollectionEntity8' FOREIGN KEY ('HydraulicLocationCalculationCollectionEntity8Id') REFERENCES 'HydraulicLocationCalculationCollectionEntity' ('HydraulicLocationCalculationCollectionEntityId') ON DELETE No Action ON UPDATE Cascade,
 	CONSTRAINT 'FK_AssessmentSectionEntity_ProjectEntity' FOREIGN KEY ('ProjectEntityId') REFERENCES 'ProjectEntity' ('ProjectEntityId') ON DELETE Cascade ON UPDATE Cascade,
-	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity1' UNIQUE ('HydraulicLocationCalculationCollectionEntity1Id'),
-	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity2' UNIQUE ('HydraulicLocationCalculationCollectionEntity2Id'),
-	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity3' UNIQUE ('HydraulicLocationCalculationCollectionEntity3Id'),
-	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity4' UNIQUE ('HydraulicLocationCalculationCollectionEntity4Id'),
-	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity5' UNIQUE ('HydraulicLocationCalculationCollectionEntity5Id'),
-	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity6' UNIQUE ('HydraulicLocationCalculationCollectionEntity6Id'),
-	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity7' UNIQUE ('HydraulicLocationCalculationCollectionEntity7Id'),
-	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity8' UNIQUE ('HydraulicLocationCalculationCollectionEntity8Id')
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity1Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity1Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity2Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity2Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity3Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity3Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity4Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity4Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity5Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity5Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity6Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity6Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity7Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity7Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity8Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity8Id')
 )
 ;
 
@@ -648,9 +648,27 @@
 (
 	'GrassCoverErosionOutwardsFailureMechanismMetaEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
 	'FailureMechanismEntityId' INTEGER NOT NULL,
+	'HydraulicLocationCalculationCollectionEntity1Id' INTEGER NOT NULL, -- Represents the design water level failure mechanism specific factorized signaling norm
+	'HydraulicLocationCalculationCollectionEntity2Id' INTEGER NOT NULL, -- Represents the design water level failure mechanism specific signaling norm
+	'HydraulicLocationCalculationCollectionEntity3Id' INTEGER NOT NULL, -- Represents the design water level failure mechanism specific lower limit norm
+	'HydraulicLocationCalculationCollectionEntity4Id' INTEGER NOT NULL, -- Represents the wave height failure mechanism specific factorized signaling norm
+	'HydraulicLocationCalculationCollectionEntity5Id' INTEGER NOT NULL, -- Represents the wave height failure mechanism specific signaling norm
+	'HydraulicLocationCalculationCollectionEntity6Id' INTEGER NOT NULL, -- Represents the wave height failure mechanism specific lower limit norm
 	'N' REAL NOT NULL,
 	'ForeshoreProfileCollectionSourcePath' TEXT,
-	CONSTRAINT 'FK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade
+	CONSTRAINT 'FK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_FailureMechanismEntity' FOREIGN KEY ('FailureMechanismEntityId') REFERENCES 'FailureMechanismEntity' ('FailureMechanismEntityId') ON DELETE Cascade ON UPDATE Cascade,
+	CONSTRAINT 'FK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity1' FOREIGN KEY ('HydraulicLocationCalculationCollectionEntity1Id') REFERENCES 'HydraulicLocationCalculationCollectionEntity' ('HydraulicLocationCalculationCollectionEntityId') ON DELETE No Action ON UPDATE Cascade,
+	CONSTRAINT 'FK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity2' FOREIGN KEY ('HydraulicLocationCalculationCollectionEntity2Id') REFERENCES 'HydraulicLocationCalculationCollectionEntity' ('HydraulicLocationCalculationCollectionEntityId') ON DELETE No Action ON UPDATE Cascade,
+	CONSTRAINT 'FK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity3' FOREIGN KEY ('HydraulicLocationCalculationCollectionEntity3Id') REFERENCES 'HydraulicLocationCalculationCollectionEntity' ('HydraulicLocationCalculationCollectionEntityId') ON DELETE No Action ON UPDATE Cascade,
+	CONSTRAINT 'FK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity4' FOREIGN KEY ('HydraulicLocationCalculationCollectionEntity4Id') REFERENCES 'HydraulicLocationCalculationCollectionEntity' ('HydraulicLocationCalculationCollectionEntityId') ON DELETE No Action ON UPDATE Cascade,
+	CONSTRAINT 'FK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity5' FOREIGN KEY ('HydraulicLocationCalculationCollectionEntity5Id') REFERENCES 'HydraulicLocationCalculationCollectionEntity' ('HydraulicLocationCalculationCollectionEntityId') ON DELETE No Action ON UPDATE Cascade,
+	CONSTRAINT 'FK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity6' FOREIGN KEY ('HydraulicLocationCalculationCollectionEntity6Id') REFERENCES 'HydraulicLocationCalculationCollectionEntity' ('HydraulicLocationCalculationCollectionEntityId') ON DELETE No Action ON UPDATE Cascade,
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity1Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity1Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity2Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity2Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity3Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity3Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity4Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity4Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity5Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity5Id'),
+	CONSTRAINT 'U_HydraulicLocationCalculationCollectionEntity6Id' UNIQUE ('HydraulicLocationCalculationCollectionEntity6Id')
 )
 ;
 
@@ -2135,6 +2153,47 @@
  ON 'GrassCoverErosionOutwardsFailureMechanismMetaEntity' ('FailureMechanismEntityId' ASC)
 ;
 
+CREATE INDEX 'IXFK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity1'
+ ON 'GrassCoverErosionOutwardsFailureMechanismMetaEntity' ('HydraulicLocationCalculationCollectionEntity1Id' ASC)
+;
+
+CREATE INDEX 'IXFK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity2'
+ ON 'GrassCoverErosionOutwardsFailureMechanismMetaEntity' ('HydraulicLocationCalculationCollectionEntity2Id' ASC)
+;
+
+CREATE INDEX 'IXFK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity3'
+ ON 'GrassCoverErosionOutwardsFailureMechanismMetaEntity' ('HydraulicLocationCalculationCollectionEntity3Id' ASC)
+;
+
+CREATE INDEX 'IXFK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity4'
+ ON 'GrassCoverErosionOutwardsFailureMechanismMetaEntity' ('HydraulicLocationCalculationCollectionEntity4Id' ASC)
+;
+
+CREATE INDEX 'IXFK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity5'
+ ON 'GrassCoverErosionOutwardsFailureMechanismMetaEntity' ('HydraulicLocationCalculationCollectionEntity5Id' ASC)
+;
+
+CREATE INDEX 'IXFK_GrassCoverErosionOutwardsFailureMechanismMetaEntity_HydraulicLocationCalculationCollectionEntity6'
+ ON 'GrassCoverErosionOutwardsFailureMechanismMetaEntity' ('HydraulicLocationCalculationCollectionEntity6Id' ASC)
+;
+CREATE TRIGGER [TR_AfterDeleteGrassCoverErosionOutwardsFailureMechanismMetaEntity_RemoveHydraulicLocationCalculationCollectionEntities]
+	AFTER DELETE
+	ON GrassCoverErosionOutwardsFailureMechanismMetaEntity
+	FOR EACH ROW
+BEGIN
+	DELETE 
+	FROM HydraulicLocationCalculationCollectionEntity
+	WHERE HydraulicLocationCalculationCollectionEntityId IS OLD.HydraulicLocationCalculationCollectionEntity1Id
+	OR HydraulicLocationCalculationCollectionEntityId IS OLD.HydraulicLocationCalculationCollectionEntity2Id
+	OR HydraulicLocationCalculationCollectionEntityId IS OLD.HydraulicLocationCalculationCollectionEntity3Id
+	OR HydraulicLocationCalculationCollectionEntityId IS OLD.HydraulicLocationCalculationCollectionEntity4Id
+	OR HydraulicLocationCalculationCollectionEntityId IS OLD.HydraulicLocationCalculationCollectionEntity5Id
+	OR HydraulicLocationCalculationCollectionEntityId IS OLD.HydraulicLocationCalculationCollectionEntity6Id
+	OR HydraulicLocationCalculationCollectionEntityId IS OLD.HydraulicLocationCalculationCollectionEntity7Id
+	OR HydraulicLocationCalculationCollectionEntityId IS OLD.HydraulicLocationCalculationCollectionEntity8Id;
+END; 
+;
+
 CREATE INDEX 'IXFK_HeightStructuresFailureMechanismMetaEntity_FailureMechanismEntity'
  ON 'HeightStructuresFailureMechanismMetaEntity' ('FailureMechanismEntityId' ASC)
 ;
