don't insert so many links idiot

REA

REA-DSL Sources

REA-DSL to Relational Model Mapping Rules

REA-Planning Layer (submitted to BUSITAL 2012).pdf

1: for all Super Agents do
2: create Agent Type Table with the name <Agent.Name>Type;
3: – add column TypeName of type VARCHAR and make it the primary key;
4: – add all Type Properties as columns with the specified type;
5: – insert the name of each related Sub Agent into the table;
6: create Agent Table with the name <Agent.Name>;
7: – add all Object Properties as columns with the specified type;
8: – make the primary key object property the primary key column;
9: – create foreign key to the Agent Type Table;
10: end for
11: for all Sub Agents do
12: if Sub Agent has Type Properties then
13: create Agent Type Table with the name <Agent.Name>Type;
14: – add column TypeName of type VARCHAR and make it the primary key;
15: – make column TypeName a foreign key to its Super Agent Type Table;
16: – add all Type Properties as columns with the specified type;
17: end if
18: if Sub Agent has Object Properties or generate all sub agent tables is true then
19: create Agent Table with the name <Agent.Name>;
20: – add all Object Properties as columns with the specified type;
21: – create same primary key as in Super Agent and make it a foreign key to it;
22: end if
23: end for