Star schema



  • Another team is yanking terabytes of data from our main database into a star schema for better performance while running reports. On the surface, it seems like a good idea, as the reports are run orthogonally to the way the data is organized in our tables (a new business requirement that came up long after the original application was built). Unfortunately, they put all the star schema tables in the same schema as the rest of the tables. Can you say contention? Then I dug a little deeper and found that the person who created the star schema didn't quite understand the concept:

    OurSchema.StarTable1
    OurSchema.StarTable2
    ...
    OurSchema.StarTable119

    The tables are literally prefixed with "star". There is no central table around which the other tables hang. There are 119 different tables, all interlinked with a variety of FKs; it looks exactly like our main schema.

    Sigh.



  •  I'm always interested in what happens when the culprit is confronted, but I never read about that.



  • @dhromed said:

    what happens when the culprit is confronted
    I pointed this out in an email to our respective managers. His manager was unaware of the implementation (they don't do design or code reviews on their team). My manager reply'd-all, but cc'd the database guys, and it is spreading. Right now, the latest email has 37 names on it.

    Since we're having on-going performance issues, and I've been speeding things up to the extent possible, everyone quickly realized that this would pretty much kill everything, and so it will be stopped. I'm politely pushing for a formal design session, with the existing design as justification as to why it is necessary.



  • So, why did they choose the name "star schema" if they didn't even know WTF it meant.



  • @ubersoldat said:

    So, why did they choose the name "star schema" if they didn't even know WTF it meant.



    So when someone asks what schema they are using, they can say, 'Star'. Probably someone mandated to them that they would be using a star schema, and instead of learning how to do that, they took the lazy, 'wool over the eyes', way out. I work with some people who do the same thing.



  • @ubersoldat said:

    So, why did they choose the name "star schema" if they didn't even know WTF it meant.
    After all the stories that have emanated from this place, do you really need to ask?



  • @ubersoldat said:

    So, why did they choose the name "star schema" if they didn't even know WTF it meant.
    I had a colleague whose answer to every problem was "data warehouse"...

     



  • @TGV said:

    @ubersoldat said:
    So, why did they choose the name "star schema" if they didn't even know WTF it meant.
    I had a colleague whose answer to every problem was "data warehouse"...

    I had a colleague who wanted to put a XML document in a URL param. Because XML solves every problem.



  • @blakeyrat said:

    @TGV said:
    @ubersoldat said:
    So, why did they choose the name "star schema" if they didn't even know WTF it meant.
    I had a colleague whose answer to every problem was "data warehouse"...

    I had a colleague who wanted to put a XML document in a URL param. Because XML solves every problem.

    I had a colleague who wrote code like:

    $burger = new User();
    $burger->add($ketchup);
    $burger->add($mustard);
    ...

    Or:

    $vagina = new List();
    $vagina.insert($penis);

    Where that code would be doing something like adding permissions to a user object or inserting a value into a list. He used names like that because he thought it was "funny".

    Also, he global variables for almost everything. When constructing a function call, he'd pass in about 10 parameters with the function and he'd set another 20 global variables before calling the function. Kind of arbitrary which parameters got passed by argument and which got passed by globals.

    The application had something like, I am not shitting you, 7000 global variables. And several of them were subtly different spellings of the same variable: $section_id, $SectionID, $sectionid., $sctionID At some points in the code they would have the same value, at other points they might have different values. There was never a "canonical" one you could reference to know what the actual fucking value was supposed to be--it was all dependent on where in the flow of page execution you were.

    He was hired by Yahoo!, and I think he still works there. Not only that, he was recruited by Yahoo!. They saw a patch he wrote and were so impressed they snatched him up. He quickly climbed their engineering ladder and before long I saw he was giving speeches at dev conferences and shit on proper coding.

    The day before leaving for Yahoo! he called me over to his desk. "Hey, dude, check this out" and he points to some Javascript he has open in vim. "What?" I ask. "See this line" and he points to a line that's like foo = new Bar()... "Yeah?" "See how I can create a new Bar? Instead of just having a single object, you can create new ones. Isn't Javascript awesome, man? It has so many crazy features!"

    In PHP, he only ever made a single instance of his classes. It was usually just something like a 4000 line constructor that did everything. So you'd have code like: $page = new doBuildPage(); which would kick off this constructor, which read all of its arguments from global variables, and then echo'd out a page. So apparently he never realized you could instantiate multiple objects from a class and he thought he had discovered some obscure feature that was unique to Javascript. Keep in mind, this was after Yahoo! had snatched him up, after their rigorous interview process had vetted him and they had made him an offer.

    I am not exaggerating in the slightest.


  • ♿ (Parody)

    @morbiuswilters said:

    I am not exaggerating in the slightest.

    You never do.



  • @ubersoldat said:

    So, why did they choose the name "star schema" if they didn't even know WTF it meant.

    Makes it easier to do a "select star" in SQL.



  • @morbiuswilters said:

    Please never ever tell him about Go. I do not want to see the WTFs that can come out of global variables in a persistent, concurrent http server.

    I FEAR FOR MY LIFE!



  • @morbiuswilters said:

    I had a colleague who wrote code like:

    $burger = new User();
    $burger->add($ketchup);
    $burger->add($mustard);
    ...

    Or:

    $vagina = new List();
    $vagina.insert($penis);

    Where that code would be doing something like adding permissions to a user object or inserting a value into a list. He used names like that because he thought it was "funny".

    Wow, I did similar in the very first program I ever wrote. And I looked at it again the next day and immediately learned the importance of meaningful variable names.



  • @morbiuswilters said:

    "See this line" and he points to a line that's like foo = new Bar()... "Yeah?" "See how I can create a new Bar? Instead of just having a single object, you can create new ones.
    new vagina() would have been better.



  • To be honest, I'm surprised they didn't just take the same exact tables and copy them into a new schema named Star.



    Star.People

    Star.Info

    Star.Etc




    That way you have a Star Schema with all the data for your Data Warehouse. Clearly the best way to literally adhere to the standards.



    Easy Peasy!



  • @morbiuswilters said:

    The application had something like, I am not shitting you, 7000 global variables.
     

    I'm waiting for the "herp derp php is TRWTF" but with people like this, it's sometimes hard to believe.

    People like this should  just stick to Drupal, Wordpress or Joomla because at least then, their stupidity won't comprehend how to modify code and they just won't touch it.

     



  • @captainpants said:

    People like this should  just stick to Drupal, Wordpress or Joomla because at least then, their stupidity won't comprehend how to modify code and they just won't touch it.

    As far as I'm concerned, this dude never should have been allowed near computers. Unfortunately, he was a "chief architect" (a name he gave himself) of a multi-million-dollar-per-year piece of software..



  • @captainpants said:

    People like this shouldn't just stick to Drupal, Wordpress or Joomla because at least then, their stupidity won't comprehend how to modify code and they just won't touch it. will break it horribly and subtly, complaining when the next update comes out and wipes away their vulnerability-filled changes to the runtime.

    RTFY


  • Discourse touched me in a no-no place

    @blakeyrat said:

    I had a colleague who wanted to put a XML document in a URL param. Because XML solves every problem.
    It could be worse. It could be RDF/OWL…


  • Trolleybus Mechanic

    @El_Heffe said:

    new vagina() would have been better.
     

    Eww, you sicko. Let that vagina go through a few cycles first, unless you want to get caught performing an illegal operation.



  • @morbiuswilters said:

    I had a colleague who wrote code like:
    Ok, I concede. Your colleague was way, way worse than mine. Beyond the point of being funny. Blakeyrat's is a good runner-up. Ex 'm Elle in da You are Al?

     


  • Discourse touched me in a no-no place

    @captainpants said:

    @morbiuswilters said:

    The application had something like, I am not shitting you, 7000 global variables.
     

    I'm waiting for the "herp derp php is TRWTF" but with people like this, it's sometimes hard to believe.

    Well, you know the saying "you can write shit VB in any language." (If you didn't, you do now, although I'd argue the modern incarnation should replace VB with PHP or Go or something.)


  • BINNED

    @Ben L. said:

    Please never ever tell him about Go. I do not want to see the WTFs that can come out of global variables in a persistent, concurrent http server.
    Tell him about Haskell instead. He won't be able to get anything to compile. Problem solved.



  • @morbiuswilters said:

    he was a "chief architect" (a name he gave himself)

    Chief Architect is always a title that ones give to himself. Chief Architects are not promoted, they are hand-picked by God (or his proxy if he had to go take a shit).


Log in to reply