I agree the transformation process is challenging to figure out...and it varies across versions of EA. I have been down that very same path. Once you find your way through the EA interface and the related documentation it gets easier.
There are actually two transformations (I'm currently referencing EA version 15.1) that are very similar: "DDL" and "Tables".
Currently the only difference between these two transformations appears to be that the DDL template has code to deal with foreign keys.
To see the low level details of what occurs when you perform a transformation, you can reference the transformation code...this is located in a transformation template.
Go to the "Design" tab, "Tools", "Transform" and select "Transform Templates".
Now select the "DDL" option on the "Language" drop-down.
This will show you the actual transformation code.
You can also use this feature to modify/create customized transformations.
Here is a link to the current documentation:
https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/model_domains/transformationtemplates.htmlRegards,
Perry