I am new to Oracle SQL dev Data Modeler tool and would like to know if there is a way to create a new table by re-using the existing columns or column groups. The idea is to maintain consistency and save table design time. If columns created previously can be re-used and require drag and drop of column in the right pane, then only new columns need to be manually created.
Any thoughts on this will be appreciated.
You could simply copy an exisitng table then edit it.
If you have a standard set of columns you want to add to every table you can use "transformation" scripts and a template table to do that. Check out this video to see how: http://download.oracle.com/otn_hosted_doc/sqldev/UserDefinedDesignRules/UserDefinedDesignRules.html
It is pretty slick.
Yes. You can create a new Table and then add Columns by copying them from existing Tables.
To do this, expand the node for the existing Table in the Browser panel, select one or more of its Columns, and then right click over these selected Columns and pick Copy from the drop-down menu.
You can then right-click over the new Table (either in the Browser or on the diagram), and pick Paste from the drop-down menu.
I checked out the video and tried it in Oracle designer, it works and works great!
My other question is that I may have several set of columns that I may want to group depending on the table requirements. Can I have multiple templates and choose which one to apply to?
Also, how do I choose the table where the table template needs to be applied. As I may be interested in applying the table template to selected tables only.
Edited by: user648132 on Feb 20, 2012 10:47 AM
Yes - just change the name of the template table in the script ( t_name = "table_template") and then save that new transformation for future use.
I am not sure how you get it to apply to only certain tables. Seems like something you could do at a sub-view level?
Maybe someone else on the forum can advise on how to change the script to work on a subview only instead of the entire model.