Identify examples of Referential constraints * For clearer image, here is link t
ID: 3886559 • Letter: I
Question
Identify examples of Referential constraints
* For clearer image, here is link to photo... http://blogs.sas.com/content/sgf/files/2013/06/metatables.jpg
LONG case number LONGTEXT Investigation Child AdultOpeningProperties Opening PK investigation id LONG PK child id LONG PKadultopeningproperties id LONG PK opening id LONG -OFK1 opening id LONG LONG LONGTEXT LONGTEXT DATETIME birthdate DATETIME sex ethnicity CHAR(10) FK1 case id FK1 opening id LONG adult id list CHAR(10) FK2 adult id adult id list LONGTEXT FH- child id list LONGTEXT open date DATETIME close date DATETIME egbily CHAR(3) 0child id list marital staus CHAR(10) CHAR(10) CHAR(10) date of investigation verification decision chkbox 1 INTEGER verification decision chkbox 2 INTEGER verification decision_chkbox 3 INTEGER verification_decision chkbox 4 INTEGER PCG status Adult allegation verified CHAR(10) LONG PK adlt id ONG FK1 child id LONG LONG spell_start date DATETIME spell_end date DATETIME spell start reason CHAR(10) spell _end reason CHAR(10) DATETIME CHAR(10) birth_country CHAR(10) ethnicity CHAR(10) Ris PK riskassessment id LONG LONG LONGTEXT LONGTEXT FK1 opening id adult id (list) child id (ist) date of assessment DATETIME PK placement id INTEGER INTEGER INTEGER INTEGER FK1 spell id LONG Overriding condition 1 INTEGER Overriding_ condition 2 INTEGER placement start date DATETIME placement end date DATETIME CHAR(10) postal code TEXT(10)Explanation / Answer
Referential constraint specifies that the non-null values of a foreign key values are
allowed if and only if, they readily appear in the referring table primary key field.
And in the given figure the referential constraints are readily specified as FK* in the
first column of the tables.
So, the referential constraints of the ER diagram include:
The case_id of the Opening table should readily registered as a case (in the Case table).
In simple terms, if the case is not registered (not assigned a case_id), it cannot be opened.
The opening_id of the Investigation table should be opened before the investigation can start.
In simple terms, investigation can be done only on opened cases.
In the same way, the RiskAssessment can be done only on open cases.
An AdultOpeningProperties_id can be given to only open and adult cases.
If the adult is readily registered, and if his/her case is open, AdultOpeningProperties can be entered.
These are a few examples of Referential constraints.