When I desing the ER model I want to use mixed case naming but in my tables I want to have all the names uppercase. Is there a way to automatically change the names uppercase? YES!
These are my tables and as you can see the names of the tables and some of the columns are very mixed cased notation. What I need now is a Transformation Script:
In the Custom Trasformation Scripts I can find a script called Tables to upper case – Rhino.
I press Apply. And this is what I get:
Pingback: First Steps in SQLDeveloper Data Modeler | The Anti-Kyte
¿Is there some way to change the table/column names from uppercase to title case in Oracle SQL Developer Data Modeler or Oracle SQL Developer?
Thanks you!
Hi!
Yes, the easiest way is to create a transformation (Tools, Design Rules and Transformations, Transformations). It could be something like this (for a table name and using the same logic for a column name):
tables = model.getTableSet().toArray();
for (var t = 0; t<tables.length;t++){
table = tables[t];
name = table.getName().toLowerCase().split(' ');
for (var i = 0; i < name.length; i++) {
name[i] = name[i].charAt(0).toUpperCase() + name[i].slice(1);
}
table.setName(name);
table.setDirty(true);
}
Cheers,
Heli
Hi Heli,
Thank you very much, you have helped me a lot!!!
🙂
Cheers,
Rosy
Terve.
I’m developing a major application from scratch with around 100 tables. I have started using uppercase for table name and lowercase for column names. I’m now rethinking this and will probably do both tables and columns in uppercase. Pros and cons? What would you recommend.
Kiittos paljon.
Hi!
Whatever you decide, I would recommend the same for both tables and columns. It is more comfortable for the eye if all are the same. If you liked table names in upper case then maybe use the same for the column names.
And you can use the Transformations to convert them easily.
Best regards
Heli