Question: For a data model to be valid, the data structure must reflect that model. You would run a series of scripts to confirm the entities



For a data model to be valid, the data structure must reflect that model. You would run a series of scripts to confirm the entities seen in the data have the same maximum cardinalities as specified in your diagram. 


 
  1. For each parent entityin your conceptual data model usethe following script to confirm the cardinality between entities.
 


 

SELECT parent_identifying_attribute,

 

COUNT(DISTINCT child_identifying_attribute) ChildCount

 

FROM import_table

 

GROUP BY parent_identifying_attribute

 

HAVING COUNT(DISTINCT child_identifying_attribute) > 1;

 


 

Rows returned means PARENT - 1:N - CHILDREN

 

No rows returned means PARENT - 1:1 - CHILD

 


 

NOTE: If the parent or child identifying attribute is FirstName & LastName, use EmployeeName or CustomerName accordingly. To confirm the PURCHASE entity only use PurchaseDate as your identifying attribute. For SKILL use only SkillName.

 


Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!