Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

27
Karen Lopez @ datachick # HeartData Heart of Data Modeling Normalization…is not your friend …or your Enemy

Transcript of Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Page 1: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Karen Lopez @datachick #HeartData

Heart of Data ModelingNormalization…is not your friend…or your Enemy

Page 2: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Yes, Please do Tweet/Share today’s event

@datachick #heartdata

Page 3: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

About Kerry

Recovering Sysadmin

Ten years of data—Varying degrees of SQL Server Engine & BI

Currently Senior BIDeveloper/Consultant

Used to fly little airplanes

@airbornegeek

Page 4: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Karen López

Karen has 20+ years of data and information architecture experience on large, multi-project programs.

She is a frequent speaker on data modeling, data-driven methodologies and pattern data models.

She wants you to love your data.

Page 5: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Data Modelers are people, too....so let’s get to know you….

Page 6: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

POLL: Who Are You?

Page 7: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

What Have You Worked on?

Aug 2014

Page 8: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Attendees, be part of the webinar

Use Q&A for formal questions

Use chat to discuss with each

other

Page 9: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Plan for Today

Why topic?

Why Normalize? Denormalize?

Myths and Truths

10 Tips for Talking About and Doing Normalization

Page 10: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Confession time

I never normalize.

I don’t have the normal forms memorized, nor do I plan to

I believe understanding the principles is important

I believe normalization is NOT a process or a method. More later on that.Not everyone in the data world will agree with me on these things.

Page 11: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

NormalizationWhy this Topic?Why NOT this Topic?

Page 12: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Normalization: It’s a Love/Hate Thing.

Page 13: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy
Page 14: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Normalization, very briefly…

Developed by Ted Codd in the 70s to address update anomalies.

One fact in one place, then referenced instead of duplicated.

One fact means one to create, one item to update, one item to delete.

Page 15: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Normalization, briefly

Page 16: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Normalization…

Is all about the keys, ‘bout the keys, ‘bout the keys…

Depends on understanding the MEANING of the keys and columns

Goes all to heck* when you have surrogate keys

Depends on the make up of the key parts (columns)

Page 17: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Normalization, briefly

1NF – all instances (rows) have the same facts (columns). There are no repeating duplicate columns

2NF – only applies to multi-part keys. No fact is about just part of the key

3NF – No fact depends on another non-key column

Page 18: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

3NF

Every fact is either part of a key or depends upon the key, the whole key, and nothing but the key.….so help you Codd

Michael J Swart

Page 19: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Remember…

“Normalization is like marriage…

…you always end up with more relations”

-Data Modeling Essentials, 3rd EditionSimsion & Witt

Page 20: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Enterprise Applications are Complex

20

Page 21: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Myths…

What Normalization is *NOT*

Page 22: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Why People Hate Normalization

Performance

Misunderstood

Taught Wrong Not Sexy

Page 23: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

It’s taught wrong? Taught as a process, not a measurement

1NF, 2NF, 3NF, etc.

Used like a grade, instead of measurement

Magical “3NF”

Page 24: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

It’s not a process on real projects

1NF 2NF 3NF 4NF BCNF

Page 25: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

10 Tips for Data Modelers

1. Stop talking about the normal forms. Just stop.

2. Study the normal forms, know the lingo. Don’t use it, though

3. Be able to explain the anomaly you are trying to avoid.

4. Know your primary and alternate keys.

5. Enforce your primary and alternate keys.

Page 26: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

10 Tips for Data Modelers

6. Understand denormalization patterns.

7. Don’t take “needs to be Denormalized” as a change request.

8. Understand other performance tuning techniques and how to recommend them

9. Squash “JOINs are Evil” discussions. They are a feature.

10.Be flexible. That’s why we have architects & modelers.

Page 27: Modeling Webinar: Normalization - It's Not Your Friend... or Your Enemy

Thank you, you were great. Let’s do this next month!

Karen Lopez @datachick

#heartdata