ER 2 RE Metamodel

//ER2RE is a metamodel describing a model transformation from an entity-relationship schema to a relational model.
//Not including methods of classes and constraints related with method invocation.
abstract BaseNamed
name : string
//Names have a non-zero length, and consist of letters, digits and the underscore.
abstract BaseValue
content : string
dataType -> BaseDataType
[ parent in this.value ]
attrMap -> BaseAttrMap *
[ parent in this.value ]
[ all self2 : BaseValue | self2 != this => this.content.ref != self2.content.ref || this.dataType.ref != self2.dataType.ref ]
abstract BaseAttrMap
attribute -> BaseAttribute
[ parent in this.attrMap ]
value -> BaseValue
[ parent in this.attrMap ]
instance -> ErSemInstance ?
[ parent in this.attrMap ]
erState -> ErSemErState *
[ parent in this.attrMap ]
link -> ErSemLink ?
[ parent in this.attrMap ]
relDBState -> RelSemRelDBState *
[ parent in this.attrMap ]
tuple -> RelSemTuple ?
[ parent in this.attrMap ]
[ this.attribute.dataType = this.value.dataType ]
[ all self2 : BaseAttrMap | self2 != this && this.instance && self2.instance => this.attribute.ref = self2.attribute.ref && this.instance.ref = self2.instance.ref => this.erState.ref != self2.erState.ref && this.value.ref != self2.value.ref ]
[ all self2 : BaseAttrMap | self2 != this && this.link && self2.link => this.attribute.ref = self2.attribute.ref && this.link.ref = self2.link.ref => this.erState.ref != self2.erState.ref && this.value.ref != self2.value.ref ]
[ all self2 : BaseAttrMap | self2 != this && this.tuple && self2.tuple => this.attribute.ref = self2.attribute.ref && this.tuple.ref = self2.tuple.ref => this.relDBState.ref != self2.relDBState.ref && this.value.ref != self2.value.ref ]
[ # instance + # link + # tuple = 1 ]
abstract BaseDataType : BaseNamed
attribute -> BaseAttribute *
[ parent in this.dataType ]
value -> BaseValue *
[ parent in this.dataType ]
[ all self2 : BaseDataType | self2.name.ref = this.name.ref => self2 = this ]
abstract BaseAttribute : BaseNamed
isKey ?
dataType -> BaseDataType
[ parent in this.attribute ]
attrMap -> BaseAttrMap *
[ parent in this.attribute ]
entity -> ErSynEntity ?
[ parent in this.attribute ]
relship -> ErSynRelship ?
[ parent in this.attribute ]
relSchema -> RelSynRelSchema ?
[ parent in this.attribute ]
[ # entity + # relship + # relSchema = 1 ]
abstract ErSynRelend : BaseNamed
relship -> ErSynRelship
[ parent in this.relend ]
entity -> ErSynEntity
[ parent in this.relend ]
relendMap -> ErSemRelendMap *
[ parent in this.relend ]
[ this.entity.erSchema = this.relship.erSchema ]//In this constraint, "ref" is not needed, since entity and relship have different types.
abstract ErSynErSchema : BaseNamed
entity -> ErSynEntity +
[ parent in this.erSchema ]
relship -> ErSynRelship *
[ parent in this.erSchema ]
erState -> ErSemErState *
[ parent in this.erSchema ]
trans -> Er2RelTrans ?
[ parent in this.erSchema ]
[ all self2 : ErSynErSchema | self2.name.ref = this.name.ref => self2 = this ]
[ all disj e1; e2 : entity | e1.name.ref != e2.name.ref ]
[ all disj r1; r2 : relship | r1.name.ref != r2.name.ref ]
[ all e : entity | all r : relship | e.name.ref != r.name.ref ]//In this constraint, "ref" is needed. But it's easy to be forgotten, since e and r have different types.
abstract ErSynRelship : BaseNamed
erSchema -> ErSynErSchema
[ parent in this.relship ]
relend -> ErSynRelend 2..*
[ parent in this.relship ]
attribute -> BaseAttribute *
[ parent in this.relship ]
link -> ErSemLink *
[ parent in this.relship ]
[ all disj r1; r2 : relend | r1.name.ref != r2.name.ref ]
[ all disj a1; a2 : attribute | a1.name.ref != a2.name.ref ]
[ all r : relend | all a : attribute | r.name.ref != a.name.ref ]
[ no a : attribute | a.isKey ]
abstract ErSynEntity : BaseNamed
erSchema -> ErSynErSchema
[ parent in this.entity ]
attribute -> BaseAttribute *
[ parent in this.entity ]
relend -> ErSynRelend *
[ parent in this.entity ]
instance -> ErSemInstance *
[ parent in this.entity ]
[ all disj a1; a2 : attribute | a1.name.ref != a2.name.ref ]
abstract ErSemRelendMap
relend -> ErSynRelend
[ parent in this.relendMap ]
link -> ErSemLink
[ parent in this.relendMap ]
erState -> ErSemErState +
[ parent in this.relendMap ]
instance -> ErSemInstance
[ parent in this.relendMap ]
[ all self2 : ErSemRelendMap | this != self2 => this.relend.ref = self2.relend.ref && this.link.ref = self2.link.ref => this.erState.ref != self2.erState.ref && this.instance.ref != self2.instance.ref ]
abstract ErSemInstance
attrMap -> BaseAttrMap *
[ parent in this.instance ]
relendMap -> ErSemRelendMap *
[ parent in this.instance ]
entity -> ErSynEntity
[ parent in this.instance ]
erState -> ErSemErState +
[ parent in this.instance ]
abstract ErSemLink
erState -> ErSemErState +
[ parent in this.link ]
attrMap -> BaseAttrMap *
[ parent in this.link ]
relendMap -> ErSemRelendMap 2..*
[ parent in this.link ]
relship -> ErSynRelship
[ parent in this.link ]
abstract ErSemErState
attrMap -> BaseAttrMap *
[ parent in this.erState ]
link -> ErSemLink *
[ parent in this.erState ]
relendMap -> ErSemRelendMap *
[ parent in this.erState ]
instance -> ErSemInstance *
[ parent in this.erState ]
erSchema -> ErSynErSchema
[ parent in this.erState ]
trans -> Er2RelTrans ?
[ parent in this.erState ]
relDBState -> RelSemRelDBState ?
[ parent in this.erState ]
abstract RelSynRelDBSchema : BaseNamed
relSchema -> RelSynRelSchema +
[ parent in this.relDBSchema ]
relDBState -> RelSemRelDBState *
[ parent in this.relDBSchema ]
trans -> Er2RelTrans ?
[ parent in this.relDBSchema ]
[ all self2 : RelSynRelDBSchema | self2.name.ref = this.name.ref => self2 = this ]
[ all disj r1; r2 : relSchema | r1.name.ref != r2.name.ref ]
abstract RelSynRelSchema : BaseNamed
attribute -> BaseAttribute +
[ parent in this.relSchema ]
relDBSchema -> RelSynRelDBSchema
[ parent in this.relSchema ]
tuple -> RelSemTuple *
[ parent in this.relSchema ]
[ all disj a1; a2 : attribute | a1.name.ref != a2.name.ref ]
abstract RelSemRelDBState
tuple -> RelSemTuple *
[ parent in this.relDBState ]
attrMap -> BaseAttrMap *
[ parent in this.relDBState ]
relDBSchema -> RelSynRelDBSchema
[ parent in this.relDBState ]
trans -> Er2RelTrans ?
[ parent in this.relDBState ]
erState -> ErSemErState ?
[ parent in this.relDBState ]
abstract RelSemTuple
relDBState -> RelSemRelDBState +
[ parent in this.tuple ]
attrMap -> BaseAttrMap +
[ parent in this.tuple ]
relSchema -> RelSynRelSchema
[ parent in this.tuple ]
abstract Er2RelTrans
erSchema -> ErSynErSchema
[ parent in this.trans ]
relDBSchema -> RelSynRelDBSchema
[ parent in this.trans ]
erState -> ErSemErState *
[ parent in this.trans ]
relDBState -> RelSemRelDBState *
[ parent in this.trans ]
[ all e : erSchema.entity | one rl : relDBSchema.relSchema | e.name.ref = rl.name.ref && all ea : e.attribute | one ra : rl.attribute | ea.name.ref = ra.name.ref && ea.dataType.ref = ra.dataType.ref && ea.isKey <=> ra.isKey ]
[ all erSt : erState | one relSt : relDBState | all i : erSt.instance | one t : relSt.tuple | all amEr : i.attrMap | one amRel : t.attrMap | amEr.attribute.name = amRel.attribute.name && amEr.value = amRel.value ]
[ all erSt : erState | one relSt : relDBState | erSt.relDBState = relSt ]
[ all relSt : relDBState | one erSt : erState | relSt.erState = erSt ]
c0_BaseNamed abstract BaseNamed c0_BaseValue abstract BaseValue c0_BaseDataType abstract BaseDataType : BaseNamed c0_BaseValue->c0_BaseDataType dataType c0_BaseAttrMap abstract BaseAttrMap c0_BaseValue->c0_BaseAttrMap attrMap c0_BaseDataType->c0_BaseNamed c0_BaseDataType->c0_BaseValue value c0_BaseAttribute abstract BaseAttribute : BaseNamed c0_BaseDataType->c0_BaseAttribute attribute c0_BaseAttrMap->c0_BaseValue value c0_BaseAttrMap->c0_BaseAttribute attribute c0_ErSemInstance abstract ErSemInstance c0_BaseAttrMap->c0_ErSemInstance instance c0_ErSemErState abstract ErSemErState c0_BaseAttrMap->c0_ErSemErState erState c0_ErSemLink abstract ErSemLink c0_BaseAttrMap->c0_ErSemLink link c0_RelSemRelDBState abstract RelSemRelDBState c0_BaseAttrMap->c0_RelSemRelDBState relDBState c0_RelSemTuple abstract RelSemTuple c0_BaseAttrMap->c0_RelSemTuple tuple c0_BaseAttribute->c0_BaseNamed c0_BaseAttribute->c0_BaseDataType dataType c0_BaseAttribute->c0_BaseAttrMap attrMap c0_ErSynEntity abstract ErSynEntity : BaseNamed c0_BaseAttribute->c0_ErSynEntity entity c0_ErSynRelship abstract ErSynRelship : BaseNamed c0_BaseAttribute->c0_ErSynRelship relship c0_RelSynRelSchema abstract RelSynRelSchema : BaseNamed c0_BaseAttribute->c0_RelSynRelSchema relSchema c0_ErSemInstance->c0_BaseAttrMap attrMap c0_ErSemInstance->c0_ErSemErState erState c0_ErSemInstance->c0_ErSynEntity entity c0_ErSemRelendMap abstract ErSemRelendMap c0_ErSemInstance->c0_ErSemRelendMap relendMap c0_ErSemErState->c0_BaseAttrMap attrMap c0_ErSemErState->c0_ErSemInstance instance c0_ErSemErState->c0_ErSemLink link c0_ErSemErState->c0_RelSemRelDBState relDBState c0_ErSemErState->c0_ErSemRelendMap relendMap c0_ErSynErSchema abstract ErSynErSchema : BaseNamed c0_ErSemErState->c0_ErSynErSchema erSchema c0_Er2RelTrans abstract Er2RelTrans c0_ErSemErState->c0_Er2RelTrans trans c0_ErSemLink->c0_BaseAttrMap attrMap c0_ErSemLink->c0_ErSemErState erState c0_ErSemLink->c0_ErSynRelship relship c0_ErSemLink->c0_ErSemRelendMap relendMap c0_RelSemRelDBState->c0_BaseAttrMap attrMap c0_RelSemRelDBState->c0_ErSemErState erState c0_RelSemRelDBState->c0_RelSemTuple tuple c0_RelSemRelDBState->c0_Er2RelTrans trans c0_RelSynRelDBSchema abstract RelSynRelDBSchema : BaseNamed c0_RelSemRelDBState->c0_RelSynRelDBSchema relDBSchema c0_RelSemTuple->c0_BaseAttrMap attrMap c0_RelSemTuple->c0_RelSemRelDBState relDBState c0_RelSemTuple->c0_RelSynRelSchema relSchema c0_ErSynEntity->c0_BaseNamed c0_ErSynEntity->c0_BaseAttribute attribute c0_ErSynEntity->c0_ErSemInstance instance c0_ErSynRelend abstract ErSynRelend : BaseNamed c0_ErSynEntity->c0_ErSynRelend relend c0_ErSynEntity->c0_ErSynErSchema erSchema c0_ErSynRelship->c0_BaseNamed c0_ErSynRelship->c0_BaseAttribute attribute c0_ErSynRelship->c0_ErSemLink link c0_ErSynRelship->c0_ErSynRelend relend c0_ErSynRelship->c0_ErSynErSchema erSchema c0_RelSynRelSchema->c0_BaseNamed c0_RelSynRelSchema->c0_BaseAttribute attribute c0_RelSynRelSchema->c0_RelSemTuple tuple c0_RelSynRelSchema->c0_RelSynRelDBSchema relDBSchema c0_ErSynRelend->c0_BaseNamed c0_ErSynRelend->c0_ErSynEntity entity c0_ErSynRelend->c0_ErSynRelship relship c0_ErSynRelend->c0_ErSemRelendMap relendMap c0_ErSemRelendMap->c0_ErSemInstance instance c0_ErSemRelendMap->c0_ErSemErState erState c0_ErSemRelendMap->c0_ErSemLink link c0_ErSemRelendMap->c0_ErSynRelend relend c0_ErSynErSchema->c0_BaseNamed c0_ErSynErSchema->c0_ErSemErState erState c0_ErSynErSchema->c0_ErSynEntity entity c0_ErSynErSchema->c0_ErSynRelship relship c0_ErSynErSchema->c0_Er2RelTrans trans c0_Er2RelTrans->c0_ErSemErState erState c0_Er2RelTrans->c0_RelSemRelDBState relDBState c0_Er2RelTrans->c0_ErSynErSchema erSchema c0_Er2RelTrans->c0_RelSynRelDBSchema relDBSchema c0_RelSynRelDBSchema->c0_BaseNamed c0_RelSynRelDBSchema->c0_RelSemRelDBState relDBState c0_RelSynRelDBSchema->c0_RelSynRelSchema relSchema c0_RelSynRelDBSchema->c0_Er2RelTrans trans
Module Statistics: | All clafers: 89 | Abstract: 18 | Concrete: 71 | Reference: 70 | Constraints: 115 | Goals: 0 | Global scope: 1..* | Can skip name resolver: no |

Module Downloads: | [.cfr] | [.html] |