6 ms·
If you've been programming and using SQL for a few years, it's not a problem. It might take a bit of time to get the feeling of SQL, but it's ok later. And that
by gedrap 11y ago
If you've been programming and using SQL for a few years, it's not a problem. It might take a bit of time to get the feeling of SQL, but it's ok later. And that's fine. rails-15min-blog things are cool and all, but some things have a learning curve and that's ok.
The vast vast majority of SQL in the wild is pretty straightforward and sucks only when the schema sucks (can't blame language for that). Most of the time people hate SQL, they do so because they are working with crap schema (whether someone else created it or they themselves didn't think it through enough). Sane schema + putting a bit of effort write readable SQL can go a long long way.
- snaily 11y agoGiven how quickly software engineering as a discipline moves, it's not unreasonable that most users at any given point in time (for any given library) are in those first few years. Optimizing for the "newbie" case is not a failure.
- gedrap 11y agoAbsolutely. But optimizing for the long term (and it doesn't seem like SQL is going to disappear any time soon) is not a failure either :) If a newbie asked me whether to learn MySQL/PostgreSQL, or MongoDB, I'd absolutely say *SQL. Yeah, it's not as straightforward as MongoDB. It's not intuitive for many. But this knowledge will still be useful a year, or 5 years later. Finding a job will be easier too. So, yeah, it could be better, but it's still a good, safe choice.
- jrumbut 11y agoAm I alone in finding SQL/normalized relational databases to be easier to learn? In the relational world, you can get a lot of insight into what will and won't work with simple math. There certainly are surprises in every database, but most things are not surprises. NoSQL databases tend not to leverage such a clear and complete model. You have to study each implementation to learn where the surprises are, and there are more of them. That's not to say they don't both have their role, I just wonder if people who have a little (and in my care very little) CS theory still remembered find RDBMSes easier than those who have learned development without theory.
- pessimizer 11y ago> Am I alone in finding SQL/normalized relational databases to be easier to learn? Not at all. SQL is trivial. Thinking through some joins is tricky, but it's usually because I actually underestimated how logically tricky the thing I was trying to do actually was. Optimizing queries can be very difficult, though.
- nemothekid 11y ago>If you've been programming and using SQL for a few years, it's not a problem. Years of SQL injection mitigation don't agree with you. Are you sure you just don't prefer it because you are familiar with it?
- popmystack 11y agoIt's almost as if constructing SQL queries by concatenating strings from user input is a bad idea. I don't see how using vanilla mongo in the same fashion would solve the blight you have placed on SQL.
- nemothekid 11y agoIn Mongo, `db.findOne({"username":"$_GET["name"], "password":$_GET["password"]})` won't open your database to the public. While SQL is a powerful language, the article is right. Mongo query language is useful enough to easily give application developers a place to query and store data without giving them enough rope to hang themselves.