T-shirt artwork for the DB administrator



  • A colleague has turned up to work with the following on his T-shirt:

    SELECT * FROM users WHERE clue > 0

    0 rows returned



  • I bet he has to beat the ladies off with a clue stick.



  • As seen in Think Geek!


  • 🚽 Regular

    ThinkGeek should include a disclaimer: Unkempt beard and ego not included.



  • He forgot the using statement

     using RealWorld



  • [quote user="Renan "C#" Sousa"]As seen in Think Geek![/quote] My favorite two shirts on there: 1) the one that threatens to replace the user with a very small shell script if they don't go away; 2) the one where a dead user is strangled with a phone cord and hung from the ceiling, with the acronym PEBKAC (problem exists between keyboard and chair).





  • @Matt Westwood said:

    A colleague has turned up to work with the following on his T-shirt:

    > SELECT * FROM users WHERE clue > 0

    0 rows returned

    Why would clue be an integer? What would that represent? Seems like poor database design. Should probably be something more like

    
    SELECT u.* 
    FROM users AS u
        INNER JOIN user_clue_lnk AS uc ON u.user_id = uc.user_id
    WHERE COUNT(uc.*) > 0
    
    

    Sheesh, doesn't anyone care about normalization?


  • Trolleybus Mechanic

    @toth said:

    @Matt Westwood said:


    > SELECT * FROM users WHERE clue > 0

    0 rows returned

    Why would clue be an integer?

     

    "a clue" can be an atomic unit. Alternatively, it could be a float, but clue > 0 and clue > 0.0 are the same. I don't know if it is signed or not, but people without a clue, and people with less than no clue are treated the same.

     @Matt Westwood said:

    What would that represent? Seems like poor database design. Should probably be something more like

    
    SELECT u.* 
    FROM users AS u
        INNER JOIN user_clue_lnk AS uc ON u.user_id = uc.user_id
    WHERE COUNT(uc.*) > 0
    
    

    Sheesh, doesn't anyone care about normalization?

     

    * makes normalized Baby Jesus cry. Also, COUNT goes in a Having clause.

    Also, also, if you do an INNER JOIN, then your COUNT is completely redundant.  If a user isn't in the user_clue_lnk, then they'll be eliminated by the INNER JOIN

    Futher, just couting the number of records in the Clue Link table probably won't help, since they may in turn contain either a zero-value clue, or a postive-negative pair that cancel each other out.

     

    SELECT u.*
    FROM users AS u
    INNER JOIN user_clue_lnk AS uc ON u.user_id = uc.user_id
    -- OR
    SELECT u.*
    FROM users u
    INNER JOIN
    (
    SELECT uc.id
    FROM user_clue_lnk AS uc
    HAVING SUM(uc.clue_value) > 0
    GROUP BY uc.id
    ) uc



  • @Lorne Kates said:

    Also, also, if you do an INNER JOIN, then your COUNT is completely redundant.  If a user isn't in the user_clue_lnk, then they'll be eliminated by the INNER JOIN

    Good point.

    @Lorne Kates said:

    Futher, just couting the number of records in the Clue Link table probably won't help, since they may in turn contain either a zero-value clue, or a postive-negative pair that cancel each other out.

    Is a zero-value clue not a clue? Why is a clue being treated as a numeric type? Granted, the problem is somewhat ill-defined, as a clue might be a simple primitive type or a more complex record.



  • @Lorne Kates said:

    people with less than no clue
    omg... negative clue. Gotta love the concept.


  • 🚽 Regular

    @toth said:

    Is a zero-value clue not a clue? Why is a clue being treated as a numeric type? Granted, the problem is somewhat ill-defined, as a clue might be a simple primitive type or a more complex record.
     

    It could be binary (you either have a clue or you do not). If it's a database that doesn't have a binary type, it could just be a tinyint or something. Granted, using the greater-than operator is kinda awkward in that case.



  • @RHuckster said:

    @toth said:

    Is a zero-value clue not a clue? Why is a clue being treated as a numeric type? Granted, the problem is somewhat ill-defined, as a clue might be a simple primitive type or a more complex record.
     

    It could be binary (you either have a clue or you do not). If it's a database that doesn't have a binary type, it could just be a tinyint or something. Granted, using the greater-than operator is kinda awkward in that case.

    In that case, shouldn't the query be

    
    SELECT * FROM users WHERE has_clue = 1
    
    
    ?

    I mean, I guess that could be basically what the original was doing, but if so, then yikes--I cringe at a boolean column not being given a boolean name (e.g. is_, has_).



  • @RHuckster said:

    It could be binary
    Null bitfields cause data type mismatches when linked to Access databases.  I learned this the hard way.



  • Rather than a scalar, perhaps clue is actually a foreign key to a many-to-many clue table. To avoid nulls messing up the queries, the zeroth clue is a special record that contains no children. I would recommend writing it "clue != 0" rather than "clue > 0", but if the ID is never negative, then the two statements will behave the same way. Or maybe there are some negative IDs for other special purposes. Not sure if that's a bad idea, but I've done it before.



  • This thread makes me sad.



  • Do you guys take classes on how to ruin jokes, or is it something you're born with?



  • @blakeyrat said:

    Do you guys take classes on how to ruin jokes, or is it something you're born with?

    I think that they don't have a clue.



  • @serguey123 said:

    @blakeyrat said:

    Do you guys take classes on how to ruin jokes, or is it something you're born with?

    I think that they don't have a clue.

    Maybe they're the ones who wrote that Oracle FAQ "humor" page.



  • @serguey123 said:

    This thread makes me sad.

    Getting email updates on this thread makes me angry.



  • @blakeyrat said:

    Do you guys take classes on how to ruin jokes, or is it something you're born with?

    We're using our imagination and playing along! Why won't you play along with us? It's fun!



  • @Xyro said:

    @blakeyrat said:
    Do you guys take classes on how to ruin jokes, or is it something you're born with?
    We're using our imagination and playing along! Why won't you play along with us? It's fun!

    No it is not fun and the fact that you think it is makes me want to kill you slowly with basketballs.



  • @serguey123 said:

    No it is not fun and the fact that you think it is makes me want to kill you slowly with basketballs.
    I must have been doing something wrong, because I've never found a fast way to kill someone with basketballs - do tell.



  • @intertravel said:

    I must have been doing something wrong, because I've never found a fast way to kill someone with basketballs - do tell.
     

    You could crush them in an avalanche of basket balls.



  • @locallunatic said:

    @intertravel said:
    I must have been doing something wrong, because I've never found a fast way to kill someone with basketballs - do tell.
    You could crush them in an avalanche of basket balls.
    For the slow kill, you force the basketball down the throat with pump hose attached, and then slowly inflate.

     



  • @locallunatic said:

    @intertravel said:

    I must have been doing something wrong, because I've never found a fast way to kill someone with basketballs - do tell.
     

    You could crush them in an avalanche of basket balls.

    Or they could have spikes and/or be very heavy to crush enemies or be doused in nerve poison, etc.



  • @serguey123 said:

    @locallunatic said:

    @intertravel said:

    I must have been doing something wrong, because I've never found a fast way to kill someone with basketballs - do tell.
     

    You could crush them in an avalanche of basket balls.

    Or they could have spikes and/or be very heavy to crush enemies or be doused in nerve poison, etc.

    LOL but think about the SQL data structure required for that you should always make sure your bit fields start with "is_a" or "has_a" or your naming structure for your spiked basketball avalanche is going to get confusing also if you do an inner join the where clause becomes unnecessary for maximum basketball hilarity



  • @blakeyrat said:

    Do you guys take classes on how to ruin jokes, or is it something you're born with?

    No kidding. If you're going to ruin a joke, at least ruin the good ones.



  • @toth said:

    @Matt Westwood said:
    A colleague has turned up to work with the following on his T-shirt:

    > SELECT * FROM users WHERE clue > 0
    0 rows returned

    Why would clue be an integer? What would that represent? Seems like poor database design. Should probably be something more like

    
    SELECT u.* 
    FROM users AS u
        INNER JOIN user_clue_lnk AS uc ON u.user_id = uc.user_id
    WHERE COUNT(uc.*) > 0
    
    

    Sheesh, doesn't anyone care about normalization?

    Am I the only one who cries at the idea of a database table named "user_clue_lnk"?


  • Trolleybus Mechanic

    @Sutherlands said:


    Am I the only one who cries at the idea of a database table named "user_clue_lnk"?

     

    We've seen to it that everything about this thead causes tears.



  • mysql> SELECT * FROM users WHERE clue > 0
        -> _

    Maybe mysql is the only database client that requires statements on the command line be terminated with ";" …



  • @Daniel Beardsmore said:

    <span style="text-decoration: blink;">_</span>
    On the one hand this works, and on the other hand it expresses perfectly how I feel about knowing blinking text is still possible.

    >_<



  • @Zecc said:

    @Daniel Beardsmore said:

    <span style="text-decoration: blink;">_</span>
    On the one hand this works, and on the other hand it expresses perfectly how I feel about knowing blinking text is still possible.

    >_<

    Quoted for awesomeness.



  • @derula said:

    @Zecc said:

    @Daniel Beardsmore said:

    <span style="text-decoration: blink;">_</span>
    On the one hand this works, and on the other hand it expresses perfectly how I feel about knowing blinking text is still possible.

    >_<

    Quoted for awesomeness.

    BTFY.



  • @Daniel Beardsmore said:

    @derula said:
    @Zecc said:

    @Daniel Beardsmore said:

    <span style="text-decoration: blink;">_</span>
    On the one hand this works, and on the other hand it expresses perfectly how I feel about knowing blinking text is still possible.

    >_<

    Quoted for awesomeness.

    BTFY.

     

    QFATD

     


  • Trolleybus Mechanic

    @Zecc said:

    @Daniel Beardsmore said:

    <span style="text-decoration: blink;">_</span>
    On the one hand this works, and on the other hand it expresses perfectly how I feel about knowing blinking text is still possible.

    >_<

     

    browser.blink_allowed = false



  • @blakeyrat said:

    Do you guys take classes on how to ruin jokes, or is it something you're born with?
     

    Haven't you learnt by now not to tell jokes to engineers?



  • @blakeyrat said:

    Do you guys take classes on how to ruin jokes, or is it something you're born with?

    It runs in my family. My father was a joke ruiner, as was his father, and his father before him.


  • Trolleybus Mechanic

    @toth said:

    @blakeyrat said:
    Do you guys take classes on how to ruin jokes, or is it something you're born with?

    It runs in my family. My father was a joke ruiner, as was his father, and his father before him.

     

    That doesn't make any sense. Joke ruining is x-linked dominant.  Your father and grandfather may have been joke ruiners, but you didn't get it from them. For your scenerio to be true, both your mother and your paternal grandmother had to have been at least carriers-- and your grandfather's parents would have one or both have to have been joke ruiners.

    The odds of all that happening are unlikely at best, without even factoring in the confounding variable of how hard it is to get a joke ruiner to reproduce in the first place.

    You obviously haven't thought this through. Why would you post this to the Internet if you haven't thought this through? Why?



  • @Lorne Kates said:

    @Zecc said:

    @Daniel Beardsmore said:

    <span style="text-decoration: blink;">_</span>
    On the one hand this works, and on the other hand it expresses perfectly how I feel about knowing blinking text is still possible.

    >_<

     

    browser.blink_allowed = false

     

    I may be the only one who actually leaves this on in Firefox.

    If someone actually uses a blink tag on a serious web page in 2011, I need to know about it so that it can appropriately bias my opinion of that person.


  • @Lorne Kates said:

    You obviously haven't thought this through. Why would you post this to the Internet if you haven't thought this through? Why?
     

    WHAT ARE YOU DOING

    WHY ARE YOU DOING IT



  • @Someone You Know said:

    I may be the only one who actually leaves this on in Firefox.

    Yes, because every other human being who downloads Firefox (millions of them) immediately goes into all the settings and changes every single one to their personal preference. Oh, and I don't just mean the ones accessible in the GUI... I mean that "about:config" list that's about 3 miles long as well. It takes hours, days for some of the less savvy who have to look stuff up, but everybody does it.

    THE PRECEDING PARAGRAPH MIGHT CONTAIN SARCASM



  • @Lorne Kates said:

    That doesn't make any sense. Joke ruining is x-linked dominant.  Your father and grandfather may have been joke ruiners, but you didn't get it from them. For your scenerio to be true, both your mother and your paternal grandmother had to have been at least carriers-- and your grandfather's parents would have one or both have to have been joke ruiners.

    The odds of all that happening are unlikely at best, without even factoring in the confounding variable of how hard it is to get a joke ruiner to reproduce in the first place.

    You obviously haven't thought this through. Why would you post this to the Internet if you haven't thought this through? Why?

    You're not taking into account the affinity that joke-ruiners have for one another, nor of the environmental impact on father joke-ruiners. While you are correct in saying that generations of male joke-ruiners is rather unusual, it's not significantly more unusual than for a joke-ruiner to reproduce in the first place. That is, while the probability of a male joke-ruiner to find a compatible female is low (something in the low twenties IIRC, but I'm not sure if that's a worldwide stat or just for America), if he does find one, the odds are very high that she is either a joke-ruiner herself or a carrier (and thus likely tolerates the joke-ruiner having most likely been raised by one). Last time I read about it was a while ago, but if memory serves, there's something like an 80% chance that a woman partnering with a joke-ruiner is herself at least a carrier.

    So while 1) joke-ruiner genes are relatively uncommon, and 2) they rarely propagate, when they do there is a normal 1/4 chance of passing on the genes to offspring. The activation of the genes has been shown to be influenced by environmental factors in the formative years, so being raised by a joke-ruining father increases the odds of the son being a joke-ruiner, even if the genes didn't come from him. While all this isn't especially common of course, it isn't as unlikely as you may suspect if all you knew were the individual probabilities.


    (There's a term for that, when individual probabilities don't just multiply together because they're influenced by the same factors, but for the life of me I can't recall the word...)



  • @blakeyrat said:

    THE PRECEDING PARAGRAPH MIGHT CONTAIN SARCASM
    It exists, doesn't it? 'May', not 'might'.



  • @intertravel said:

    @blakeyrat said:
    THE PRECEDING PARAGRAPH MIGHT CONTAIN SARCASM
    It exists, doesn't it? 'May', not 'might'.

    Die in a fire.

    THE PRECEDING PARAGRAPH MIGHT CONTAIN DEATH THREATS


  • 🚽 Regular

    @Xyro said:

    You're not taking into account the affinity that joke-ruiners have for one another, nor of the environmental impact on father joke-ruiners. While you are correct in saying that generations of male joke-ruiners is rather unusual, it's not significantly more unusual than for a joke-ruiner to reproduce in the first place. That is, while the probability of a male joke-ruiner to find a compatible female is low (something in the low twenties IIRC, but I'm not sure if that's a worldwide stat or just for America), if he does find one, the odds are very high that she is either a joke-ruiner herself or a carrier (and thus likely tolerates the joke-ruiner having most likely been raised by one). Last time I read about it was a while ago, but if memory serves, there's something like an 80% chance that a woman partnering with a joke-ruiner is herself at least a carrier.

    So while 1) joke-ruiner genes are relatively uncommon, and 2) they rarely propagate, when they do there is a normal 1/4 chance of passing on the genes to offspring. The activation of the genes has been shown to be influenced by environmental factors in the formative years, so being raised by a joke-ruining father increases the odds of the son being a joke-ruiner, even if the genes didn't come from him. While all this isn't especially common of course, it isn't as unlikely as you may suspect if all you knew were the individual probabilities.


    (There's a term for that, when individual probabilities don't just multiply together because they're influenced by the same factors, but for the life of me I can't recall the word...)

    Joke ruiners also ironically ruin the jokes [i]about[/i] joke ruiners. This more or less makes them invulnerable to the stigma other negative personality traits often have.



  • @RHuckster said:

    Joke ruiners also ironically ruin the jokes about joke ruiners. This more or less makes them invulnerable to the stigma other negative personality traits often have.

    I still say murder is the answer.



  • @blakeyrat said:

    @Someone You Know said:
    I may be the only one who actually leaves this on in Firefox.

    Yes, because every other human being who downloads Firefox (millions of them) immediately goes into all the settings and changes every single one to their personal preference. Oh, and I don't just mean the ones accessible in the GUI... I mean that "about:config" list that's about 3 miles long as well. It takes hours, days for some of the less savvy who have to look stuff up, but everybody does it.

    THE PRECEDING PARAGRAPH MIGHT CONTAIN SARCASM

    I may be one of the only two people who leave this on after having learned of it, for the same reasoning as the one given above by someone I barely know.
    Of course, anyone serious about blinking annoying stuff uses animated GIFs.


  • @blakeyrat said:

    @Someone You Know said:
    I may be the only one who actually leaves this on in Firefox.

    Yes, because every other human being who downloads Firefox (millions of them) immediately goes into all the settings and changes every single one to their personal preference. Oh, and I don't just mean the ones accessible in the GUI... I mean that "about:config" list that's about 3 miles long as well. It takes hours, days for some of the less savvy who have to look stuff up, but everybody does it.

    THE PRECEDING PARAGRAPH MIGHT CONTAIN SARCASM

     

    Eat me.

    THE PRECEDING PARAGRAPH MIGHT ADVOCATE CANNIBALISM



  • @Someone You Know said:

    THE PRECEDING PARAGRAPH MIGHT ADVOCATE CANNIBALISM
     

    Hmm, would that be endo- or exo- cannibalism?   I mean you are both members of these forums so I guess you could be considered members of the same group, but on the other hand due to the rest of the exchange I don't think it has the same cultural trappings.


Log in to reply