March 25, 2013 at 8:32 pm
Comments posted to this topic are about the item CASCADE - 2
March 25, 2013 at 11:39 pm
+1 today 🙂
Last time for DELETE cascade question I lose the points so this time first I prefer to refer BOL before answering this question 😛
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 26, 2013 at 3:08 am
Good one, thank you for posting;
I actually selected 1 and 4 and really not sure what crossed my mind and I ended up selecting the other two... which lead to #facepalm; (and my friend sitting next to me, observes, ... and goes... "what happened man... did your gf dumped you?" and that lead to #headdesk)
ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
March 26, 2013 at 3:23 am
Why today there are no replies from people? :w00t::w00t:
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 26, 2013 at 5:04 am
This seemed so simple I went and ran the code, sure there must be a catch of some kind--turns out there wasn't, it was as simple as is seemed at first viewing. 🙂
March 26, 2013 at 5:50 am
Easy one, thanks!
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
March 26, 2013 at 5:52 am
Apart from the messed up wording of the answer options this is a good question.
It would have been a better question if more care had been taken with editing the answer options.
And intensly I dislike the horrible violation of 1NF - code examples like this risk teaching really awful habits to inexperienced people who see them.
Tom
March 26, 2013 at 6:59 am
Glad I got this one right... after the last two where I knew the correct answer and just picked the wrong one... I as getting skeered
March 26, 2013 at 6:59 am
Thanks for the question Ron.
I'm developing a bit of paranoia. Even when the question is easy for me, I figure that I am missing something.
As Andy Grove said, only the paranoid survive. (They require therapy and medication. But they survive!)
[font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
Connect to me on LinkedIn
March 26, 2013 at 7:02 am
Thanks for the great question.
March 26, 2013 at 7:26 am
L' Eomot Inversé (3/26/2013)
And intensly I dislike the horrible violation of 1NF - code examples like this risk teaching really awful habits to inexperienced people who see them.
I'm very embarrassed to ask this but how does the code example violate 1NF?
March 26, 2013 at 7:54 am
kevin.l.williams (3/26/2013)
L' Eomot Inversé (3/26/2013)
And intensly I dislike the horrible violation of 1NF - code examples like this risk teaching really awful habits to inexperienced people who see them.I'm very embarrassed to ask this but how does the code example violate 1NF?
Look at the construction of the field OrderDetailID in insertion code. You'll see that the orderdetailID (a single column) is constructed as an integer which when written out in decimal notation has the detail number within the order for which it is being created in the LS three digits and the order number in the more significant digits. This violates the principle that a row contains a single atomic value in each column, never multiple values in a single column - because here we have an order number and an order detail detail number both in the same column in each row.
Tom
March 26, 2013 at 7:57 am
I think you're reading a bit too much into the code used to create some sample data, Tom. I suspect ROn used this method to eaily visualize which rows belong together, but not with any other intention.
Of course, it is indeed bad practice to form values like this and store them as single column for real data. But for some sample code, I don't object to it.
March 26, 2013 at 8:02 am
Hugo Kornelis (3/26/2013)
I think you're reading a bit too much into the code used to create some sample data, Tom. I suspect Ron used this method to easily visualize which rows belong together, but not with any other intention.Of course, it is indeed bad practice to form values like this and store them as single column for real data. But for some sample code, I don't object to it.
+1 - It's just a simple loop to generate some sample data.
March 26, 2013 at 8:14 am
Ez Pz. No got'cha in this question. Thanks!
Viewing 15 posts - 1 through 15 (of 27 total)
You must be logged in to reply to this topic. Login to reply