
/*
 * This transformation is uni-directional in direction "rdbms" and maps classes in packages to tables in schemas.
 * It is based upon the example in the official QVT specification at http://www.omg.org/cgi-bin/apps/doc?ptc/05-11-01.pdf.
 */

transformation package2schema(uml:SimpleUML, rdbms:SimpleRDBMS) {

	-- map each package to a schema
	top relation PackageToSchema {
	  
	  pn : String;
	  
	  checkonly domain uml p : SimpleUML::UmlPackage {
	    umlName = pn
	  };
	  
	  enforce domain rdbms s : SimpleRDBMS::RdbmsSchema {
	    rdbmsName = pn
	  };
	  
	}
}
