T-Sql rant

  • Sheesh!

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Lynn Pettis (3/16/2009)


    I am not sure if anyone else feels this way, but I won't be hurt if Steve closed this thread.

    I'm right with you Lynn!

    The issues currently discussed do deserve a better place - THE THREAD 😀

    The post the thread was started with seems to end up in a merry-go-round: the OP and a few "others" (or just aka's?) keep continue the same statements regardless of what others stated - just getting more and more insulting step by step.

    On the other side (which isn't the Dark one) there are people who almost constantly try to help him. Unfortunately, without any success...

    I wouldn't consider this a surrender. It's more focussing on the important stuff...

    I'm outta here!



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • You guys are starting to knock rings about that and that's not right.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • About what, Jeff?

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Knock rings about what? (This is not a sarcastic question, Jeff.)

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • steve dassin (3/16/2009)


    Gift Peddie (3/15/2009)


    Science is a b****, expediency is a w*****. It's not easy to sleep with science. But sql sells itself to even the lowest bidder. It's been screwing developers forever But sql experts know of what they speak. There is a certain quality to expediency. The seduction by the **** makes the **** easy to forget.

    Vulgar crass and tasteless. I am a woman and I find your post very offensive.

    There you'll find the relational model wedded to the idea of an object oriented language. There's no mismatch here. A table is simply another type. A relational algebra is embedded in a imperative language that is OO.

    That is very wrong because all the object databases failed because they decided to skip the algebra, the words of Oracle's Jim Melton not mine. I have seen many developers trying to move to 64bits in most cases their application is missing DAL and relational model.

    Rather than engage you in a full blown dialogue of just why you found the paragraph so objectionable you have my regret that I misjudged the maturity level of some readers here. I assume you were offended by my choice of metaphor(s). But I hasten to add that while your sensibilities went tilt you mentioned nothing about the point it was intended to make. I acknowledge that for some how you make a point, really how antiseptic (PC) you can be, is more important that the point itself. In any event, perhaps you'll entertain the idea that discretion has its own rewards. If you can see fit to ignore me I will see fit not to worry about offending you (and you and you too). And that way both of us can prevent the moderator, a mature fellow IMHO, from finding himself in a very awkward position. While my sympathies do not really lie with the devil, nor do they gravitate to snow white and the several dwarfs. Style counts. A mature style counts even more.

    If you're still with me let me clarify that Dataphor is not an OO database like Hibernate of even Linq/Entity framework. We're talking apples and oranges here. The relational algebra (ie. all algebra and relational operators) exist within an imperative framework, here a table exists as a type (just like an integer). There is no failure here as relations (and their declarative manipulation) live within the framework, my words not his.

    To see for yourself visit my blog (for explanations and examples) or check out the system documentation (chm file):

    http://www.geocities.com/d4tosql/D4/Dataphor.zip

    Better yet I invite you to download the entire system and get a feel for what its like to develop with a truly relational system:

    http://databaseconsultinggroup.com/downloads/[/url]

    (get version 2711)

    Think of Dataphor as the gift that keeps on giving.

    www.beyondsql.blogspot.com

    Arrogance and poor manners will merely reduce the possibility of convincing anyone to your point.

    Regardless of language, I have to disagree with comparison between science and expedience. It is a false premise. Science makes things more expedient, not less. Or do you really think that flying in a 747 is a less expedient way to cross the Pacific than swimming?

    Since the initial premise is provably false, or provably misstated, the rest of the argument collapses. Even if one filters out the immaturity, poor manners and arrogance.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Bob Hovious (3/17/2009)


    Knock rings about what? (This is not a sarcastic question, Jeff.)

    The Thread... if you want it to be a good place to meet for those that care (I do), stop advertising it on these rant threads or you might get some unexpected/unwanted guests at the watercooler. It's also impolite to talk about the "club" in front of others if you don't want them to actually show up. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • foxjazz (3/13/2009) also instead of using cursurs like they are now, wouldn't it be easier to say:

    foreach( select myfield from tbl where myotherfield > 3)

    {

    insert into myothertable (myotherfield) values (myfield)

    }

    are you guys living in the cage of t-sql? :)))

    I think it would be easier if this were the case. No GSquared, I like t-sql, but I think it could easily be made a lot more powerful if the t-sql guys would have just get off their asses and did something significant.

    The core concept of a database is to work with SETS instead with a list of individual records.

    The complaint about a foreach loop amply demonstrate you have not grasped the basic concept. There are very few occasions where a row-by-row approach is justified. And even then cursors remain available for these very rare occasions. If loops are, in your opinion, more complicated than a foreach loop, then GOOD. This kind line-by-line mentality must be discouraged.

    For instance, I thought that Running Totals were one of the justifications for using cursors. Then I had the good fortune on stumbling upon this great article by Jeff Moden For Running Totals at http://qa.sqlservercentral.com/articles/Advanced+Querying/61716/.

    So, snap out of the procedural languages like C or whatever. Adapt to SQL and more importantly, break out of your own cage and deal with SETS. You seriously need to adopt a new thought process so that you can avoid loops unless absolutely necessary. The best way to learn is to examine code by Jeff Moden and others. This is easily available.

    This rants makes just about as much sense as an article where a Fortran programmer who migrated to C published his routine to convert C syntax into Fortran-like syntax so he would be more comfortable staying within the Fortran context. The rebuttal came fast and strong. You either migrated to C outright, with its syntax, or stayed in Fortran. For anyone accustomed to C programming they would then be at a serious disadvantage seeing Fortran-like syntax if their experience did not include Fortran. Not to mention the significant overhead and performance cost.

    If you absolutely need to C-like syntax, then SS2K5 allows you to program in C# using the Common Language Runtime.

    And the explanation to the effect that having to write DECLARE ... to create a variable is entirely not convincing. As for your claim that curly brace are superior to BEGIN...END, well about APL which allowed to invert a matrix in a single line of code. Great for writing write-only code.

    Seriously, give up on your wish that it could easily be made a lot more powerful if the t-sql guys would have just get off their asses . SQL is an established standard and it is totally unrealistic to expect that it would ever be turned upside down.

  • Point taken, Jeff.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Steve Dassin,

    I haven't complained about the advertising of your product because it's free, and because you've only mentioned it in places where you appear to believe it fits the conversation. you're welcome to start a thread somewhere and debate it.

    Language matters. The language you used offended people (not me), so I censored it for that reason. It's not a question of maturity to be offended by your choice of words. It's simply a question of attitude and feelings. Please choose different metaphors.

  • Most of the time when using cursors, it isn't to go through lots of records, but just a few at a time

    This kind of justification inevitably leads to a database which does not scale well. Unless you are absolutely certain that your design will NEVER EVER need to accommodate a much higher number of records, your design approach is limited short-time vision. DOS was limited to handling 640 kBytes of RAM, a fact that many soon found overly restrictive. Talk about foresight.

    Also, calling Lynn "dense" is unacceptable. If this is your way of handling opinions running against yours, I would hate having to work with you.

    On top of that, Lynn runs circles around you. Show proper respect for her experience.

    Finally, if you do a lot of T-SQL, you should already have adopted the concept of working with sets instead on the non-database approach of working on a single record at a time.

  • J (3/17/2009)


    Most of the time when using cursors, it isn't to go through lots of records, but just a few at a time

    This kind of justification inevitably leads to a database which does not scale well. Unless you are absolutely certain that your design will NEVER EVER need to accommodate a much higher number of records, your design approach is limited short-time vision. DOS was limited to handling 640 kBytes of RAM, a fact that many soon found overly restrictive. Talk about foresight.

    Also, calling Lynn "dense" is unacceptable. If this is your way of handling opinions running against yours, I would hate having to work with you.

    On top of that, Lynn runs circles around you. Show proper respect for HIS experience.

    Finally, if you do a lot of T-SQL, you should already have adopted the concept of working with sets instead on the non-database approach of working on a single record at a time.

    Sorry, had to make a slight correction, emphasis is mine.

  • By foxjazz - 3/14/2009 11:18 PM

    Ok, yes I did it that way before. Except you have to do it in 4 distinct query sets, and link the first results to the other set, and so on.

    The first two "queries", such as:

    insert into @categories

    select 'Pontiac', 1001, 1, 1 union all

    select 'GTO', 1002, 2, 1 union all

    select '1969', 1003, 3, 1 union all

    select '400 V8 RamAir',1004,4,1

    Is simply there to fill the tables you want to work with.

    What you have is example of properly posting code: table definition and insertion of data to allow testing a solution.

    And the last two queries allows to print the contents of each table.

    By the way, just how many SELECTs does your code result in? Hint: how many times does the loop run.

  • [/quoteBy foxjazz - 2 days ago @ 2:48 AM

    Do any of you know a language other than English? Spanish, as a second or German?

    Because using English is dominant, I struggle with German as a second. I can use it, but why should I be made to use it?

    I personally am highly familiar with t-sql, but do most of my stuff in c#. Why am I forced to write in this other language [/quote]

    This is the most ridiculous you have made so far.

    Try going to visit Germany with this attitude of deliberately refusing to speak anything else than English.

    And Yes, I am fluent in French, learned English and working on Spanish and Italian. German will follow.

    So when you encounter someone who does not speak English do you berate that person by saying something like "speak white"?

    The simple expectation on your part that everyone must speak in the only language you are comfortable with speaks volumes of your inability to accept a new programming language better suited for a database application. Despite your claims to be highly familiar with T-SQL when you are still clinging to using cursors as your first - and only - approach clearly shows that you are in fact struggling with T-SQL despite your claims.

    Several contributors to this forum have shown you a better way to do it People with considerably more experience and understanding of databases than yours.

  • And I thought I was the only one who had to see the bottom of the potato chip package...

    "Hey man I can kick it anytime I want."

    I just kept reading on to see if the guy would see the light but I seriously doubt it will ever occur.

Viewing 15 posts - 166 through 180 (of 465 total)

You must be logged in to reply to this topic. Login to reply