Hey all,
Sorry for the long absence. I have been going through a job change recently and I couldn't say anything about it until it went public. I am sure you are saying something like "Great, congratulations, now get on with the data help stuff". I am sorry to say that my new job takes me away from the world of database architecture and places me squarely in the middle of the business itself. As much as I love data, I think I can be of more help on the business side of the business. To most of the readers of this blog, moving from technology to business is about as foreign an idea as....well as......as something that is really a foreign idea(They say creativity is the first thing to go). If you are a reader of this blog for reasons other than the fabulous technical insight(I forget which post I gave that in, but search through the archives, you are sure to come across it), you will be happy to know that I will still be writing, just not on data.
My new site is No PhD Needed which is derived from a rant like post I did on this site some time ago. The discussion will be a little more lively and not quite as safe as they have been here, but that is the intent. I invite you all to stop by and hope you do soon. Thanks for you support over the last several months. I wish you the best and look forward to seeing you at the new site.
Enjoy your day!
-mike
Tuesday, March 27, 2007
Wednesday, March 07, 2007
Long lost friend
I don't actually sit down to write this blog so much as get inspired to write it. Today I am inspired by having had the opportunity to do something I love to do. As it brings me such joy, I thought I would share it with you. Today, or last night, I got an email from Mitchell Holden (is that a silver spoon name or what). Mitchell dropped me a line to say he was sorry for not getting to talk to me more at a shower we were both at and apologize in general about not keeping in touch. He went on to suggest that we get together to catch up, possibly over coffee, a cocktail, or a bite to eat. He mentioned that he would be in Long Beach at a convention over the weekend, but Sunday or next week would work for him.
I was touched. The problem is, I have no freaking idea who Mitchell Holden is. See he was actually sending the email to Matt. I have no idea who Matt is either. It seems as though Matt and I share a similar email address, and Mitch (I figure he really likes being called Mitch) sent it to me instead of Matt by mistake. That however is not my favorite part. My favorite part is responding. That's right, I respond to the people who accidentally send me email and I do so for a couple of reasons. First, I think it is the right thing to do. For instance, I once received a very nice email and card from a woman who was telling me what a wonderful husband and father I was and how she was so happy to be with me. The problem of course was that it wasn't intended for me, but her husband. I wrote her back and told her I was touched, but that she should say these things to her husband. I mean, really, what future did we have? Any relationship that is that far along before even meeting is doomed. Not to mention, my wife might have a problem with it.
She actually wrote back and thanked me for making her aware of her mistake. I think I probably saved their marriage. I have received several thank yous, in fact. I responded to an invitation to be the chaperon for the local girl scout outing. Again, I was flattered, but I didn't think I would be able to be in Tennessee by tomorrow night. Not to mention, I think there are some cultural, if not actual, laws about such things. On another occasion, I was asked to be on a committee for the local YMCA. I don't remember exactly where it was local too, but it wasn't local to me. I respond to these things so that the people who accidentally send them don't sit around and wait for replies from people that never got the email in the first place. I received thank yous from both of them, apologizing for the mistake. I assume they were then able to contact the correct people. As a result, I also assume, they had a chaperon at the girl scout outing and a committee member for whatever the committee was for, at the local YMCA.
In addition to responding to these accidental emails because I believe it is the right thing to do, I have a great deal of fun being a smart ass. Because ultimately, isn't it about me having fun. It is sort of like a chat room without having to take that first step. (You know the one where you have to convince yourself that it is completely normal to talk to complete strangers about stuff you wouldn't talk to your closest friend about, because these people will never know who you are. Or is that just me. Different topic!) I get to be funny, make smart ass comments and never really have to know who the person is or have them know who I am. Also, it is fun to see who responds to my response. I know you will find this impossible to believe, but not everyone thinks I am as funny as we do. I encourage you to respond and see what you get, you might be surprised and you might surprise somebody else.
Enjoy your day!
-mike
"We rarely think people have good sense unless they agree with us."
- Francois de La Rochefoucauld
I was touched. The problem is, I have no freaking idea who Mitchell Holden is. See he was actually sending the email to Matt. I have no idea who Matt is either. It seems as though Matt and I share a similar email address, and Mitch (I figure he really likes being called Mitch) sent it to me instead of Matt by mistake. That however is not my favorite part. My favorite part is responding. That's right, I respond to the people who accidentally send me email and I do so for a couple of reasons. First, I think it is the right thing to do. For instance, I once received a very nice email and card from a woman who was telling me what a wonderful husband and father I was and how she was so happy to be with me. The problem of course was that it wasn't intended for me, but her husband. I wrote her back and told her I was touched, but that she should say these things to her husband. I mean, really, what future did we have? Any relationship that is that far along before even meeting is doomed. Not to mention, my wife might have a problem with it.
She actually wrote back and thanked me for making her aware of her mistake. I think I probably saved their marriage. I have received several thank yous, in fact. I responded to an invitation to be the chaperon for the local girl scout outing. Again, I was flattered, but I didn't think I would be able to be in Tennessee by tomorrow night. Not to mention, I think there are some cultural, if not actual, laws about such things. On another occasion, I was asked to be on a committee for the local YMCA. I don't remember exactly where it was local too, but it wasn't local to me. I respond to these things so that the people who accidentally send them don't sit around and wait for replies from people that never got the email in the first place. I received thank yous from both of them, apologizing for the mistake. I assume they were then able to contact the correct people. As a result, I also assume, they had a chaperon at the girl scout outing and a committee member for whatever the committee was for, at the local YMCA.
In addition to responding to these accidental emails because I believe it is the right thing to do, I have a great deal of fun being a smart ass. Because ultimately, isn't it about me having fun. It is sort of like a chat room without having to take that first step. (You know the one where you have to convince yourself that it is completely normal to talk to complete strangers about stuff you wouldn't talk to your closest friend about, because these people will never know who you are. Or is that just me. Different topic!) I get to be funny, make smart ass comments and never really have to know who the person is or have them know who I am. Also, it is fun to see who responds to my response. I know you will find this impossible to believe, but not everyone thinks I am as funny as we do. I encourage you to respond and see what you get, you might be surprised and you might surprise somebody else.
Enjoy your day!
-mike
"We rarely think people have good sense unless they agree with us."
- Francois de La Rochefoucauld
Monday, February 26, 2007
To NULL or not to NULL, that is the question
I haven't really done any database specific stuff in a while so I thought this might be a good time to point you to a great article, which references another great article, on the subject of NULL(s). I happen to love the subject of NULL(s) because it is as close as you can get to metaphysical philosophy in the database world. Usually database stuff is pretty dry. Rows and columns, columns and rows. Not very thought provoking. NULL on the other hand is everything that doesn't make sense about data. I have never been sold on the idea of the NULL value. It isn't a value, and in fact isn't anything. But that is different than nothing which is what I might have opted for. Having said that, the value of NULL is obvious (By value, I mean worth, not an actual value, which NULL does not have). So if NULL is something that is nothing how do you decide when to use it over using actually nothing? See now we are getting somewhere (somewhere that is actually nowhere, which is different that not being somewhere that is nowhere near somewhere). Wow, I better turn this over to Michael Coles, author of NULL Versus NULL? before I confuse all of us anymore. (This is an sqlservercentral link and does require registration. As I have said before, it is one of the best sql sites on the web, so if you haven't signed up before, do so now).
Enjoy your day!
-mike
"I can believe anything, provided that it is quite incredible."
-Oscar Wilde
Enjoy your day!
-mike
"I can believe anything, provided that it is quite incredible."
-Oscar Wilde
Monday, February 19, 2007
For those who felt cheated
I know some of you were disappointed that I didn't spend more time on Anna Nicole and North Korea last time. I used up all of my creative muse on the dog show, and left with little space and little inspiration, I short changed you. As it turns out, I couldn't have done North Korea any better than Scott did, so I thought I would encourage you to read his view. DilbertBlog Funny stuff. As for Anna Nicole, I have to let that play out some more. I think it is only a matter of time before we are able to tie the Anna Nicole death to Britney's rehab jump and subsequent head shaving. On a side note, as a person with a shaved head, I find Britney's attempt to join the distinguished club of people with shaved heads or DCPWSH (pronounced- dcpwsh) as we have come to be called, offensive and in bad taste. We are investigating legal action.
Enjoy your day!
-mike
"Anger is the feeling that makes your mouth work faster than your mind."
-Evan Esar
Enjoy your day!
-mike
"Anger is the feeling that makes your mouth work faster than your mind."
-Evan Esar
Tuesday, February 13, 2007
Westminster, Anna Nicole, and N. Korea
Westminster, Anna Nicole, and N. Korea, what do these things have in common? They all prove the world has gone to the dogs. Ha Ha, I slay me. Anyhow, I am flipping through the channels last night and come across the dog show thing. Now normally it wouldn't bother me but last night was different. See, I am an HDTV junkie and there simply are not enough channels available in high-def to be taking one up with the dog show. The other problem is that in order for me to be a viewer of your program, all you have to do is broadcast it in high-def. As I have explained to friends in the past, I have watched stuff in high-def that I would never watch, simply because it is in high-def. This is a double edged sword of course. Sometimes, I come across great shows on Discovery or PBS that are entertaining or educational as well as stunning in their presentation. I have seen some great stuff on the history of arctic expedition on PBS and a fascinating look at the job of bee keeper and removing huge nests of killer bees from populated areas to unpopulated areas, where the bees can do what nature intends for them, on the Discovery channel. I have also watched things that I have no interest in, simply because the picture in high def is so far superior to anything on regular TV, that I simply can't watch regular TV anymore.
So last night it was the dog show, and I mean THE dog show. This is apparently the Super Bowl of dog shows. Having said that, this might be the most ridiculous thing I have ever seen. There is a lot of pageantry, which I can appreciate. People and dogs dressed to the nines and huge crowds of people in the stands. So during the setup, this all looks fine, very British, but fine. Then the whole thing breaks bad. See in order to "show" these dogs, there seems to be a requirement that a well dressed, middle aged woman, who is slightly overweight, wearing high heels runs around the arena with the dog. Now the dog, is just out for a walk, something it does with regularity and seems to be well adept to handle. The same could not be said for the people. The entire time the dog is "shown", you are waiting for the woman to trip and fall, get tangled and fall, break a heal and fall, or simple die and fall. It might actually be some of the best drama on TV if it wasn't so cruel.
The other thing that strikes me is that there are classes or divisions in which the dogs are cast and judged. For instance, when I was watching there was the working dog class. I took this to mean that these dogs had been bred to work on farms or other situations that could benefit from a herding, shepherding, or rescuing dog. But, like most things made for TV, not a one of the dogs shown had every really done a days work in its life. These dogs were bred to be show dogs, not working dogs. All I could think about was the real working dogs sitting around watching this show thinking that the rich get richer while they continue to toil away for a dog's wage. It is funny to watch the world of man and beast intersect, but maybe no place is it more ridiculous than at Westminster. On the bright side, it was a nice distraction from Anna Nicole and politics. Because for all of the dog shows silliness, at least it is still just a dog show, the other stuff is actually supposed to matter.
Enjoy your day!
-mike
"In preparing for battle I have always found that plans are useless, but planning is indispensable."
-Dwight D. Eisenhower
So last night it was the dog show, and I mean THE dog show. This is apparently the Super Bowl of dog shows. Having said that, this might be the most ridiculous thing I have ever seen. There is a lot of pageantry, which I can appreciate. People and dogs dressed to the nines and huge crowds of people in the stands. So during the setup, this all looks fine, very British, but fine. Then the whole thing breaks bad. See in order to "show" these dogs, there seems to be a requirement that a well dressed, middle aged woman, who is slightly overweight, wearing high heels runs around the arena with the dog. Now the dog, is just out for a walk, something it does with regularity and seems to be well adept to handle. The same could not be said for the people. The entire time the dog is "shown", you are waiting for the woman to trip and fall, get tangled and fall, break a heal and fall, or simple die and fall. It might actually be some of the best drama on TV if it wasn't so cruel.
The other thing that strikes me is that there are classes or divisions in which the dogs are cast and judged. For instance, when I was watching there was the working dog class. I took this to mean that these dogs had been bred to work on farms or other situations that could benefit from a herding, shepherding, or rescuing dog. But, like most things made for TV, not a one of the dogs shown had every really done a days work in its life. These dogs were bred to be show dogs, not working dogs. All I could think about was the real working dogs sitting around watching this show thinking that the rich get richer while they continue to toil away for a dog's wage. It is funny to watch the world of man and beast intersect, but maybe no place is it more ridiculous than at Westminster. On the bright side, it was a nice distraction from Anna Nicole and politics. Because for all of the dog shows silliness, at least it is still just a dog show, the other stuff is actually supposed to matter.
Enjoy your day!
-mike
"In preparing for battle I have always found that plans are useless, but planning is indispensable."
-Dwight D. Eisenhower
Tuesday, February 06, 2007
Bears Colts and other animals
Anyone who knows me knows that I am a Chicago sports fan. I was raised that way, and much like religion and political party affiliation, it is clearly the result of nurture not nature. Those who know me will also know that I love football. Football is America's favorite past time, long ago passing baseball in that category (work stoppage and canceling the world series might have been a factor). So as you might imagine, when these two things line up, my favorite team playing my favorite sport, in the biggest game of the year, I am pretty excited. The last time the Bears were in the Superbowl, I was 15. I don't remember much about the actual game and in my years of growing and learning, I can't be certain that what I know now is a result of watching the game or the many things I have learned about that team sinse then. Either way, it was a joyous time and one that I know my father waited a long time to see. In fact, if I am not mistaken, he had waited his whole life.
I don't remember feeling like I was watching something that wasn't going to happen again for another 27 years, but I was only 15 and hadn't really been made aware of the legacy of Chicago sports teams and the decades that pass between championships. Having become older and wiser I made sure to instill in my 7 year old son that what he was seeing didn't happen that often and that the next time he gets to see the Bears in the Superbowl, he might be explaining the significance of the event to his 7 year old son.
What I didn't prepare him for, and in retrospect hadn't prepared myself for, is the possibility that the Bears could lose. See the thing is, we ( by we I mean them, I know I don't play for any of the teams) don't get to the championships very often, in fact sometimes it's decades bordering on centuries, but when we do get there we win. I can't recall, in my lifetime, a Chicago sports team making it to the big game and losing. Don't get me wrong, there have been some historic chokes on the way to what seemed an inevitable appearance in the big game, but once there, we win. I don't know why, we just do. The Bears in 85 won. The White Sox the year before last won. The Bulls got there six times and won 6 times. That is just the way it is. So when everyone was picking the Colts to win and talking about the destiny of Tony Dungey and Peyton Manning, I just attributed it to those people not being aware of the fact that we don't lose. Not in that game, not in my lifetime.
In the end, the Bears of course lost and Peyton got his ring, Dungey became the first African-American coach to win a Superbowl and Prince put on a half time show that dazzled and entertained everyone. The fact that the Bears lost is conformation that, just as I get to a point that I am certain things are a certain way, something happens to show me the other side. A possibility that I hadn't even thought about not only exists, but for that moment in time, is a new certainty that I am going to have to evaluate. I can't describe what it is I feel like at this moment other than to say I think I understand what people must have felt like when they realized the world wasn't really flat.
Enjoy your day!
-mike
"Humankind cannot stand very much reality."
-T.S. Elliot
I don't remember feeling like I was watching something that wasn't going to happen again for another 27 years, but I was only 15 and hadn't really been made aware of the legacy of Chicago sports teams and the decades that pass between championships. Having become older and wiser I made sure to instill in my 7 year old son that what he was seeing didn't happen that often and that the next time he gets to see the Bears in the Superbowl, he might be explaining the significance of the event to his 7 year old son.
What I didn't prepare him for, and in retrospect hadn't prepared myself for, is the possibility that the Bears could lose. See the thing is, we ( by we I mean them, I know I don't play for any of the teams) don't get to the championships very often, in fact sometimes it's decades bordering on centuries, but when we do get there we win. I can't recall, in my lifetime, a Chicago sports team making it to the big game and losing. Don't get me wrong, there have been some historic chokes on the way to what seemed an inevitable appearance in the big game, but once there, we win. I don't know why, we just do. The Bears in 85 won. The White Sox the year before last won. The Bulls got there six times and won 6 times. That is just the way it is. So when everyone was picking the Colts to win and talking about the destiny of Tony Dungey and Peyton Manning, I just attributed it to those people not being aware of the fact that we don't lose. Not in that game, not in my lifetime.
In the end, the Bears of course lost and Peyton got his ring, Dungey became the first African-American coach to win a Superbowl and Prince put on a half time show that dazzled and entertained everyone. The fact that the Bears lost is conformation that, just as I get to a point that I am certain things are a certain way, something happens to show me the other side. A possibility that I hadn't even thought about not only exists, but for that moment in time, is a new certainty that I am going to have to evaluate. I can't describe what it is I feel like at this moment other than to say I think I understand what people must have felt like when they realized the world wasn't really flat.
Enjoy your day!
-mike
"Humankind cannot stand very much reality."
-T.S. Elliot
Friday, January 26, 2007
Teaching Children to Read
It's days like this that I think I should have stayed in the academic world and gotten a lot of money to study something that most of us assume to be common sense. So I came across this article, which was the summation of study done, that shows that one method of teaching children to read was no better than the other. The specifics escape me and of course I lost the link to the story, which I know is horrible blogger etiquette, (the fact that there is such a thing as blogger etiquette is a topic for another day) but the gist of it was that the phonics method was no better or worse than the standard method. The difference between success and failure seemed to be more about giving individual attention to students and making sure the were reading the correct stuff for the reading level they were at as opposed to the method used. Wow, imagine that! Spend some time working with the kids at a level they are comfortable with and they will learn how to read.
I realize we could debate the reality of being able to or not being able to do that in today's over crowded class rooms. We could also talk about the software like Accelerated Reader (shameless plug) that address this very concern. However, neither would address my concern, which is the fact that we need a study to to verify stuff we already know.
Don't get me wrong, I understand the need for studies and I am not saying we shouldn't look into the reasons some things work and some don't, or why one thing is or isn't better than another. I am just tired of someone having to have a Phd. in some discipline to be considered knowledgeable on the subject. There are some things in life that we all observe or take part in on a daily basis, and those observations and experiences can make us experts in that field. Our fields of expertise are different, and they change as our lives change, but make no mistake, you are an expert on something and you don't need a Phd. to prove it. Again, no offense to all of my friends with Phd's (I think they will both be OK with it) but sometimes it seems that the Phd crowd likes to thumb their noses at any one else who might have a thought on a topic just because they haven't studied it in depth. I think we all have examples or can recall a time when something in our daily lives might be in direct conflict with a theory of how things should work, based on some study, by some guy with a really hard to pronounce last name from MIT or Harvard, with some advanced degree.
Ask any teacher on the planet who has been teaching little kids to read for any length of time, and they will tell you exactly what this study told you, and they didn't need lots of money or an advanced degree to do it. They just live it, and I happen to think that should be enough. Maybe if we started listening to the people who live it, and acknowledge their credibility as experts in that field, we wouldn't have to fund studies to prove what is already known and we could fund, oh I don't know, maybe getting the kids who need them some winter coats and snow pants for school. Just a thought.
Have a great day!
-mike
"Science is organized knowledge. Wisdom is organized life."
-Immanuel Kant
I realize we could debate the reality of being able to or not being able to do that in today's over crowded class rooms. We could also talk about the software like Accelerated Reader (shameless plug) that address this very concern. However, neither would address my concern, which is the fact that we need a study to to verify stuff we already know.
Don't get me wrong, I understand the need for studies and I am not saying we shouldn't look into the reasons some things work and some don't, or why one thing is or isn't better than another. I am just tired of someone having to have a Phd. in some discipline to be considered knowledgeable on the subject. There are some things in life that we all observe or take part in on a daily basis, and those observations and experiences can make us experts in that field. Our fields of expertise are different, and they change as our lives change, but make no mistake, you are an expert on something and you don't need a Phd. to prove it. Again, no offense to all of my friends with Phd's (I think they will both be OK with it) but sometimes it seems that the Phd crowd likes to thumb their noses at any one else who might have a thought on a topic just because they haven't studied it in depth. I think we all have examples or can recall a time when something in our daily lives might be in direct conflict with a theory of how things should work, based on some study, by some guy with a really hard to pronounce last name from MIT or Harvard, with some advanced degree.
Ask any teacher on the planet who has been teaching little kids to read for any length of time, and they will tell you exactly what this study told you, and they didn't need lots of money or an advanced degree to do it. They just live it, and I happen to think that should be enough. Maybe if we started listening to the people who live it, and acknowledge their credibility as experts in that field, we wouldn't have to fund studies to prove what is already known and we could fund, oh I don't know, maybe getting the kids who need them some winter coats and snow pants for school. Just a thought.
Have a great day!
-mike
"Science is organized knowledge. Wisdom is organized life."
-Immanuel Kant
Wednesday, January 24, 2007
Findings from previous post
OK, I only have 15 minutes so I have to make this quick. For the last couple of days I have asked for comments and feedback from people on whether or not anyone was reading this. It turns out that at least a few people are which is all of the motivation I needed. Having said that though, there are going to be some changes.
The title of the blog will remain the same, but I reserve the right to talk about anything I like. I felt like I should mention that in case I enticed you to read this via the email I sent to colleagues at work. Having said that everything will still be data related. I am able to say that based on the fact that in the last couple of blogs I have established, without objection from any of you, that everything is data. Ergo, I can talk about anything and it is still pertinent to the title. (I was president of the philosophy club in college, so circular logic is something I excel at).
The change will allow me to stretch my creativeness (which, when you work with rows and columns, is something that is desperately needed) and to hopefully broaden the audience. That is not to say that I am unhappy with the quaint little group we have here. This is sort of open mic night at the coffee shop and I will always love that the most, even when I am a big internet billionaire star person. I won't forget the little people who gave me my start.
Enjoy your day!
-mike
The outcome of any serious research can only be to make two questions grow where only one grew before.
-Thorsein Veblen
The title of the blog will remain the same, but I reserve the right to talk about anything I like. I felt like I should mention that in case I enticed you to read this via the email I sent to colleagues at work. Having said that everything will still be data related. I am able to say that based on the fact that in the last couple of blogs I have established, without objection from any of you, that everything is data. Ergo, I can talk about anything and it is still pertinent to the title. (I was president of the philosophy club in college, so circular logic is something I excel at).
The change will allow me to stretch my creativeness (which, when you work with rows and columns, is something that is desperately needed) and to hopefully broaden the audience. That is not to say that I am unhappy with the quaint little group we have here. This is sort of open mic night at the coffee shop and I will always love that the most, even when I am a big internet billionaire star person. I won't forget the little people who gave me my start.
Enjoy your day!
-mike
The outcome of any serious research can only be to make two questions grow where only one grew before.
-Thorsein Veblen
Friday, January 19, 2007
Is anyone reading this?
So I need some help/advice/encouragement. Is anyone reading this? I ask only because I have no idea who is or isn't reading this. I have tried almost everything I can think of to get comments or questions to no avail. So I figure the best way to figure it out is to ask. In addition if you could let me know what you would like to hear about, that would be great. I'm ok if there isn't a lot of interest in this, I have another blog where I can rant about anything so I have an outlet. So you can be honest. In fact you can be honest without leaving your name so it should work out well.
Thanks for your help.
-mike
"One of the lessons of history is that nothing is often a good thing to do and always a clever thing to say."
-Will Durant
Thanks for your help.
-mike
"One of the lessons of history is that nothing is often a good thing to do and always a clever thing to say."
-Will Durant
Wednesday, January 17, 2007
One Search to Rule Them All
Let me start by saying I am an information junkie. I like all information and then I like to decide if that information is important to me. If it is, I like to dig into it further and see where that takes me. As a result of all of this information and sifting through it, I can never find anything. Maybe that is why I like database systems, because as long as I can control what comes in, I can find it later. This does present a problem though as some information I don't think I need is the stuff I need most and if I filter it out, then I can't find it. (This is going to be one of those, what if we are all living in a spec of dust on someone else's desk, sort of philosophical, sort of high, type of conversations). So if I don't know what I need, but I need everything, but I am only interested in some of it, but I am really interested in all of it, or at least more of it, but don't know it, what am I to do. The logical answer, (if there is such a thing to that quasi question) is search. If I can search everything than I aways have access to everything, even the stuff I don't know I need. The problem with search is that it doesn't always work. Even my beloved Google fails me from time to time. And even if it didn't, it doesn't help me search within a site that has information that I need, it just gets me to the site. Of course the site could use Google search but may not.
So I was sifting through some information at LifeHacker.com when I came across this tool called Wikiseek that searches Wikipedia for you. So I think to myself, isn't search a prime component of Wikipedia and all Wiki's for that matter? (Hours of research lead me to the conclusion that, yes, search is indeed part of a wiki's feature set). So why this tool? Well anyone that has ever used Wikipedia's search knows why, and that is because it sucks. So this tool searches better than the search that is available and built in. So now I am forced to think that maybe the answer isn't in the storage of data, but the ability to seek and find that data with the best tool available. Now if you want to get all technical and start talking about how that isn't possible because how could you index site content or file content of something you don't have access to and those sorts of things, save it. If you read this blog you know that all things are possible and the more you say they aren't the better the chance of some really smart guy getting really rich. (I haven't had time to prove out the cause and effect relationship of this theory, but there is lots of circumstantial evidence to support it).
So if I have a really brilliant search tool that can search anything then I can have all of the information that I need and don't know I need because I don't have to filter it out because I can search it all. How cool is that. Now think about that idea from an application standpoint. Imagine search not being confined to just one database, but maybe a database and a flat file or my database and your database and the Library of Congress database. Now finding a book that meets our needs becomes much easier. Thoughts anyone?
Have a blessed day!
-mike
Rage is the only quality which has kept me, or anybody I have ever studied, writing columns for newspapers.
-Jimmy Breslin
So I was sifting through some information at LifeHacker.com when I came across this tool called Wikiseek that searches Wikipedia for you. So I think to myself, isn't search a prime component of Wikipedia and all Wiki's for that matter? (Hours of research lead me to the conclusion that, yes, search is indeed part of a wiki's feature set). So why this tool? Well anyone that has ever used Wikipedia's search knows why, and that is because it sucks. So this tool searches better than the search that is available and built in. So now I am forced to think that maybe the answer isn't in the storage of data, but the ability to seek and find that data with the best tool available. Now if you want to get all technical and start talking about how that isn't possible because how could you index site content or file content of something you don't have access to and those sorts of things, save it. If you read this blog you know that all things are possible and the more you say they aren't the better the chance of some really smart guy getting really rich. (I haven't had time to prove out the cause and effect relationship of this theory, but there is lots of circumstantial evidence to support it).
So if I have a really brilliant search tool that can search anything then I can have all of the information that I need and don't know I need because I don't have to filter it out because I can search it all. How cool is that. Now think about that idea from an application standpoint. Imagine search not being confined to just one database, but maybe a database and a flat file or my database and your database and the Library of Congress database. Now finding a book that meets our needs becomes much easier. Thoughts anyone?
Have a blessed day!
-mike
Rage is the only quality which has kept me, or anybody I have ever studied, writing columns for newspapers.
-Jimmy Breslin
Tuesday, January 16, 2007
Geek activity of the day
I thought this would be right up the alley of most of us. Even if it isn't your cup of tea, you have to admit that as geeky things go, this is pretty cool.
Enjoy your day!
-mike
People want economy and they will pay any price to get it.
-Lee Iacocca
Enjoy your day!
-mike
People want economy and they will pay any price to get it.
-Lee Iacocca
Friday, January 12, 2007
What is data
Is there anything that isn't data or metadata(which is data about data and therefore still data). And if everything is data, then what is the best way to retrieve everything. I bring this up based on the Google telescope project. It seems that Google is going to try and Google space. If you think about it, the idea isn't so crazy. To search the web, you put in some search criteria and via a complex algorithm, Google returns what it thinks you are looking for. Couldn't you do the same thing with space. Create an automated telescope that will accept some criteria and run that through a complex space search algorithm, and it gives you information about whatever it was you input. And if you can do that with space, shouldn't you be able to do that with anything. I should be able to search for my wife. Both now and before she even knew she was going to be my wife. How cool would that be. Put in things about yourself and what you value in a spouse and BAM!, the search engine returns prospective mates. Now I know you are thinking that dating services do that very thing, and they do. The problem is that both people have to be looking and looking on the same site. With this new search you automatically search everywhere and your potential spouse doesn't have to be aware that you are looking or even be looking themselves.
When you think about it, isn't it the data you were not aware of that is most valuable? The data you didn't know you needed or even had is the priceless stuff companies are paying big money for. That is the whole idea behind the data warehouse and the new SOA tools that allow all sorts of applications access to all sorts of data within a company. Unstructured data, structured data, drawings, people, ideas, all of it becomes more valuable the more ways you can search it and the more of it you can search together. So the fact that my would be spouse doesn't know she is looking or doesn't know I am looking is really the most valuable part that this search would offer. We might both be data the other needs even if we don't know it. Then again, maybe I just need to lay of the hash pipe for a while.
Enjoy life!
-mike
"Data and search are the future of technology, of this I am certain."
- Michael P. Dillon
When you think about it, isn't it the data you were not aware of that is most valuable? The data you didn't know you needed or even had is the priceless stuff companies are paying big money for. That is the whole idea behind the data warehouse and the new SOA tools that allow all sorts of applications access to all sorts of data within a company. Unstructured data, structured data, drawings, people, ideas, all of it becomes more valuable the more ways you can search it and the more of it you can search together. So the fact that my would be spouse doesn't know she is looking or doesn't know I am looking is really the most valuable part that this search would offer. We might both be data the other needs even if we don't know it. Then again, maybe I just need to lay of the hash pipe for a while.
Enjoy life!
-mike
"Data and search are the future of technology, of this I am certain."
- Michael P. Dillon
Thursday, January 11, 2007
Keep it simple
So today I found myself amazed by something I probably shouldn't be amazed by. Excel. Yep, that's it, plain old Microsoft Excel. I am not amazed by the fact that I'm amazed by excel, but amazed at how efficient excel is at some things. Excel is one of those offensive linemen apps. You know, the ones that do all of the work, but very little glory. We go to excel when we need something quick and dirty or just need to get the job done. Seldom does it make the cut at presentation time or report time. There are many other tools that are seemingly better at those things. Today, however, I was reminded of how powerful excel is and all of the things it is good at. We had a project where we were tracking event dates within a process. One of the challenges with this sort of project is determining the format of the data. Usually people lay it out with some drawing tool, or maybe a spreadsheet or doc and then the lead pulls all of the info together. Then like a computer geek Mozart they sit down in front of the keyboard and cut and past their masterpiece together from the various formats.
Today I saw the results of some data gathering done by three different people placed in the same format within excel and then that data aligned by date and graphed into a time line. Beyond that the various time lines were able to be lined up, one on top of the other on a single excel page for an eye catching easy to read analysis. It was great. It was easy to read, easy to understand and simple. I wonder how much time we spend over complicating things or over dressing them in the name of presentation. As business seeks more and more information we often talk about bringing together legacy systems and how are we are going to merge the data and present it. As we get better and better at bringing the data together it is only a matter of time before presenting the data in some easy to read, easy to understand format becomes just as important.
Something to think about.
-mike
"An idealist is a person who helps other people to be prosperous."
-Henry Ford
Today I saw the results of some data gathering done by three different people placed in the same format within excel and then that data aligned by date and graphed into a time line. Beyond that the various time lines were able to be lined up, one on top of the other on a single excel page for an eye catching easy to read analysis. It was great. It was easy to read, easy to understand and simple. I wonder how much time we spend over complicating things or over dressing them in the name of presentation. As business seeks more and more information we often talk about bringing together legacy systems and how are we are going to merge the data and present it. As we get better and better at bringing the data together it is only a matter of time before presenting the data in some easy to read, easy to understand format becomes just as important.
Something to think about.
-mike
"An idealist is a person who helps other people to be prosperous."
-Henry Ford
Tuesday, January 09, 2007
CES Apple and Design
What a great time of year this is. The Consumer Electronics Show in Vegas is in full swing and we are just a couple of hours away from the Steve Jobs keynote at Macworld. I, of course, am at neither of them (although I was thinking about using that as an excuse for not posting yesterday, but I really just got busy and didn't have time). Even though I am not at either event, I do follow them with several levels of interest.
First and foremost I am a consumer. Much to my wife's displeasure, I am the guy the ad companies love, because I am the guy the ads work on. I love new things, a result of my undiagnosed adult ADD I am sure. I love flashy, shiny things that do more than I could ever need or use. I like the wow factor and I like playing with new things. At heart I am just a kid and these types of shows are a giant indoor playground for me. Secondly, I am a technology geek. I am always amazed by the transformation of the idea into a product. Many of us have ideas although few of us will ever produce anything. Last but not least, I am an architect and designs of all types peek my interest. I like to think about the process that went into the design, how they came to the conclusions they came to and how they managed risk and return on investment.
I know what you are thinking, what does being a database architect have to do with the design of an iPod or some similar product. The answer is simply nothing and everything. It isn't so much about the end result as it is the thought process and thinking that goes into it. It is about being able to figure out new ways of looking at things and always questioning conventional wisdom. The people and companies at these shows have put those thoughts into action and have put the results out there for all to see. Some of those products will be loved and adored, while others are shunned like an ice cream vendor at a polar plunge (sorry, it's a Wisconsin thing). The point is these people took some information based on some research and came to the conclusion that this is what we needed. The thing that I wonder most about is where the balance between information and innovation exists.
Where did research end and speculation start. Where did the things I know I needed end and the things I didn't know I needed start. That is what it's all about. Sure you can go to the user and ask them what they need and give it to them. That is a great approach and you will seldom go wrong. By that same token though, you have to be able to give them what they didn't know they needed in order to be innovative and stay strong. Until Steve Jobs and Apple came out with the iPod, I didn't know I needed one. Had they asked me what I wanted, I might have said it would be great if my Mac would allow me to copy mp3's to eight track tapes so I can play them in my Gremlin.
Architecture is much the same. Create and design for what people know they need, but more importantly, for things they didn't know they needed.
Have a great day!
-mike
"First you're an unknown, then you write one book and you move up to obscurity."
-Martin Myers
First and foremost I am a consumer. Much to my wife's displeasure, I am the guy the ad companies love, because I am the guy the ads work on. I love new things, a result of my undiagnosed adult ADD I am sure. I love flashy, shiny things that do more than I could ever need or use. I like the wow factor and I like playing with new things. At heart I am just a kid and these types of shows are a giant indoor playground for me. Secondly, I am a technology geek. I am always amazed by the transformation of the idea into a product. Many of us have ideas although few of us will ever produce anything. Last but not least, I am an architect and designs of all types peek my interest. I like to think about the process that went into the design, how they came to the conclusions they came to and how they managed risk and return on investment.
I know what you are thinking, what does being a database architect have to do with the design of an iPod or some similar product. The answer is simply nothing and everything. It isn't so much about the end result as it is the thought process and thinking that goes into it. It is about being able to figure out new ways of looking at things and always questioning conventional wisdom. The people and companies at these shows have put those thoughts into action and have put the results out there for all to see. Some of those products will be loved and adored, while others are shunned like an ice cream vendor at a polar plunge (sorry, it's a Wisconsin thing). The point is these people took some information based on some research and came to the conclusion that this is what we needed. The thing that I wonder most about is where the balance between information and innovation exists.
Where did research end and speculation start. Where did the things I know I needed end and the things I didn't know I needed start. That is what it's all about. Sure you can go to the user and ask them what they need and give it to them. That is a great approach and you will seldom go wrong. By that same token though, you have to be able to give them what they didn't know they needed in order to be innovative and stay strong. Until Steve Jobs and Apple came out with the iPod, I didn't know I needed one. Had they asked me what I wanted, I might have said it would be great if my Mac would allow me to copy mp3's to eight track tapes so I can play them in my Gremlin.
Architecture is much the same. Create and design for what people know they need, but more importantly, for things they didn't know they needed.
Have a great day!
-mike
"First you're an unknown, then you write one book and you move up to obscurity."
-Martin Myers
Friday, January 05, 2007
repair_rebuild
So I am sitting here waiting for a corrupt database to decide if it wants to fix itself, when it occurs to me that it is pretty amazing that it is even trying. Then it occurs to me that maybe having it not become corrupt in the first place is a better answer. Now the very first thing you think is that there is really no way to do that and I would agree, at first. Then I would think for a minute and realize that the second someone says it can't be done, there arises the opportunity for greatness.
Now I have to confess that I have never built a database engine or a disk drive (the two most common factors in data corruption). But that really isn't the point. The point is that at some juncture in database engine design it was decided to build tools into the engine that attempt to fix the corruption, rather than not allowing the database to become corrupt in the first place. How does that become OK? I am not saying it isn't OK, I'm just wondering how it becomes that way. When we write software, how do we decide when it is OK to fix the results caused by a problem rather than fixing the problem. I find this question even more ironic when related to database discussions because the first thing you learn in DBA 101 is the "garbage in, garbage out" rule. What that means is, when someone comes to me and says, "I want to put in this stored procedure to check for the wrong data in a table", I say "don't let wrong data in the table in the first place and then we don't have to check for it." So for the designers of the database to supply a command to fix corrupt data rather than to not allow to become corrupt in the first place strikes me as ironic.
Think about it for a while and see if you can find a place in your job or life where there isn't some area that you or someone else have provided a tool to fix the results of a problem rather than fixing the problem. In that examination of myself, I find many areas in both my life and job where I have done or witnessed this very thing. Again, it isn't always bad, but I do think we have some responsibility to continually attempt to solve the problem itself. And most important are the ones people insist can't be done.
Have fun!
-mike
I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living, It's a way of looking at life through the wrong end of a telescope. Which is what I do, And that enables you to laugh at life's realities.
-Dr. Seuss
Now I have to confess that I have never built a database engine or a disk drive (the two most common factors in data corruption). But that really isn't the point. The point is that at some juncture in database engine design it was decided to build tools into the engine that attempt to fix the corruption, rather than not allowing the database to become corrupt in the first place. How does that become OK? I am not saying it isn't OK, I'm just wondering how it becomes that way. When we write software, how do we decide when it is OK to fix the results caused by a problem rather than fixing the problem. I find this question even more ironic when related to database discussions because the first thing you learn in DBA 101 is the "garbage in, garbage out" rule. What that means is, when someone comes to me and says, "I want to put in this stored procedure to check for the wrong data in a table", I say "don't let wrong data in the table in the first place and then we don't have to check for it." So for the designers of the database to supply a command to fix corrupt data rather than to not allow to become corrupt in the first place strikes me as ironic.
Think about it for a while and see if you can find a place in your job or life where there isn't some area that you or someone else have provided a tool to fix the results of a problem rather than fixing the problem. In that examination of myself, I find many areas in both my life and job where I have done or witnessed this very thing. Again, it isn't always bad, but I do think we have some responsibility to continually attempt to solve the problem itself. And most important are the ones people insist can't be done.
Have fun!
-mike
I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living, It's a way of looking at life through the wrong end of a telescope. Which is what I do, And that enables you to laugh at life's realities.
-Dr. Seuss
Thursday, January 04, 2007
GETUTCDate()
Pretty odd title I know. I was reading an article at sqlservercentral.com (registration required) about defaults and the ups and downs of using them. It was an opinion piece and in my experience there is no one right answer to that sort of thing. Document what you have done and why you have done it and keep the big picture in mind is about the best you can do when it comes to that sort of thing.
Buried in that same article was a little info about getutcdate() which as you might have guessed is a get date function that returns the GMT date and time. As I have mentioned before, anyone who has had the misfortune of spending any time discussing database design with me, will attest to my disdain for business logic contained within the database. Again, I stress, business logic is different from business rules, but that is another discussion. So what does the getdate() function have to do with business logic. Well, I would propose that getting the date and time via the server and allowing that to dictate format implies a certain amount of logic. Namely the timezone for which the time is going to be reported. The database doesn't care about the time zones and to try to manipulate it in the database would constitute some form of business logic. Having said that out loud, it sounds pretty silly and it is certainly nothing I would ever make a case out of, but why deal with that when you can return the GMT via the getutcdate() function. That way you always know what time you are going to pull from the database and adjust for it programagically.
At the company I work for we have stumbled into a time zone issue that hadn't been thought of. Because the getdate() function is used and thereby expected by the code, it is difficult to handle customers on either coast that connect to servers in the Midwest. By returning GMT time as opposed to local time, adjusting for time zones becomes more standard.
So nothing ground breaking, but something to think about the next time you are looking at the getdate() function. Maybe the getutcdate() function would serve you better in the long run.
Have a great day!
-mike
"We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true."
-Robert Wilensky
Buried in that same article was a little info about getutcdate() which as you might have guessed is a get date function that returns the GMT date and time. As I have mentioned before, anyone who has had the misfortune of spending any time discussing database design with me, will attest to my disdain for business logic contained within the database. Again, I stress, business logic is different from business rules, but that is another discussion. So what does the getdate() function have to do with business logic. Well, I would propose that getting the date and time via the server and allowing that to dictate format implies a certain amount of logic. Namely the timezone for which the time is going to be reported. The database doesn't care about the time zones and to try to manipulate it in the database would constitute some form of business logic. Having said that out loud, it sounds pretty silly and it is certainly nothing I would ever make a case out of, but why deal with that when you can return the GMT via the getutcdate() function. That way you always know what time you are going to pull from the database and adjust for it programagically.
At the company I work for we have stumbled into a time zone issue that hadn't been thought of. Because the getdate() function is used and thereby expected by the code, it is difficult to handle customers on either coast that connect to servers in the Midwest. By returning GMT time as opposed to local time, adjusting for time zones becomes more standard.
So nothing ground breaking, but something to think about the next time you are looking at the getdate() function. Maybe the getutcdate() function would serve you better in the long run.
Have a great day!
-mike
"We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true."
-Robert Wilensky
Wednesday, January 03, 2007
In Car WiFi
So I came across this article the other day and didn't really think much of it. But today Computer World had this article about it. Here is an excerpt; "January 03, 2007 -- Autonet Mobile, a San Francisco startup, said yesterday it is preparing to release a product for cars that combines 3G cellular access and Wi-Fi that will plug into your car's cigarette lighter. Users will be able to connect the same way they do at hot spots or their home Wi-Fi network. The company will show off the system at the Consumer Electronics Show next week in Las Vegas."
So at fist, I am thinking how cool that could be. There are all sorts of situations in which I could envision this being helpful. For instance, I wouldn't need GPS because I could always have Mapquest or Google Maps available for my laptop or PDA. I would have access to restaurant reviews or movie times as well as a host of other entertainment information. I would have constant access to YouTube and other fun websites to pass the time on a long drive. Maybe the person who finds my car smashed into the tree (caused by my lack of attention while driving) can use it to look up how to apply a tourniquet to my upper leg to stop the bleeding from lower leg where my foot used to be.
That's when it hits me. Is this really stuff I need, let alone, should be doing in my car? When taking into account the increase in traffic accidents related to cell phone use, is having internet access a good thing while you are driving. I know you what you are thinking. You're thinking that no moron would use it while driving, it would be more for passenger use or for use while not driving. That was my thought too, then I remembered the degrees to which I have seen my fellow man (and myself for that matter) stretch the bounds of idiocy. I see the guy sitting at the stop light looking up something, the light turns green and he starts to go while reading the last little bit of information or watching the last little bit of video or whatever. That is all it takes.
Don't get me wrong, I am all for this kind of advancement, I'm just not sure that Darwin's theory of evolution moves fast enough to protect us from the people that will choose to use this technology while driving their vehicle. At the risk of sounding old and out of touch (neither of which I am, unless you ask my children) maybe just driving in the car is enough. Maybe we don't need to be working or entertained or searching for information every second of every day. Maybe once in a while it is OK to be alone with our thoughts or maybe it would be OK to simply pop in that eight track tape and sing along (just kidding, for those of you who have any idea what an eight track tape is). Maybe rather than trying to find ways to distract our children on that long trip, we could take the time to engage them and make them part of the discussion. Maybe, just maybe, we could take a short break from the internet and all it has to offer, and still be OK.
Enjoy your day!
-mike
So at fist, I am thinking how cool that could be. There are all sorts of situations in which I could envision this being helpful. For instance, I wouldn't need GPS because I could always have Mapquest or Google Maps available for my laptop or PDA. I would have access to restaurant reviews or movie times as well as a host of other entertainment information. I would have constant access to YouTube and other fun websites to pass the time on a long drive. Maybe the person who finds my car smashed into the tree (caused by my lack of attention while driving) can use it to look up how to apply a tourniquet to my upper leg to stop the bleeding from lower leg where my foot used to be.
That's when it hits me. Is this really stuff I need, let alone, should be doing in my car? When taking into account the increase in traffic accidents related to cell phone use, is having internet access a good thing while you are driving. I know you what you are thinking. You're thinking that no moron would use it while driving, it would be more for passenger use or for use while not driving. That was my thought too, then I remembered the degrees to which I have seen my fellow man (and myself for that matter) stretch the bounds of idiocy. I see the guy sitting at the stop light looking up something, the light turns green and he starts to go while reading the last little bit of information or watching the last little bit of video or whatever. That is all it takes.
Don't get me wrong, I am all for this kind of advancement, I'm just not sure that Darwin's theory of evolution moves fast enough to protect us from the people that will choose to use this technology while driving their vehicle. At the risk of sounding old and out of touch (neither of which I am, unless you ask my children) maybe just driving in the car is enough. Maybe we don't need to be working or entertained or searching for information every second of every day. Maybe once in a while it is OK to be alone with our thoughts or maybe it would be OK to simply pop in that eight track tape and sing along (just kidding, for those of you who have any idea what an eight track tape is). Maybe rather than trying to find ways to distract our children on that long trip, we could take the time to engage them and make them part of the discussion. Maybe, just maybe, we could take a short break from the internet and all it has to offer, and still be OK.
Enjoy your day!
-mike
Tuesday, January 02, 2007
Happy New Year
So I thought I would drop a note to say happy new year and to announce a change to this blog. So in that order, Happy New Year! I hope all of your wants and dreams are realized this year or at the very least, become a step closer. As for the blog, I really want and need (therapist's orders) to write on a daily basis but the fact of the matter is there just isn't enough database related material to blog about every day. And frankly, even if there was it would surely drive you nuts. I think that there are many other things in life that warrant some discussion and by limiting the topic to data, I am really robbing us of the chance to get to the root of some issues. OK, so that might be a little dramatic, but hopefully you know what I am saying.
I felt the need to announce this change because I know I lured some of you here via an email sent through the corporate email system. As this will no longer be solely "database related" I thought I should let you know. I hope you are able to keep reading and I hope that by moving back to a daily forum we can elicit more comments and more discussions. The idea behind the blog was to provide a forum of discussion on database topics. To this point, it has been pretty one sided but I think that has to do with the topics. So maybe straying from the database from time to time will encourage people to comment.
Again, if there are any database related topics that you have questions about or would like covered, please let me know. I do plan to spend a little time in the next week talking about business logic and business rules and the application of both as they relate to the database. So if you have any specific questions on those topics, let me know. Once again, I wish all of you a truly happy new year and a great 2007.
-mike
I felt the need to announce this change because I know I lured some of you here via an email sent through the corporate email system. As this will no longer be solely "database related" I thought I should let you know. I hope you are able to keep reading and I hope that by moving back to a daily forum we can elicit more comments and more discussions. The idea behind the blog was to provide a forum of discussion on database topics. To this point, it has been pretty one sided but I think that has to do with the topics. So maybe straying from the database from time to time will encourage people to comment.
Again, if there are any database related topics that you have questions about or would like covered, please let me know. I do plan to spend a little time in the next week talking about business logic and business rules and the application of both as they relate to the database. So if you have any specific questions on those topics, let me know. Once again, I wish all of you a truly happy new year and a great 2007.
-mike
Thursday, December 07, 2006
SQL Server Disable Constraints
I don't know about you, but one of my least favorite things to do in a database is deal with foreign key constraints. It seems as though every time there is a serious data problem that requires manual intervention, I run into constraints that I am going to have to deal with before I can fix the data. Of course I know that is why they are there, but it seems to me I should be able to type in a password or something that says, "hey I know what I am doing so let me by pass the whole constraint thing." But alas, I am one who saves his wishes for bigger things so I am stuck, like most, writing or running a script that goes and drops all of the constraints and then do what I need to do and then run the script that puts them all back. This is not an awful solution and can work just fine, assuming you have an up-to-date script with all of the constraints and are sure you are not going to miss anything when putting them back. Maybe it is just me and it may be because of all of the years spent being an database administrator, but I never trust that the script has everything unless I am the one who puts things in and takes things out.
So how to fix my problem, without running a script that drops all of the constraints and then when I am done, running a script to put them back. The undocumented stored procedure of course. How else would you fix a problem that millions of users have other than to find a system procedure that doesn't officially exist. And as a bonus, not only is it an undocumented system stored procedure, it is my favorite undocumented stored procedure. How is that for dumb luck?
I don't know if I have written about undocumented stored procedures, but there are several of them and if you would like me to post them, leave a comment and I will be happy to do so. OK, back on topic.....The undocumented stored procedure can help us with our constraint problem is sp_MSforeachtable. If you are not familiar with with this proc, it does just what it sounds like it does. It runs things on each table in the database. So this proc will let me disable all constraints on the tables and then just re-enable them. Now you are probably thinking that you could just have found the tables you needed to and disabled the constraints on those tables and then enabled them and been done. You would be correct in thinking that (of course no one would know because you were thinking it and that lends it self to the whole "if a tree falls in the woods and no one is listening" thing). However, in some databases (not naming names) the database is so well normalized that the constraints can have dependencies connected to many tables. In those cases I find it easier to assume they are all going to give me a headache and just disable them all by doing the following;
exec sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
Do what I need to do to the data here and then
exec sp_MSforeachtable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
Pretty easy eh? (that's a shout out to all my Canadian friends) So that is one way to deal with constraints, not necessarily better or worse than any other way, just different. Again, if you would like me to discuss sp_MSforeachtable or any other undocumented stored procedures in greater detail, email me, or leave a comment and I will be happy to do so.
Cheers! (another shout out)
-mike
So how to fix my problem, without running a script that drops all of the constraints and then when I am done, running a script to put them back. The undocumented stored procedure of course. How else would you fix a problem that millions of users have other than to find a system procedure that doesn't officially exist. And as a bonus, not only is it an undocumented system stored procedure, it is my favorite undocumented stored procedure. How is that for dumb luck?
I don't know if I have written about undocumented stored procedures, but there are several of them and if you would like me to post them, leave a comment and I will be happy to do so. OK, back on topic.....The undocumented stored procedure can help us with our constraint problem is sp_MSforeachtable. If you are not familiar with with this proc, it does just what it sounds like it does. It runs things on each table in the database. So this proc will let me disable all constraints on the tables and then just re-enable them. Now you are probably thinking that you could just have found the tables you needed to and disabled the constraints on those tables and then enabled them and been done. You would be correct in thinking that (of course no one would know because you were thinking it and that lends it self to the whole "if a tree falls in the woods and no one is listening" thing). However, in some databases (not naming names) the database is so well normalized that the constraints can have dependencies connected to many tables. In those cases I find it easier to assume they are all going to give me a headache and just disable them all by doing the following;
exec sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
Do what I need to do to the data here and then
exec sp_MSforeachtable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
Pretty easy eh? (that's a shout out to all my Canadian friends) So that is one way to deal with constraints, not necessarily better or worse than any other way, just different. Again, if you would like me to discuss sp_MSforeachtable or any other undocumented stored procedures in greater detail, email me, or leave a comment and I will be happy to do so.
Cheers! (another shout out)
-mike
Wednesday, November 29, 2006
New things in T-SQL for 2005
This might be one of the best articles for developers that I have come across in a long time. As soon as I started reading I knew it would be something that everyone could derive some benefit from. I think you will find this most interesting and will encourage you as you look forward to working consistently with SQLServer 2005. So rather than listen to me babble on here is Sureshkumar Ramakrishnan's article on what is new for T-SQL in 2005.
Note: you do need to sign up to have access to this site, but as I have mentioned a couple of times in this blog, it is well worth it.
Enjoy your day,
-mike
Note: you do need to sign up to have access to this site, but as I have mentioned a couple of times in this blog, it is well worth it.
Enjoy your day,
-mike
Subscribe to:
Posts (Atom)

