The Data Warrior

Changing the world, one data model at a time. How can I help you?

Archive for the tag “oracle development tools”

Quick Tip: Adding a Custom Design Rule to Oracle Data Modeler

As most of my readers know, I use Oracle’s SQL Developer Data Modeler to do all my data modeling.

It has a lot of great features that are documented online in various places. One of those is Design Rules.

Design Rules (Tools -> Design Rules -> Design Rules) include a host of predefined quality checks on many of the objects created in a data model. This includes entities, attributes, relationships, tables, columns, constraints, indexes, etc.

You select the rules, or group of rules, and hit “apply”. The rules then check your model and tell you, object by object, if there are any issues.

Some issues are warnings. Others show up as errors. A error generally means that if you try to create DDL, that DDL will fail when you try to execute it an Oracle database.

One nice feature is that you can double click on a highlighted issue and go directly to the object with the issue so you can fix it.

An example of a design rule check is the length of the table name. Oracle still has a limit of 30 characters (Why????)  on object names, so there are design rules to check for that.

Pretty useful really.

For the Data Vault model I am currently building, we are trying to generate lots of stuff based on the table name (i.e., surrogate key sequence and some PL/SQL load procedures, but that is a much longer story). As a result we discovered we need to limit the table names to 26 characters because we need to use the table name as a root that has prefixes and suffixes added in certain cases.

Too bad the built in design rule is set to 30.

And there is no way to modify that built in rule (verified on the OTN Forum).

So the solution is to create a Custom Rule (Tools -> Design Rules -> Design Rules). The intrepid Philip from the Oracle development team kindly provided me with the base code to create the rule I needed. I was able to take his code, and use the one custom rule that comes delivered as a template, to make a new rule that did the check I wanted.

Here is the code:

var ruleMessage;
var errType;
var table;
function checkName(table){
result = true;
ruleMessage=”Table name over 26 characters”;
return false;
return true;
//invoke it

I won’t explain the code (you can figure that out if you like), but it does work as I wanted, so I am a happy camper. 🙂

Now after I add new objects to the model (e.g., hubs, links, satellites), I just run this rule to find any that are too long. Then I fix the table name and reapply my constraint naming standards (another very useful and simple utility in the tool). After that I can generate the DDL and build the objects in the db, then re-run our code generator.

If you have not looked at the features of SDDM, time to look.

Happy Modeling!

– Kent

P.S. To see more article about SDDM, check out Jeff Smith’s blog (in my blog roll).

P.P.S. Don’t forget to follow me on twitter @KentGraziano. I retweet a lot of Jeff’s article there. 😉

What’s in your war chest?

When you gear up to do battle with your next data warehouse or data modeling problem, what are your weapons of choice?


Oracle Designer?

SQL Developer?

Or do you go “old school” with the traditional pen and paper (or marker and white board)?

Whatever your approach, everyone has a favorite. Tell me what yours are in the comments.

Take care out there.


P.S. Want to know what my weapons of choice are? Check out my War Chest page and the Blogroll and Useful Sites in the right column on this page.

Oracle User Groups: Are you a member?

I love user groups.

Getting introduced and involved in them has made a huge difference in my career. If it was not for all the people I have met in the last 22+ years, my career, and life, would have been very different.

I have met hundreds (maybe thousands) of amazing people both from within Oracle Corp and outside. Many of them became, and remain, my friends. Which is why we all love to get together several times a year at various user group and industry events to catch up, exchange wars stories, and learn new things.

Right now, I am starting to prepare for one of my favorites – ODTUG KScope. I will be there presenting in June and  running my popular Morning Chi Gung class for the 2nd year in a row.

If you have not registered, get to it! Rooms are going fast and you want to be sure to stay at the conference resort (yes – resort, not hotel!).

And on the ODTUG front, they have just announced you can now join for just $99 a year. That is the best value you can find for the world’s best Oracle user group for Developers.

So are you in? Are you at member of at least one user group?

What? You don’t know which one to join?

Then check out this new cool site Oracle just put up with videos from some of the user group leaders. After that, check out their new User Group Central with information about Oracle user groups around the globe.

So get out there and meet some new people and learn some new things.

Come to KScope12.

Join a user group.

See you in San Antonio.


P.S. Don’t forget to submit an abstract for Oracle OpenWorld before the deadline passes. It will get you a free pass to the show (worth over $2000). Tell’em ODTUG and the Oracle Data Warrior sent you.

Ready or Not – It’s Time to Submit an Abstract for Oracle Open World 2012

Yup, it sneaks up on you pretty fast.

Seems like only a few weeks ago I was in San Francisco at OOW 2011, and now it is already time to think about what to present in September.

This year, Oracle OpenWorld will take place September 30-October 5 at the Moscone Center, San Francisco.

If you are ready to go, the call for papers is here.

Important Date:

The Call for Papers will close at 11:59 p.m. PDT on Monday, April 9.

Not a lot of time to submit.

Again this year I am the OOW Content Coordinator for the Oracle Development Tools User Group (ODTUG), so I will be one of the people reviewing your submission.

If you are an ODTUG member and want to represent ODTUG at OOW 2012, this is your chance! On the abstract submission form, there are two user group related questions you need to answer.

First, be sure to indicate that you are a member of a user group.

Second indicate that you belong to or are submitting on behalf of Oracle Development Tools User Group. 

If you do not indicate ODTUG, we (well, me and a few others) will not be able to see your abstract or review it.

I hope you will take advantage of this opportunity to share your knowledge, experiences, and solutions with other developers. I look forward to reviewing the abstracts submitted by the ODTUG experts.

Key Point: If your abstract is accepted, you will receive a complimentary registration to Oracle OpenWorld (worth over $2,000 ).

Even if you do not want to present, you can learn more about OpenWorld here.

So start writing that abstract and submit before April 9th.

See you in San Francisco!


Post Navigation

%d bloggers like this: