10
Feb
10

Data Integrity

Tools to maintain data integrity… This one I can directly relate to. I can’t tell you how many times I have had to deal with duplicate data. Finding the duplicate data and then constantly double-checking to make sure that you are removing the duplicate and not the valid data. At this point you may ask “Well, it’s duplicate data, it shouldn’t matter what record you remove.” The duplicate row does not necessarily mean that the entire row is duplicated. It could mean that row 1/column1 has the same record number as row 2/column 1 and everything else in that row has different values or data– how could that happen you ask – no constraints. At a place I worked at, once a week I did an exercise to locate the duplicate data and once a week I found at least 10 records that were duplicated. This can wreak havoc on the front end system that tries to call that record, all of the sudden the user has a cryptic error message on their screen and is immediately on the phone with the help desk but I digress. Back to the blog.

Triggers are good for a lot of things but I have seen them used mainly for ddl logging. I won’t lie, I have had to query that ddl logs to find out if I had run something against a database. I have also used to play data cop to find out who is updating the data when there are issues. But mainly for checking myself because as I get older, I really am getting forgetful.

One thing I learned in chapter is the use of CATCH. I have not used or even heard of that being used before (I should dive into triggers more often). But it looks like that this is a pretty helpful statement in a trigger. If the trigger is running and there is an error, the CATCH statement will handle the error and run whatever statement you have written (the book mentions a rollback transaction when the CATCH statement is called). I will be reading more on this. Books online here I come.

Towards the end of the chapter, the author, Louis Davidson, pens a section named “When and why to use what tool”. I thought this was awesome. He writes a quick summary of what he wrote about and the scenarios to use them in. Being the ADD person that I am, I love the summary sections. I also thought, here is another piece from the book that I can cut out (not literally) and use for a quick reference.

There is so much more in this chapter that I would like to talk about but you will need to go out and get the book and experience it for yourself.

That’s it for week 2. I hope you comment on our blog. We would love to hear from you. Don’t forget, if you would like to be a guest blogger, please send us an email.

Richard

Advertisements

0 Responses to “Data Integrity”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Chapters

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 13 other followers