Monday, July 29, 2013

Who's on first? Adding Who columns in the Modeler

The SQL Developer Datamodeler has some great built in transformation. Let's take a look at the Table Template one.

I'm going to start with the plain ol' HR schema and we're going to add in the standard who columns to it.

Step 1 is to create a table named "table_template" There's plenty of options since it's just a normal table in the model. The two interesting checkboxes which are Engineer and Generate in DDL. This will make it so this table is not generated when you ask for the DDL or Engineer into a Logical Model.

Step 2 is to add in the who columns we want to propagate to all tables in the model.

Step 3 is to do the transformation.

Step 4 is to press the Apply button.

The final result is that all the tables in the model now have every column from the table_template.

The transformation itself is fairly straight forward and it's all Javascript: