The Data Warrior

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

Archive for the tag “best practice”

Top 3 Tips for Staying Current in the Evolving World of Data Warehousing

The world of data warehousing and analytics has changed! With the advent of Big Data, Streaming Data, IoT, and The Cloud, what is a modern data warehousing professional to do? It may seem to be a very different world with different concepts, terms, and techniques. Or is it?

This is a question I ask myself all the time. So how do you keep up?

Here is what I do:

1 – Follow the Leaders

Yes, social media! Mostly, I use Twitter. I follow the industry thought leaders and analysts like Claudia Imhoff, Tamara Dull, Howard Dresner, Philip Russom, Cindi Howson, and many others. Not only do I see what they are thinking (and speaking) about, but I get to see what they are reading.

2 – Meet the Leaders

While reading books and online articles is great, there is nothing that replaces face to face communication. And the best way to do that is attend educational events where they are speaking. These days that could mean everything from local meet-ups, to regional conferences (like RMOUG), vendor roadshows, and larger annual events (like the recent Oracle OpenWorld).

For meet-ups, simply go to https://www.meetup.com/ and sign up (for free). You can search for meet-ups in your local area by topic. You may be surprised how many there are nearby and how often they have event. This is a great way to network with other professional in your local community.

To learn from the industry leaders, look to larger national and international events. In the data warehousing and analytics world that means groups like The Data Warehouse Institute (TDWI). They have local chapters and run larger national events on a regular basis (the next one is in October in San Diego). Another group I am associated with is DAMA International which also sponsors local chapters, national and international events.

And of course your vendors and solution providers may run their own events, like the Snowflake Cloud Analytics city tour.

3- Be a Leader

Volunteer! Yes by getting involved with these meet-ups, associations, and user groups, whether locally or nationally, you not only get to give back to the community, but you will often benefit by getting to know and speak with leaders one on one in a less formal environment.

Start off small by helping organize a meeting, or getting the refreshments. Help with the web site or the mail list. If the group you choose runs a conference, help with the paper selection process (you will learn a ton reading the abstracts). And then, when you are ready, become a speaker yourself. There is no better way to learn than to try to teach what you know to someone else.

I have been helping with user group conferences and events for nearly 30 years now and have never regretted a minute of the time spent.

 

So those are my top 3 tips for how you can stay fresh and informed and ahead of the game in this crazy world of data warehousing, big data, and the cloud.

Seems to be working for me.

Keep Learning!

Kent

The Data Warrior

P.S. One of our Snowflake customers, IAC Publishing Labs (owners of Ask.com), won the TDWI Best Practice award for the Emerging Technologies and Methods category and Keith Lavery will be speaking about the project at the TDWI Executive Summit in San Diego on Monday, October 3rd.

P.P.S.  And don’t forget to follow some of the leaders at Snowflake like @bob_muglia and @jonb_snowflake.

 

Maintaining disabled FK’s, wisdom or farce?

A while back, I wrote a post about having FKs (foreign keys) in your data warehouse.

Well, a similar question came up recently on an Oracle forum with the above title. It is a fair question and it does surface fairly regularly in a variety of contexts (not just data warehousing).

Of course, as The Data Warrior, I felt is was my duty to respond.

The Question

Is there any reason to maintain a permanently disabled FK in the data model?  I’m not envisioning a reason to do it.  If it is not going to be enabled, then from my perspective, it would not make any sense to have it defined.  If anything, provide the definition of the relationship in the comment of the child column.

My Answer

Yes, by all means keep the FK please!

I see three good reasons for doing so:

  1. It is valuable metadata (& documentation). If somebody reverse engineers the database (say with ERWin or Oracle Data Modeler), the FK shows up in the diagram (way better than having to read a column comment to find out)
    Data Vault 2.0 Example

    A picture is worth a thousand words!

    .

  2. BI Metadata – If you want to use any sort of reporting or BI tool against the database, most tools will import the FK definition with the tables and build the proper join conditions. Way better than having someone guess what the join will be and then manually adding it to the metadata layer in the reporting tool. Examples that can read the Oracle data dictionary include OBIEE, Business Objects, COGNOS, Looker, and many others.(Note here that since the FK is not enforced on the remote databases, you might want to make sure these are treated as outer joins, lest you lose some transaction in the reports).
  3. The Oracle optimizer will use disabled constraints to improve query performance of joins. Again, this is metadata in the data dictionary which the optimizer can read. This is documented in the Oracle Data Warehouse guide and I have validated it on multiple occasions with Oracle product management.

While #3 applies specifically to Oracle, for other databases like MS SQL Server and Snowflake, #1 and #2 still apply.

Even if only one of the above is true for a given database, that, in my opinion, still justifies keeping the disabled constraint around.

Final Answer = Wisdom

What do you think? Feel free to comment below.

And please share on your favorite social media platform!

Model on!

Kent

The Data Warrior

 

Live from #OTW14: Worst Data Warehouse Design Practices

Back in September at the now annual OakTable world (OTW) at Oracle OpenWorld, I was privileged to give a talk where I ranted a bit about some of the worst data warehouse design mistakes that I have seen.

Well, if you missed out, now you can see that talk thanks to Kyle Hailey who had all the OTW talks videoed. This week, he tweeted that the video was ready for viewing.

So if you missed the talk, or just want to see it again, check it out!

Kent

The Oracle Data Warrior

P.S. If you would like to have me do this very fun presentation at your company or meeting, I would be happy to discuss arrangements with you. You know how to find me so drop me a comment, email, tweet, FB, DM, or even call 🙂

Reverse engineer and discover foreign keys with SQL Developer Data Modeler

This is a nice piece of functionality that Oracle added to SQL Developer Data Modeler some time ago. Heli gives a nice step by step guide on how to use it.

HeliFromFinland

You can easily document your database with Data Modeler: just reverse engineer the database with File-> Import -> Data Dictionary. But what if the database has no foreign keys? What’s the point of documenting then? Just tables that has nothing to do with each other….

Well, Data Modeler can help with that too: you can use “Discover Foreign Keys” functionality to find the foreign keys that should be in the database and even generate the DDLs for them if needed…

There are two ways Data Modeler can guess the foreign keys for you: the column has the same name as a primary key column in parent table or using the naming templates. And combinations of those.

Select the relational model from the Browser. Right-click and select “Discover Foreign Keys”. I have two tables: CUSTOMER and ORDER.

Tables

I will ask Data Modeler to find me the foreign keys.

If I select…

View original post 390 more words

Better Data Modeling: Finding Missing Unique Keys in Oracle #SQLDevModeler

One of the best practices I recommend is to always define unique business keys for every entity (or table) in a model.

It is the only way to really understand what the data in that object represents.

So what do you do when you inherit someone else’s model with hundreds of tables and few (if any) unique keys to be found?

After you reverse engineer it into SDDM (SQL Developer Data Modeler), you could go through the model table by table and look at the properties.

Or, you could look at all the diagrams to look for the the little U’s indicating a column is part of a unique key constraint (assuming there are any diagrams to look at).

Or you could create a Custom Design Rule that checks for you.

So how do you write a design rule that will list all tables with no UKs on them?

Open your design, the go to Tools -> Design Rules -> Custom Rules.

  1. Hit the green Plus sign to add a new rule.
  2. Give it a name (like Missing UKs),
  3. Select Table for the object type,
  4. Mozilla Rhino for the Engine,
  5. Warning for the type, and
  6. Select table as the variable
  7. Past in this code: 
function checkUKs(table){
ruleMessage=””;
if(table.getUKeys().size() == 0){
  ruleMessage=”no UKs”;
  errType=”Problem:”;
  return false;
} else {
  return true;
}
}
checkUKs(table);

Hit Save, then Apply.

The result will be a list of all the tables in your design that do not have any Unique Key Constraints defined.

Now the real work begins – fixing those tables! As you work your way through the model adding the new business keys, you can keep using this report to see which ones you have left, and make sure you don’t miss any.

Get to it my friends!

Kent

The Oracle Data Warrior

P.S. Special thanks to DimitarSlavov  of Oracle for posting the code to answer my question. If you want to see the whole thread go here.

Post Navigation

%d bloggers like this: