StateModelRev05s.ppt - RJL rev. 050207  5
StateModel Design - 5
Schema Tables TT and TA
TAid(Pkey) TTid(parent)  Name Alt   type  is_key           Description  
TA000001 TT000001 SMid NA c8 1 /* pkey of this State Model */
TA000002 TT000001 Abbrev NA c4 0 /* ttabbrev of Modeled Object? */
TA000003 TT000001 Name NA t80 0 /* Full Name or Description of SM */
TA000004 TT000002 STid NA c8 1 /* pkey of this STat e */
TA000005 TT000002 SMid NA c8 1 /* fkey of parent State Model*/
TA000006 TT000002 ActName NA c8 0 /* Action Routine Name */
TA000007 TT000002 ActFunc NA c8 0 /* Action Routine Function pointer*/
TA000008 TT000002 Name NA t80 0 /* Full Name or Description of State*/
TA000009 TT000003 TRid NA c8 1 /* pkey of this State Transition*/
TA000010 TT000003 STid1 NA c8 1 /* Transition Source or 'From' State */
TA000011 TT000003 STid2 NA c8 1 /* Transition Destination or 'To' STate*/
TA000012 TT000004 ETid NA c8 1 /* pkey of Event Type */
TA000013 TT000004 SMid NA c8 1 /* State Model Receiving  this ET */
TA000014 TT000004 Label NA c32 0 /* State Transition label  */
TA000015 TT000004 Descrip NA t80 0 /* Event Type description*/
TA000016 TT000005 ENid NA c8 1 /* pkey of ENable relation (ET to TR)*/
TA000017 TT000005 ETid NA c8 1 /* fkey to Event Type */
TA000018 TT000005 TRid NA c8 1 /* fkey of enabled State Transition*/
. . . (attribs of tables FT, SF and SV) . . .
PKey        TTabb    TableName Description
TT000001 SM StateModel      /* Model for one Active Class */                        
TT000002 ST State /* Behavior of this state */           
TT000003 TR Transition /* Transition: STid1 to STid2  */     
TT000004 ET EventType /* Table of Event Types          */                       
TT000005 EN EventEnable /* associates etent with transition     */    
TT000007 FT FunctionTable /* Table of Acton Routine Functions */
TR000008 SF StateFunction /* asssociates State with its Action  */
TT000009 SV SchemaVersion  /* identifies schema and tracks changes*/
TableTypes TT /* holds description of each table type */
 
TableAttributes TA /* holds definition of each attribute */
(Schema as stored in tables TT and TA; for brevity, the attributes of tables FT, SF  and SV are not shown)
 
Note that metadata tables TT and TA have the same format   as  ordinary tables described by instances of TT and TA.
Therefore, metatables TT and TA can also be defined        and stored in two rows of TT and eleven rows of TA.
TT.TAid_fcp
for row 1 of
 table TT
TT.TAid_fcp
for row 5 of 
table TT