dbase(cd,[tab,attr,assoc,sub,cons]).
table(tab,[id,name,abs:bool]).
table(attr,[id,name,ptype,attrof:tab]). #ptype = primitive type int, float, bool, dbl, str, qstr
table(assoc,[id,name,class1:tab,role1,atype1,min1:int,max1:int,class2:tab,role2,atype2,min2:int,max2:int]). #atype1, atype2 = DIAMOND(0,1), BLACK_DIAMOND(1,1), ONEPLUS (1,-1), BLANK(0,32000), CUSTOM(0,0) #class1, role1 = primary table, primary role #class2, role2 = secondary table, secondary role #name = association table name (needed only for NM associations)
table(sub,[id,suptab:tab,subtab:tab]). #suptab, subtab = supertable, subtable
table(cons,[id,name,"constraint"]).
| dbase(cd,[tab,attr,assoc,sub,cons]).
table(tab,[id,name,abs:bool]).
table(attr,[id,name,ptype,attrof:tab]). #ptype = primitive type int, float, bool, dbl, str, qstr
table(assoc,[id,name,class1:tab,role1,atype1,min1:int,max1:int,class2:tab,role2,atype2,min2:int,max2:int]). #atype1, atype2 = DIAMOND(0,1), BLACK_DIAMOND(1,1), ONEPLUS (1,-1), BLANK(0,32000), CUSTOM(0,0) #class1, role1 = primary table, primary role #class2, role2 = secondary table, secondary role #name = association table name (needed only for NM associations)
table(sub,[id,suptab:tab,subtab:tab]). #suptab, subtab = supertable, subtable
table(cons,[id,name,"constraint"]).
|