
** Folder ERScript_r3/exampleDataModels **

This folder contains ER models used to test the implmentation of  logical to 
physical ER model transformation and back-end code generation. Some of these 
examples are used as examples on John Cartmell's  www.entitymodelling.org 
website.

The ER models in the src subfolder are logical models and need  to be 
transformed to physical models using the logical2physical transform 
before they can be used to either describe data or as the basis of code 
generation. The logical2physical.xslt transformation implements John 
Cartmell's algorithm  that refines the Chen algorithm by taking account of 
commutative diagrams to generate physical models in third normal form. It 
can be used to generate hierarchical models suitable for representation in 
XML or tabular models suitable for a relational database.

 
In a Microsoft Windows environment the script build_examples can be used 
to generate both hierarchical and relational models and associated svg 
diagrams for all models in the src folder. This script uses all the 
following scripts which can also be used individually:

  ERScript_r3\ERmodel_v1.4\scripts\genSvg can be used to generate or 
  regenerate a diagram xxxx.svg in the docs subfolder from the ERmodel 
  source xxxx.xml.

  ERScript_r3\ERmodel_v1.4\scripts\genAllSvg may be used to generate all 
  such diagrams in a single command.

  ERScript_r3\ERmodel_v1.4\scripts\genHierarchical can be used to generate or 
  regenerate a hierarchical physical data model  xxxx.hierarchical.xml in 
  the temp subfolder from a logial ERmodel source xxxx.xml. 

  ERScript_r3\ERmodel_v1.4\scripts\genRelational can be used to generate or 
  regenerate a relational physical data model  xxxx.relational.xml in the 
  temp subfolder from a logial ERmodel source xxxx.xml.

  These last two scripts also produce diagrams of the resulting data models 
  in the docs subfolder.

  The script ERScript_r3\ERmodel_v1.4\scripts\genAllPhysical can be used to 
  generate both physical and relational data models and associated svg 
  diagrams for all models in the src folder. 

 

