SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Growing Tables Horizontally by the Additon of Columns

    I am working on a survey app for a CEO (who has a degree Computer Engineering). For the part where re record the results, he is insisting that I simply add more columns to database every time someone ads more questions.

    For example.
    form1, question_answer1, quesitonanswer2, questionanswer3, ....questionanswer50, questionanswer51 etc.

    I couldn't even respond with words as I cringed and wanted to throw up mere suggestion.
    This goes against every principle of RDBMS design I have been taught.

    How do I tell him he is wrong without coming across as a jerk?

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,260
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by bruin03 View Post
    How do I tell him he is wrong without coming across as a jerk?
    by doing it his way

    especially if he's paying you

    ~especialy~ if it's by the hour

    you may, once, make a slight remark to the efffect that "this isn't the best way to do it, as it takes more effort in the long run"

    he will either show resistance to a redesign, or willingness to pursue a redesign

    you must discern his attitude, and remain forever stumm if it's resistance
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2012
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    by doing it his way

    especially if he's paying you

    ~especialy~ if it's by the hour

    you may, once, make a slight remark to the efffect that "this isn't the best way to do it, as it takes more effort in the long run"

    he will either show resistance to a redesign, or willingness to pursue a redesign

    you must discern his attitude, and remain forever stumm if it's resistance
    But wouldn't this give you a bad reputation in the event that future developers work on the site and see that messiness and remark about "the previous developer with the messed up code"?

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,260
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Pamela1991 View Post
    But wouldn't this give you a bad reputation in the event that future developers work on the site and see that messiness and remark about "the previous developer with the messed up code"?
    so i'm going to piss off my current boss just to save my reputation with some future anonymous stranger?

    really?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Zealot
    Join Date
    Mar 2012
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    so i'm going to piss off my current boss just to save my reputation with some future anonymous stranger?

    really?
    Just a question. Not trying to argue. Thanks.

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,813
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Document the code in such a way as to indicate that the weird database design was due to the specific requirements of the site owner - but do it in a way that simply explains why the code works the way it does. You'll need that as a reminder for yourself if you work on it again in a few years time so as to remind you that the owner had a requirement for it to work that way.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,260
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Pamela1991 View Post
    Just a question. Not trying to argue. Thanks.
    me neither

    especially not with the CEO
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  8. #8
    SitePoint Zealot
    Join Date
    Mar 2012
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    me neither

    especially not with the CEO
    Fair enough, and I reckon what felgall suggested is a nice neutral way to do this while saving face at the same time.

    Quote Originally Posted by felgall View Post
    Document the code in such a way as to indicate that the weird database design was due to the specific requirements of the site owner - but do it in a way that simply explains why the code works the way it does. You'll need that as a reminder for yourself if you work on it again in a few years time so as to remind you that the owner had a requirement for it to work that way.

  9. #9
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,134
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bruin03 View Post
    I am working on a survey app for a CEO (who has a degree Computer Engineering). For the part where re record the results, he is insisting that I simply add more columns to database every time someone ads more questions.

    For example.
    form1, question_answer1, quesitonanswer2, questionanswer3, ....questionanswer50, questionanswer51 etc.

    I couldn't even respond with words as I cringed and wanted to throw up mere suggestion.
    This goes against every principle of RDBMS design I have been taught.

    How do I tell him he is wrong without coming across as a jerk?
    I've been in this position a few times, and I've done a few things.

    First, if it is an existing product, I'll work up time estimates for me to alter the existing system (the way it is designed today) and I'll work up estimates that utilize a new design that fits better with best practices.

    Usually the new design is more costly up front, so to help sell it, I look to advantages of the new design, faster, better performance, better scalability, easier to maintain, etc. Some of these are intangible items, others can have true dollar values associated to them. You have to remember that your boss, CEO, etc only care about the numbers (usually). So if you can show it is better for the business and not just because you don't like how it is setup, you are more likely to succeed.

    If it is a new product, and the client is trying to identify how the design of a database should be, I back out of the project. Of course this isn't a luxury everyone has, but you will see me do it time and time again. Why? Because that is a HUGE red flag that the client will be more of a hassle than what it is worth and regardless of how well I do and if I implement their design versus a better one, he will focus purely on the negative aspects at the end.

    If the client is merely suggesting an idea from a prior estimate, that is slightly different, so long as they are open to ideas on improvement of their design or open to using a design of my own, things usually work out okay, but still isn't a best case scenario.

    Don't be afraid to present your ideas of improvement. A good boss will recognize this as a good thing, but realize that sometimes it doesn't make sense for a company to invest in a redesign, but rather keep the current product moving forward in the state it is in (comes down to the numbers), but never stop giving your ideas to your boss if it 1) leads to improvement, 2) leads to easier maintenance, 3) scales better, 4) can reduce business cost in the future, etc.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •