Thread: Quick, give me a unique/challenging MySQL problem!!!!

  1. #1
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665

    Quick, give me a unique/challenging MySQL problem!!!!

    I want to learn MySQL because I want a job in programming. You think being a mesh generating boss (I finally kind of understand the Shewchuk predicates [google those, it'll blow your mind how good he is at programming]) would be enough but alas, all I know is the LAP stack and a lot of applications require MySQL specifically.

    I want to know the M part so I'm a full-fledged web guru.

    I'm reading a tutorial now so I'm seeing basic commands but these are all meaningless to me because I don't have an application.

    So, in your guys' years of experience, what were some challenges you solved with MySQL or what were complexities of the language that you encountered that were difficult? I'm trying to get a feel for how tough MySQL is, how it's used effectively, what are its shortcomings, etc.

    Or was the only hard part building the applications themselves? I can see writing complex CGI scripts or AJAX calls being difficult (thank you guys for your help on that too) but what's the big deal about MySQL?

  2. #2
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    I want to learn MySQL because I want a job in programming.
    O_o

    Great, my eyes are bleeding.

    I'm reading a tutorial now so I'm seeing basic commands but these are all meaningless to me because I don't have an application.
    The "MySQL" thing you keep referencing is just a database engine built using SQL for communication with the engine. You'll face plenty of quirks, but you'll find ways to work around all of the quirks. You are either using "MySQL" as a structured database engine or the wrong tool for the job, but using a database engine isn't actually a solution to anything any more than regular expressions.

    Do you have some structured data you need to store, search, and mutate? You might have a fit for "MySQL", but the mechanisms you use communicate and structure data is just a tool you'll be using to solve a problem which itself presents the problem of how you need to communicate and structure data.

    In other words, adding "MySQL" to an application stack just answers certain questions on the way to solving a problem. ("How do I store my data on disc for later use?") You require the application because "MySQL" is a part of the application.

    You should finish off the basic--sins and syntax--tutorials. Once you have the basics down, write an application using "MySQL" for the data.

    You could write an address book.

    You could write an inventory program.

    *shrug*

    You'll be repeating all those sorts of applications you've already written a dozen times, but you'll be using "MySQL" as a fragment of the implementation in the same way you might have learned communicating with sockets or storing data in files.

    Once you have all that done, you find a problem you want to solve. If the application benefits from what you've learned from repeating all those exercises with "MySQL", you can start worrying about designing a database for the data the solution will require. As is likely as not, you'll just be misusing the tool if you reach for "MySQL" because "web guru".

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by MutantJohn
    I'm reading a tutorial now so I'm seeing basic commands
    I won't begrudge you learning the syntax of MySQL's SQL dialect and such because you will need it to directly use MySQL after all, but perhaps you should also look into database design, like the notion of the entity-relationship model and database normalisation.

    Quote Originally Posted by phantomotap
    You'll face plenty of quirks, but you'll find ways to work around all of the quirks.
    It has its own quirks, but does using PostgreSQL instead count as a work around?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    It has its own quirks, but does using PostgreSQL instead count as a work around?
    ^_^

    That's is the solution I recommend.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  5. #5
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Yeah, I've mellowed out a tad now and I'm starting to read the wikiepdia entries on DBMS models. I just don't get why I see MySQL/SQL so freaking much on job applications. Like, that's the only thing they care about nowadays.

    Maybe I'm just looking at the wrong jobs...

  6. #6
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    I tried to think of a good problem, maybe something related to user authentication and access control using encrypted passwords (ROT-13, of course), but I suddenly got an idea for a new phone app instead and got diverted.

    Now that phones have pretty good graphics capabilities and refresh rates, an app that flashes full-screen advertisements but only for one frame, would be the phone carriers wet dream. Just think of the monetization possibilities! Perhaps use the front camera, too, to track the users face, for picking the best moment to flash the provided content. If the camera resolution is good enough, you could track their eyes for optimal timing; for large logos, peripheral vision works best. The content doesn't need to be opaque, replacing the entire view; it could also be something like an emboss effect with tinting.

    Oh, yes.

    I wonder why no-one has named their SQL engine "Deliverance" yet.

  7. #7
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    Yeah, I've mellowed out a tad now and I'm starting to read the wikiepdia entries on DBMS models. I just don't get why I see MySQL/SQL so freaking much on job applications. Like, that's the only thing they care about nowadays.
    [Edit]*sigh*[/Edit]

    O_o

    You might should learn from cynical jerk. When you see more than two or three experience requirements, the requirements are either largely fictional (You should apply anyway on the strength of your skill in the requirements that seem reasonable for the position.) or the role is a temporary clus******k (You don't want such a job unless you are desperate.) that exists solely to fill multiple roles in a heavy scramble to match an impossible milestone. Sure, a lot of web jobs usually invoke "five years experience administering databases"; if you looked hard at many of those roles, they actually just want someone competent enough to play seconds on "Drupal" without typing "drop *" or similar.

    Soma
    Last edited by phantomotap; 04-08-2015 at 12:35 PM. Reason: weakhoshi
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  8. #8
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by MutantJohn
    I just don't get why I see MySQL/SQL so freaking much on job applications. Like, that's the only thing they care about nowadays.
    Just a few years ago "NoSQL" databases were all the rage.

    I think learning the fundamentals of relational database design is a good skill to have in the long term. Learning basic SQL syntax to do CRUD operations and joins will be a good background to have. Beyond that, if you need to know more should you get stuck, you can always read the documentation and search the Web. Besides, you might end up using a framework with its own database abstraction layer, in which case you might not even dip into SQL at all, and maybe the database tables will get generated from classes in your code, or even from some kind of alternative method of specifying the schema.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  9. #9
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    877
    Quote Originally Posted by phantomotap View Post
    [Edit]*sigh*[/Edit]

    O_o

    You might should learn from cynical jerk. When you see more than two or three experience requirements, the requirements are either largely fictional (You should apply anyway on the strength of your skill in the requirements that seem reasonable for the position.)
    Soma
    Is it a "we can hire you for cheaper, because you don't meet all the 'requirements'" thing? I remember reading an article that this was a trend with employers, where they put higher requirements on entry positions for that reason.
    WndProc = (2[b] || !(2[b])) ? SufferNobly : TakeArms;

  10. #10
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by laserlight View Post
    Just a few years ago "NoSQL" databases were all the rage.
    They still are. You take a look a tech books being released since the last 2 years, or the developments in new DBMS, and you'd think SQL has been deprecated. Like everyone in the industry is now developing Big Data applications. Only no one really is because Big Data is still largely a niche development area. As it should.

    Of course, there will always be someone who confuses database size with NoSQL. Big Data is an an unfortunate choice for a term, it seems. And it doesn't help that the blogging idiots in the industry rage on about MongDB, Cassandra, Riak, or HBase and the often misquoted Hadoop, without providing any context at all as to what really means to be using NoSQL storage models, beyond that of the number of records.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  11. #11
    Registered User
    Join Date
    Mar 2015
    Location
    BE
    Posts
    66
    Good answer, laserlight.
    Try learn the theories how to design structures from available information. This is good one. After that: go and check an existing database to see if it's well designed or not, and if it is not the case, reconstruct it without loosing a byte of info.

  12. #12
    Registered User MacNilly's Avatar
    Join Date
    Oct 2005
    Location
    CA, USA
    Posts
    466
    Quote Originally Posted by Mario F. View Post
    They still are. You take a look a tech books being released since the last 2 years, or the developments in new DBMS, and you'd think SQL has been deprecated. Like everyone in the industry is now developing Big Data applications. Only no one really is because Big Data is still largely a niche development area. As it should.

    Of course, there will always be someone who confuses database size with NoSQL. Big Data is an an unfortunate choice for a term, it seems. And it doesn't help that the blogging idiots in the industry rage on about MongDB, Cassandra, Riak, or HBase and the often misquoted Hadoop, without providing any context at all as to what really means to be using NoSQL storage models, beyond that of the number of records.
    To me SQL is just a language to describe data thats in a relational model -- whether that data is stored binary, XML, or JSON doesn't matter, except for the efficiency. I dont see any benefit of the whole "NoSQL" thing, except that maybe people just hate learning about RDBMs and SQL -- its a heck of a lot earier to use JSON.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 04-09-2012, 07:54 PM
  2. Challenging Problem
    By gamx in forum C Programming
    Replies: 1
    Last Post: 05-26-2008, 10:59 AM
  3. Challenging and Interesting Problem & Doubt
    By crazymoonboy in forum Linux Programming
    Replies: 2
    Last Post: 01-23-2006, 03:51 AM
  4. MySQL - Quick Questions
    By sean in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 09-01-2003, 09:40 AM