Slashdot Mirror


SQL and NoSQL are Two Sides of the Same Coin

An anonymous reader writes "NoSQL databases have become a hot topic with their promise to solve the problem of distilling valuable information and business insight from big data in a scalable and programmer-friendly way. Microsoft researchers Erik Meijer and Gavin Bierman ... present a mathematical model and standardized query language that could be used to unify SQL and NoSQL data models." Unify is not quite correct; the article shows that relational SQL and key-value NoSQL models are mathematically dual, and provides a monadic query language for what they have coined coSQL.

259 comments

  1. microsoft research rocks by JonySuede · · Score: 2

    microsoft research rocks but the product division usually sucks !

    --
    Jehovah be praised, Oracle was not selected
    1. Re:microsoft research rocks by jbolden · · Score: 1

      I agree. Their research division is amazing. If they implemented 10% of what came out of their research division they would have the coolest sites around.

    2. Re:microsoft research rocks by Draek · · Score: 2

      No, just their software. Their mice and keyboards are second to none, and I know more than a few gamers that wouldn't touch an X360 with a ten-foot pole but still keep one of its controllers plugged in their PCs.

      --
      No problem is insoluble in all conceivable circumstances.
    3. Re:microsoft research rocks by Anonymous Coward · · Score: 0

      microsoft research rocks

      orly? that paper is full of fail.

    4. Re:microsoft research rocks by nschubach · · Score: 1

      I've loved my Logitech mice/keyboards way more than any MS hardware. (I think there was even a point early on when Logitech made MS mice?)

      Also, wouldn't touch a 360, nor the controller.

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
    5. Re:microsoft research rocks by CastrTroy · · Score: 1

      Obligatory Penny Arcade. The original XBox controllers were terrible.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    6. Re:microsoft research rocks by aiht · · Score: 1

      Their mice and keyboards are second to none

      Does that mean they have finally fixed the decades-old problem where their mice occasionally send a spurious scroll-wheel event for no reason?
      Because seriously, that's a deal-breaker for me.

    7. Re:microsoft research rocks by alexhard · · Score: 0

      You are an insane person. I know your mind fights against this concept, but it is the truth. You are insane, and you should seek medical help as quickly as you can.

      Microsoft hardware is amazingly bad. They make no mechanical keyboards, so that immediately puts them out of the top ~20 or so keyboard makers. As for the mice...they're more of a practical joke than actual pointing devices.

      --
      Infinite time means everything that can happen, will. You being you is absolutely incidental. You do not exist.
    8. Re:microsoft research rocks by smash · · Score: 1

      10 years ago I'd agree. They've really picked up their game in the past 5 years though.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    9. Re:microsoft research rocks by smash · · Score: 1

      Having used MS mice on and off since 1992, i've never seen this happen?

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    10. Re:microsoft research rocks by Anonymous Coward · · Score: 0

      Wow, really? I guess that completely invalidates his story about other people that aren't you....... oh, wait.

    11. Re:microsoft research rocks by davester666 · · Score: 1

      They do. Unfortunately, it's stuff that doesn't make you say "That's X." where X can be replaced with:

      good
      cool
      works as I expected
      works as I would like

      --
      Sleep your way to a whiter smile...date a dentist!
    12. Re:microsoft research rocks by constpointertoconst · · Score: 1

      Yep. I swear by my MS "Wheel Mouse Optical"s and 360 controllers... But will probably never own a 360 console. MS keyboards aren't so hot though - I'll use BTC 6300s until there aren't any left.

      I also find it interesting that I'd probably choose those three despite price, but the mouse and keyboard are very much on the low end of the price range, and the 360 controller isn't too bad either.

    13. Re:microsoft research rocks by Anonymous Coward · · Score: 0

      No they don't... MS managed to screw up the location of the '6' key on their natural keyboard: it only works for touch-typists using the very old method of hitting the '6' with the left hand. It was never the only method to touch type and nowadays anyway people are nearly always taught to touchtype using their right hand to type the '6'. To accomodate for that snafu, there are some great keyboard which do offer the '6' key on both part of the split keyboard.

      Doing it the way MS did it is lame and pathetic.

      In addition to that, the MS keyboards are all rubber domes and I suggest you go post your point of view to a real keyboard-connoisseur board like geekhack.org if you think such a keyboard is better than a Unicomp, an IBM Model M, a Topre, etc.

      If you think *any* touch-typist would praise a MS keyboard or *any* pro-gamer would praise a MS keyboard I suggest a visit to the nearest psychiatric hospital.

      The way MS will produce something that doesn't suck will be the day they produce a vacuum cleaner.

    14. Re:microsoft research rocks by billcopc · · Score: 1

      Obligatory bullying: The original XBox controllers were PERFECT! You just have wussy little hands.

      I could never get used to the smaller controller, nor anything from the Playstation camp. My fingers just aren't made to clamp down on such tiny things.

      --
      -Billco, Fnarg.com
    15. Re:microsoft research rocks by Anonymous Coward · · Score: 0

      That's works as I expected

      Rarely is the questioned asked, is our children learning?

    16. Re:microsoft research rocks by Anonymous Coward · · Score: 0

      I dunno. Have you?

    17. Re:microsoft research rocks by Jesus_666 · · Score: 1

      Microsoft are pretty good at HID (even though I find their mice too bulky and stick to Razer) but damn, did their MN-700 router suck. Trust Microsoft to get input devices right but don't assume that their other hardware offerings are automatically of the same quality.

      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
    18. Re:microsoft research rocks by Anonymous Coward · · Score: 0

      lmao. rarely are the question asks, if is the childrens learns us?

    19. Re:microsoft research rocks by CastrTroy · · Score: 1

      I'll be the first to admit I have small hands. You're right, but the original XBox controller is the biggest console controller I've ever seen. Only next to the Dreamcast from what I recall. I personally found the GameCube controller to be the best controller by far. Really nice to have that "home" (A) button in the middle, with all the other buttons located around it, easily reachable.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    20. Re:microsoft research rocks by TheTyrannyOfForcedRe · · Score: 1

      I have to agree. I bought an MS mouse because I was sick and tired of $50 Logitech mice that died 2-3 months out of warranty. I went through 5 or 6 of them. I ran across this Microsoft Mobile Mouse 3500 on special for $20 at one of the big box office stores. It's the best mouse I've ever owned. The range is the best I've seen from a 2.4Ghz mouse. It has blue LED tracking that works on anything...fabric, glass, my face, anything! To top it off the battery life is better than any of the Logitech mice I've owned. I like it so much I went back and picked up another at full price, $35 or so.

      --
      "Liechtenstein is the world's largest producer of sausage casings, potassium storage units, and false teeth."
    21. Re:microsoft research rocks by spongman · · Score: 1

      that might be true, but Erik Meijer isn't in research - he's an architect in DevDiv.

  2. Let me too coin a phrase... by Chris_Stankowitz · · Score: 1

    coSQLInjection (cSQLI)

    Has a nice ring to it.

  3. You forgot the inverse tachyon pulse by 0p7imu5_P2im3 · · Score: 4, Insightful

    An inverse tachyon pulse would disperse the relational quantum silica into a focused warp field, thus purging all forms of slipstream space based SQL databases from subspace.

    --
    Resistance is futile. Your technological distinctiveness will be added to our own. You will become one with the morgue
    1. Re:You forgot the inverse tachyon pulse by Anonymous Coward · · Score: 0

      Words! Good god, so many words!

    2. Re:You forgot the inverse tachyon pulse by Anonymous Coward · · Score: 0

      Dammit Jim I'm a database admin not a physicist.

  4. The real reason people like noSQL... by MrEricSir · · Score: 3, Insightful

    ...is that SQL sucks as a language. It's not terribly expressive, the ordering of arguments is inconsistent, and whoever designed the way JOIN works should be in jail.

    Frankly, I'd like to see SQL die and get replaced with something more modern. We don't program in Cobol anymore, so why the hell are we still using SQL?

    --
    There's no -1 for "I don't get it."
    1. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      Of all database query languages, SQL is the worst - with the exception of all the others.
      (apologies to Winston Churchill)

    2. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 4, Insightful

      so why the hell are we still using SQL?

      Why are we still using C? Why are we still using HTML? Why are we still using FORTRAN (in the scientific community)? Same reason.

      Might add that all these - C, HTML and FORTRAN - are still being updated, with new standards. So is SQL. It's really the same thing, and they all stick around for the same reasons, too.

    3. Re:The real reason people like noSQL... by sexconker · · Score: 5, Insightful

      We DO still program in COBOL.
      And we DO still use SQL.
      And we do so because it works.

      Not only does SQL work, it is the best at what it does.

      The only people who hate on SQL are the people who don't understand databases.
      Generally, these are the same people who like labels, tag clouds and ruby on rails.
      They produce a lot of high level hand waving with regards to the actual code and endless amounts of "herp derp I dunno" when asked why their shit performs slower than the 10 year old system it's supposed to replace. These are bad people.

      What really pisses me off is that everyone fucking agreed with me until Android came out, then suddenly Java was cool, the performance was considered "good", and the quality of code and coders that it tends to bring about is now the acceptable norm.

    4. Re:The real reason people like noSQL... by garyebickford · · Score: 5, Insightful

      Actually COBOL predates SQL by about 10 years. AFAIK nobody has written a language that implements the relational query model to replace SQL. And (though I have never written anything in COBOL he says thankfully) COBOL has its place even today. I would not be surprised if there are as many lines of COBOL still running in enterprises everywhere as there are of PHP or Perl in those same enterprises.

      And COBOL even now is without question a better solution for business and application programming than C ever was or ever will be. (Of course it's arguable that there are other languages better for those tasks than COBOL as well.) C is good for device drivers, kernels and as a target for interpreted and scripting languages with compiled code generators. C is, as Kernighan, Ritchie or Thompson (I forget which) said, "a structured PDP-11 Macro-assembler". Today (putting my Nomex suit on...) IMHO application programmers should not be wasting their time coping with segfaults and compile-link cycles. Their time is worth more than the machine time that any cycle-saving difference. :)

      --
      It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
    5. Re:The real reason people like noSQL... by O(+inf) · · Score: 2

      What's wrong with the way (ANSI) JOIN works? It's practically right out of relational algebra. As an aside, the term "NoSQL" has very little to do with SQL-as-language, and really is about relational vs other. Some "NoSQL" solutions provide SQL as a query language for their datasets, and there are some relational databases out there that don't use SQL as a query language, but would not count as "NoSQL".

    6. Re:The real reason people like noSQL... by SickLittleMonkey · · Score: 1

      Agreed. I've always called it Semi-Quasi-Language.

      --
      main() {1;} // zen app
    7. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      Actually, we still program in COBOL.

    8. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      WTF? Insightful??? Is this slashdot or reddit?

      SQL does not suck. People just don't get the whole database thing.

      Start with RDBMS 101 and learn how to design your freaking tables. SQL can't do fuck if you have put everything in ONE GIGANTIC TABLE.

    9. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      My experience is that code quality is poor at most shops regardless of language. I don't see anything particularly *good* about the quality of code C/C++ coders produce in comparison to Java. If you want to talk about languages that have some really horrible quality, let's talk about Javascript. Sure, it's not considered a "real" language by a lot of people but we're starting to see real usable applications written with it as one of the primary tools. Javascript is so slopped together it's just frightening.

    10. Re:The real reason people like noSQL... by frosty_tsm · · Score: 1

      ...is that SQL sucks as a language. It's not terribly expressive, the ordering of arguments is inconsistent, and whoever designed the way JOIN works should be in jail.

      Frankly, I'd like to see SQL die and get replaced with something more modern. We don't program in Cobol anymore, so why the hell are we still using SQL?

      You should not seek to replace something just because it is 'old' and not 'modern'. I've seen quite a bit of the modern SQL-alternatives. They have their niches but I have yet to see one that is ready to topple a well-designed relational database in performance and scalability.

    11. Re:The real reason people like noSQL... by TemporalBeing · · Score: 1

      Here, here. Wish I could give you some mod points.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    12. Re:The real reason people like noSQL... by MrEricSir · · Score: 1

      The only people who hate on SQL are the people who don't understand databases.

      That's a lot like saying people who don't like washing their clothes by hand don't like wearing clean clothes. Just because you enjoy doing something in a painful way doesn't mean that it's the best way to do it.

      --
      There's no -1 for "I don't get it."
    13. Re:The real reason people like noSQL... by frank_adrian314159 · · Score: 2

      The people who think that SQL sucks don't usually understand it. The first hurdle is that you need to think about it as a set-oriented language. You are dealing with operations that work on sets. You select a subset of all objects in the table, filter for only the columns that you want, modify them via update, insert new items, join two sets together, etc. If you come looking at it as a procedural replacement, you are starting out screwed.

      Next, like all languages, the pure relational model has grown warts (some significant) over the years. If you're willing to consider Java or Ruby as decent languages (and there are a lot of flaws at the language level in both), you shouldn't hate on SQL for this kind of thing.

      Finally, there are things that should have been in SQL that were never actually standardized - things like schema migration, for example. Yes, the language does a crappy job at them and in ways that are incompatible between implementations. But, when you look at todays object-oriented languages, which have no standardized way to migrate objects from one version to the next (well, except for CLOS-respecting Common Lisp implementations), I don't see these sorts of things as a shortcoming - languages get standardized when they get standardized.

      So, yes, it's a crappy language - just like all the rest out there. But at least the language core is built on a formal model which can be followed to make databases work together better. It's longevity is not just because Microsoft or Oracle said to use it. It's because, when you get right down to it, it's a pretty reasonable language for what it was meant to do. Just like FORTRAN, COBOL, C, and many others. And it still has a better syntax than Perl. What's not to love?

      --
      That is all.
    14. Re:The real reason people like noSQL... by DavidTC · · Score: 4, Insightful

      There are a few things with SQL that could be done better, and there's still some standardization needed. I'd like to see a SQL 2012 standard or something.

      But you're entirely right. There is one place nosql makes sense, and it's gigantic data stores like facebook and google, where the quantity is overwhelming, and the quality isn't that important...it's okay miss a few things, and you're looking for sorta-random stuff. That is why NoSQL was invented.

      No one should ever 'choose' to use NoSQL...if you're on the size of a project that needs NoSQL, I promise you you are nowhere near that decision...it will be decided between the seven project architects as they buy thirty servers to run the damn thing. That's the guys who have a legit need, or at least it's a legit option, of using NoSQL.

      It's not useful for any other system in existence.

      It's especially funny when toy projects try to use NoSQL. It's like idiots trying to run their watches off geothermal power. 'It's free power! FROM THE EARTH!'

      Dude, you're using half an amp, perhaps you should learn how to use a watch battery instead of driving 2 mile polls into the ground as you walk around. It's not like SQL is fucking rocket science. In fact, right now, NoSQL is actually more complicated to use.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    15. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      Java's never been cool.

    16. Re:The real reason people like noSQL... by DeadDecoy · · Score: 2

      I've been working with mongo noSQL for a little while now, and it's nice because it's fast and you don't have to de-normalize data that should not have been normalized in the first place. E.g. article{ title, authors, keywords } instead of having a separate table for authors and keywords. This probably attributes to the faster speeds in those databases too. It's not so much that SQL sucks or JOINs are evil, rather that they fit a different use case very well. The argument is somewhat similar to: why should I use a flathead screwdriver on cross-head screws when a phillip's screwdriver is more effective?

      I think people who get entangled into the arguments of which flavor of database is better, are often leaning towards what they're familiar with as opposed to does the tool match the problem. NoSQL is relatively new and seems complementary to SQL. If there's a framework (maybe coSQL) that combines the benefits and reduces the weaknesses of both, that seems like a welcome change.

    17. Re:The real reason people like noSQL... by DogDude · · Score: 3, Insightful

      It's not painful. It's just different than what web developers doing "select *" are used to. As a system, it works well for tiny projects, all the way to the largest databases in the world. In the world of "develop it now, deal with problems later", people just can't be bothered to learning the right way to do something.

      --
      I don't respond to AC's.
    18. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      NoSQL databases are indeed faster. They're much faster when it comes to losing data. When you don't give a fuck about the ACID properties, you can do a whole lot of stupid shit much more rapidly.

    19. Re:The real reason people like noSQL... by whitehatnetizen · · Score: 1

      SQL is not so much a language as a standard, that is supported and extended by each database vendor. what do you mean by not terribly expressive? It is an extremely explicit way of defining and manipulating sets of data. I Use Oracle and I can say that it is an extremely powerful way of manipulating sets of data. when a statement is executed on an Oracle database, the optimiser chooses how the JOIN will work with the information it has at statement execution, whether that be a merge join or a hash join or something else, so I don't know what you mean by your first sentance. Generally people who hate on SQL are OO programmers who are unable to wrap their heads around relational database set processing. Further, saying "We don't program in Cobol anymore, so why the hell are we still using SQL?" is perhaps equivalent to saying "We don't run around bashing eachother with swords and shields anymore, why the hell are we still planting food in the ground?"

    20. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      I find SQL/relational databases to be much more flexible as a general data querying mechanism than NoSQL. Most data is highly relational, and SQL lets you express complex queries in a very compact syntax. There are some notable exceptions, for example hierarchical data can be a pain in SQL, but not having JOINS and ACID in NoSQL is a much bigger pain. I've worked on some Google App Engine projects, and you end up having to custom code (and test) fragile ACID logic for every damn use case, where you would simply wrap everything in a generic transaction with a SQL system. It can easily double the amount of code required. If you have a specific use case that fits the NoSQL model, all the extra work is probably worth it, but for 95% of what I deal with, it's not.

    21. Re:The real reason people like noSQL... by lakeland · · Score: 2, Informative

      And we DO still use SQL. And we do so because it works

      I disagree.

      There are some things which are fast for a computer to do but are slow and awkward to do in SQL. You can see quite a few of them in SAS supported by data steps (e.g. decent RBAR support). Another is say I want to get the latest transactions for each customer, I have to do something like

      select customer_id,max(txn_datetime) latest_txn_datetime
      from fact_txn
      group by customer_id

      -- I've now got the latest transaction time but because system reversals and the like are often set to happen at the same time as the transaction I have to next...

      select customer_id,max(txn_key) latest_txn_key
      from fact_txn
      join (select customer_id,max(txn_datetime) latest_txn_datetime
      from fact_txn
      group by customer_id) latest_txn
      on (fact_txn.customer_id = latest_txn.customer_id)
      where fact_txn.txn_datetime = latest_txn.latest_txn_datetime
      group by fact_txn.customer_id

      -- Now we've got the right transaction key, but we still have to join again to get the actual transactions

      select fact_txn2.*
      from fact_txn fact_txn2
      where exists
          select 1 from
      (select customer_id,max(txn_key) latest_txn_key
      from fact_txn
      join (select customer_id,max(txn_datetime) latest_txn_datetime
      from fact_txn
      group by customer_id) latest_txn
      on (fact_txn.customer_id = latest_txn.customer_id)
      where fact_txn.txn_datetime = latest_txn.latest_txn_datetime
      group by fact_txn.customer_id) txn_keys_of_interest
      where fact_txn2.txn_key = txn_keys_of_interest.latest_txn_key;

      I can tidy this up a bit if needed - using CTEs or whatnot but the simple fact remains that a lot of the time I want to write a one liner like:

      select * from fact_txn having txn_key = max(txn_key) over (PARTITION by customer_id order by txn_datetime)

    22. Re:The real reason people like noSQL... by Jonner · · Score: 3, Interesting

      SQL definitely sucks as a language. However, the relational model it was intended to expose does not. We need languages that more fully and naturally expose the relational model.

    23. Re:The real reason people like noSQL... by godglike · · Score: 1

      SQL is the most successful language in Computer Science history and the only one that has a proper mathematical basis.

      Other languages have the odd mathy type thing like lambda calculus but SQL is set theory.

      It's not perfect (ANSI JOIN sux, crosstabs would be great) but it's way more powerful and expressive than anything else.

      If you don't get it, do some research and find out about more than SELECT, CREATE, and INSERT.

    24. Re:The real reason people like noSQL... by g4b · · Score: 0

      Maybe the truth is, that there are still unknown sides of programming we don't really know of. We are still the first generations toying with this idea, experiencing emerging technology on the run.

      Programming becomes much more of an art, like the mathematical rhytm of frequences creates music out of distortion. For somebody who loves databases, and see them from the perspective of SQL, it becomes beautiful - and this person might know what is wrong with the language, if asked. At the same time, developing solutions that are actually secure and use simple code, things like django really help to blend away another kind of thinking, which this person is not interested in. Because he works on another layer of the art. As does the Java developer.

      Optimizing SQL in an existing framework made those 10 year old things perform better.

      Calling others stupid is easy. But don't tell others what is pain, and what is not, is my answer to both universes.

    25. Re:The real reason people like noSQL... by Sarten-X · · Score: 2

      And yet, one of my toy projects in grad school generated over a billion data points that needed analysis. The only database server I had access to choked on the first analysis pass (of about a dozen). It took about three months of processing to get to a point that could even be considered acceptable. Since then, on a whim, I've redone the program using Hadoop and HBase. A MapReduce job completed the analysis, on worse hardware, in less than a day. A major contributing factor was the lack of a rigid structure in HBase, which greatly improved the organization of data.

      NoSQL solutions are certainly not the best tool for every job, but neither are normal relational databases. In my opinion, it's worthwhile to be familiar with both, and to be able to choose the right one for every task.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    26. Re:The real reason people like noSQL... by angel'o'sphere · · Score: 2

      Lol,

      that was water on the wheels of the other posters you agree: most people have no clue about programming and SQL.

      If one of your main use cases is to find the "latest transaction" of your customer, then adapt your database to support that use case.

      Sorry, your example makes no real sense at all.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    27. Re:The real reason people like noSQL... by Jonner · · Score: 3, Interesting

      Neither SQL nor its original incarnation SEQUEL was the first language based on the relational data model. There are also more recent relational languages, such as Tutorial D, though none has gained much popularity and few people know they exist, even in the database management world. We badly need a replacement for SQL that is more flexible and more fully implements the relational model.

    28. Re:The real reason people like noSQL... by DeadDecoy · · Score: 1

      I haven't noticed data loss yet. But that's probably because I and only a few other people are using it. Most of this use is non-concurrent and will be readonly once the initial batch of data gets in the db. Again, my argument is that this depends highly on the use case. Mine is to have some relatively fast local storage to do some large-scale statistics.
      Have you ever used a noSQL database and experience data loss? Is this for all NoSQL databases or just a few? (I know mongo provides some form of logging to let you know if the query executed properly. If have run into data loss issues can you provide a concrete example (database, data, and possible race conditions) under which that situation manifests? Or are you just regurgitating counter-arguments that are floating around on the web.
      At the moment, my db is stable and I haven't run into any issues. Even if the tool is not verified to be safe, I can still make effective use of it and take precautions where needed once things ramp up; hard drive space is relatively after all. Again, it all comes down to use case. I'm messing around with statistics not order entries. If a small percentage of several million entities glitches, then I can probably work around that or run multiple tests to ensure consistent output.

    29. Re:The real reason people like noSQL... by sapgau · · Score: 1

      Will a noSQL offer the same SQL properties of transactional databases, with referential integrity, transactions, joins, etc.?

      If so, then it sounds like people just want to change the syntax of how to express sql statements. This will end up into having two query languages which should do the same thing.

    30. Re:The real reason people like noSQL... by Jonner · · Score: 2

      Just because the relational model SQL is supposed to implement is great doesn't mean we don't need a better replacement for SQL. There are alternatives, but they're so obscure, immature, or incompatible with other commonly used tools that hardly anyone ever considers them.

      I use PostgreSQL at work and I'm constantly expanding what I can do with SQL, both as a result of learning and new features that are being added. However, I constantly run into its limitations and extreme ugliness. Even though I work with it every day, I still commonly look up basic syntax because it's so irregular. I'd love to be able to use a better language without giving up all the excellent properties of Postgres, but implementing that would clearly be a huge job and I'm not aware of anyone attempting that.

    31. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0
    32. Re:The real reason people like noSQL... by sapgau · · Score: 2

      You are comparing a query from a transactional system vs. a dimensional one.

      To achieve this you have to extract your transactional data and build the cubes needed for the query. Yes it will take a few hours every night to build the cube but your dimensional queries will be fast, efficient and wont bog down the transactional databases.

    33. Re:The real reason people like noSQL... by DeadDecoy · · Score: 1

      I saw that too, and it was funny :). But I'm not using mongo for "webscale". I'm using it to store and retrieve fuckload of data that needs to be accessed quickly for analysis. So my only other options are: cram it into RAM (not really an option), use SQL (a bit too slow for my purposes unless I have access to a cluster), or NoSQL (fast and good enough). The argument in MONGO IS WEBSCALE is don't toss out proven solutions on the problems its build for, for the trendy new technology. It didn't however, mention that mongo was unusable for the problems that it was built for.

    34. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      Hey, Java can be acceptably fast if you code it in C.

    35. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      fyi: "hear, hear"

    36. Re:The real reason people like noSQL... by jchernia · · Score: 1

      Much simpler would be

      select fact_txn.*
      from fact_txn txn, (select customer_id,max(txn_datetime) from fact_txn group by customer_id) latestTxn
      where txn.customer_id = latestTxn.customer_id and txn.txn_datetime = latestTxn.txn_datetime

      not ANSI, I know, but should be portable to most dataservers

    37. Re:The real reason people like noSQL... by geekpowa · · Score: 2

      Actually, the example makes perfect sense and it is a problem I've encountered regularly and one of my many bug bears with SQL.

      The generalized problem is 'find last txn' for every customer before date X.

      Now if you can access the btree directly, you can efficiently walk it and get this data. But with SQL you cannot efficently get it. PostgreSQL windowing functions make getting such data simple in terms of constructing the SQL (once you get your head around windowing functions), but these queries walk large sections of the dataset and are not optimized fully.

      The parents actual example is 'find latest txn'. This can be simplified by materializing details of the last transaction to the customer record on update. But this only works for this specific case. The generalised problem is not readily solved in SQL or at least I have not found a nice solution. The best I can come up with is to materialize data for a given date granularity; (i.e. first of every month). It works to a degree, but the solution is ugly and I know better solutions are possible (depending on cardinality of the data) if you are closer to the metal and are able to bypass the SQL layer.

    38. Re:The real reason people like noSQL... by shic · · Score: 2

      I must take issue with the claim that "The only people who hate on SQL are the people who don't understand databases."

      I think you should take some time and read the extensive publications of Chris Date (of Codd and Date International fame) - which, without exception, are extremely critical of SQL (while praising the relational model.)

      SQL has its place - but it is far from perfect... and, the 'shackle of compatibility' prevents most of what is counter-productive about SQL from being fixed. NOSQL, while an infant technology, at least shows promise... only by starting afresh can we establish better DBMS strategies. No, I don't think NO-SQL is an alternative to SQL - it is an entirely different approach... one that should be judged on merit in each individual context.

    39. Re:The real reason people like noSQL... by k8to · · Score: 1

      Funny, as I fire up my mutt mail client and instantly open enormous mailboxes by that are backed by nosql caches in tokyocabinet. I guess my personal mail is really a problem that requires 7 architects and 30 servers.

      Oh wait...

      Yeah, you could do this with a sql engine, like postres, or an in process sql approach like sqlite, but the keyval store actually maps much more closely to the problem, and the memory consumption is kept *very* low even for hundreds of thousands of messages. Just bringing postgres up without any data in it would cost about an order of magnitude more ram.

      So nosql does make sense in other usage domains. Its just a matter of being careful in identifying when its the right KIND of tool, and further being careful in selecting the right nosql tool, since many are quite dissimilar.

      --
      -josh
    40. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      Frankly, I'd like to see SQL die and get replaced with something more modern. We don't program in Cobol anymore, so why the hell are we still using SQL?

      I'm working on a relational alternative, as are others. But anyone trying to devise a SQL killer is 30 years late to the party. There's no way you'd be able to match the feature set of modern SQL DBMSs.

      Even if you target people who aren't terribly interested in features, there are two big problems. One is convincing people to move from SQL to something else. In every aspect of the language, SQL is "good enough." The worst part is ostensibly the syntax, and I can't help but notice that no one tries to write C or Java without extensive support from their IDE. All you need to bang out SQL is auto-indent.

      The second, and arguably bigger problem, is that people think that because they can write some SQL that they understand databases and understand the relational model. So a good portion of my work has been trying to explain relational theory while I'm explaining the language I'm developing. The math itself is dead easy, but for whatever reason, a lot of people just don't seem to get data.

    41. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      If you really think SQL sucks, then you are doing it wrong.

      For a language to be 30+ years old, and require very little tweaking, and still power even the largest websites today, it says something for the robustness of the SQL designers 30 years ago.

      I personally started doing as much as I can in SQL, when it comes to data transformation and manipulation.

      You get the right set of tools, and UDFs, SPs and SQL itself is extremely powerful for a 30 year old language.

    42. Re:The real reason people like noSQL... by codepunk · · Score: 1

      Actually I have no problem with the SQL language. I work in a heavy NoSql environment. We do not hate sql engines it is just that none of them are fast enough to deal with the transaction rates we require.

      --


      Got Code?
    43. Re:The real reason people like noSQL... by clockwise_music · · Score: 1

      Insightful? People like noSQL because it allows them to have messy unstructured data and not do any data modelling.

      We're still using SQL 20 years later because it's a great layer between your OO code and your relational data. Unless you want to use a heirachical database (which no-one does) SQL works fine. Sure you can use an ORM but at some stage you'll need to handle the conversion between relational and OO.. unless you're happy being ignorant as to how your database works and not be able to performance tune anything.

    44. Re:The real reason people like noSQL... by clockwise_music · · Score: 1

      Not only does SQL work, it is the best at what it does.

      The only people who hate on SQL are the people who don't understand databases. Generally, these are the same people who like labels, tag clouds and ruby on rails. They produce a lot of high level hand waving with regards to the actual code and endless amounts of "herp derp I dunno" when asked why their shit performs slower than the 10 year old system it's supposed to replace. These are bad people.

      Here here. Well said. If you think you can do everything without structured data you've never heard of accurate reporting before, which is what businesses need to be competitive and not waste money and all that fancy schmancy business stuff.

    45. Re:The real reason people like noSQL... by Compaqt · · Score: 2

      One thing that annoys me is the disjunction between UPDATE and INSERT queries for the same set of fields:

      INSERT INTO blah(uid, name, email) VALUES(12,'Goober','goob@example.com')

      But if you want to change that to an UPDATE query, you have to move each of the fields around:
      UPDATE blah SET uid=12, name='Goober', email='goob@example.com'

      This would have been better:
      UPDATE blah SET (uid, name, email) VALUES(12,'Goober','goob@example.com')

      By the way, if you want to read hard-core fundamentalist, pro-relational stuff by DB guru CJ Date and others, DBDebunk is the place:

      http://www.dbdebunk.com/

      --
      I'm not a lawyer, but I play one on the Internet. Blog
    46. Re:The real reason people like noSQL... by emt377 · · Score: 1

      I've been working with mongo noSQL for a little while now, and it's nice because it's fast and you don't have to de-normalize data that should not have been normalized in the first place.

      I totally agree with this. MongoBD is great, but so are RDBMS. They serve different functions. The problem I have is with SQL. It's a language, not a data model or representation. In addition, the server sits at the end of a socket and acts like it's an interactive terminal session, using a human-friendly language, one command at a time. This means for instance that the server has to perform queries in the order issued on any one connection, but there is no guaranteed order or way to state dependencies over multiple connections. As opposed to say having a single connection with a protocol (not some chatty terminal session), asynchronous, based on something as trivial as BSON serialization and JSON-RPC. I'm just tossing these up as simple examples (and ones I'd personally think would be miles ahead). THEN, for maintenance you create an interactive utility that parses a human-friendly query language that could smell and taste like SQL. What amazes me about the effort in the MS researchers' paper is how they try to create another language for non-ACID uses, which I find totally backwards - they should eliminate the language part of RDBMS!

      Just look at what happens when a query is made:
      1. A textual representation of the query is made, vulnerable to injection attacks or plain errors. Human-readable, as usual, is inherently inefficient.
      2. Thread stuffs query object in a queue and blocks waiting on it (on an event object/condition variable that's part of the query)
      3. Thread from SQL worker pool wakes up (on queue change event) and picks up request
      4. SQL pool thread sends text to DB server and blocks waiting for a response
      5. The process reverse on the server via a reactor pattern
      6. Server sends back human-friendly reply
      7. SQL pool thread wakes up and picks up response, and parses it (it has to look for errors)
      8. SQL pool thread tacks response to query object, signals a change to it, and goes to pick up the next query or sleep
      9. Application thread wakes up when query is signaled
      10. Application thread parses the reply (second time, because it knows what the query is which the SQL pool thread doesn't, unless it were to parse the query)

      Compare this to:
      1. Application builds data representation of query, either by building a simple tree from scratch, or using an algorithmic tree transform on a more complex set of data. If data isn't natively in BSON or whatever is used, then it's transcribed.
      2. Application thread grabs lock and adds RPC envelope to query, registers the RPC ID, writes RPC object to server socket, releases lock
      3. Application thread waits for query to complete, by volunteering to service the reactor (if no other thread already does)
      4. A response comes; the RPC ID of the original call is looked up, the query object retrieved, the response envelope removed, and the response tacked onto the query
      5. The calling thread is woken up. If there's only one thread making queries and the reactor doesn't have a dedicated service thread (or pool), then this is the same thread that waited in select/poll/epoll/kevent(), and it's simply returning.
      6. Data is deserialized, if needed.

      If you're a programmer you can immediately see why SQL is such a massive complexity on top of what is really a pretty simple problem with a simple solution. The number of connection to juggle, service pools, blocks/unblocks, context switches, parsing and serialization spread all over, poor layering, fits poorly with asynchronous applications, etc etc. In fact, there's actually nothing wrong with SQL per se, the problem is that it's not needed in the first place any more than a program should call a subroutine by emitting text for it to substitute parameters, then compile and run it! That doesn't mean there's anything wrong with compilers!

    47. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      Relevant supporting video.

      That being said, be careful of One/No True Scotsman arguments, such as "The only people who don't like SQL are those that don't understand databases."

    48. Re:The real reason people like noSQL... by Jonner · · Score: 1

      I didn't say SQL wasn't powerful. I use it every day because it is currently the best tool for dealing with relational data in most cases. However, relational languages can be a lot better. They can be more regular in syntax, allowing a lot more natural and flexible composition and factoring. Can you tell me why an insert and update statement look totally different in SQL?

    49. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      half an amp

      That's some watch...

    50. Re:The real reason people like noSQL... by DavidTC · · Score: 1

      tokyocabinet and other dbm are not what people are talking about when they say NoSQL. 'NoSQL' does not mean 'database engine that doesn't use SQL'.

      NoSQL would be better called 'NoRel'. NoSQL is a non-relational database. And NoSQL is only available as a database server, which I assure you have no less memory requirements than SQL servers. (And if you're having trouble imagining what the hell a 'non-relational database' is, or would be used for, you're not alone.)

      Whereas dbm libraries like tokyocabinet are, in fact, relational, they just don't use SQL. (And the server is linked in.) No one has any problem with embedded dbm libraries, SQL or otherwise. They are not NoSQL, they are just not SQL.

      Please read up on the NoSQL concept.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    51. Re:The real reason people like noSQL... by angel'o'sphere · · Score: 1

      But that is not a problem of SQL!!!

      It is a problem of relational data bases.

      So use an OO database if you need to do that, e.g. Or as this discussion is about: a noSQL one.

      Or do what the smart guys do: save the stuff partly in a relational one and partly in an RDBMS.

      Blaming a language because it can not express what you want/need makes no sense at all. Use a language/system that can, instead.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    52. Re:The real reason people like noSQL... by DavidTC · · Score: 1

      Uh, I know you're trying to push NoSQL, but under no definition of 'toy' is included a billion data points.

      In my opinion, it's worthwhile to be familiar with both, and to be able to choose the right one for every task.

      Yes, just like taxi drivers should be familiar with passenger cars and the 3000 tonne Space Shuttle Crawler. Because sometimes people need to move the space shuttle.

      It's just obvious. Everyone should aim to be skilled in the actual tool everyone uses all the time, and an incredibly specialized tool that is helpful for impossibly large tasks that almost no one actually does.

      NoSQL solutions are certainly not the best tool for every job, but neither are normal relational databases.

      Oh, I agree. You just try moving the space shuttle with a normal car. Or like your grad project, where you moved an entire building.

      I cannot figure out why people just know how to drive a car. Learning how to drive the space shuttle crawler would be so much more useful, and at the very least they should know both.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    53. Re:The real reason people like noSQL... by whitehatnetizen · · Score: 1

      so stick a btree index on the transaction timestamp column? and then sit back and let the database engine do what it is good at. SQL (at least that executed against an oracle database) is actually very close to the metal so to speak.

    54. Re:The real reason people like noSQL... by microbox · · Score: 1

      You may be right, but his argument is not without merit. I have seen some SQL queries grow out of control, and they are quite difficult to understand. From a maintenance point of view, this is a disaster. SQL was created to make things simpler -- but like all "next-generation" technologies, it is only simpler for simple cases.

      --

      Like all pain, suffering is a signal that something isn't right
    55. Re:The real reason people like noSQL... by DavidTC · · Score: 1

      Actually, thinking about it, gdbm, and I assume tokyocabinet, are not technically relational, it's just everyone uses them as such by storing identically shaped records and attaching hash tables to them so people can find things.

      What people are complaining about here are things like HBase and Hypertable, not dbm libraries.

      They have all the disadvantages of dbm libraries (Like non-records taking up space), and all the disadvantages of SQL servers (Like having to copy things around in memory), and extra disadvantages of neither (like 'eventual' updates, until which you will be inconsistent).

      The sole advantages is they can be huge. Really, really huge.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    56. Re:The real reason people like noSQL... by microbox · · Score: 2

      Relational algebra is far simpler than SQL for anything moderately complex. The theory and maths are well developed, but there are no implementations. SQL is loosely based on relational algebra, but the "lets-make-this-real-simple" mentality has had the reverse effect. Relational algebra is actually far easier to learn, and becomes expressive like a regular computer language.

      --

      Like all pain, suffering is a signal that something isn't right
    57. Re:The real reason people like noSQL... by microbox · · Score: 1

      The people who think that SQL sucks don't usually understand it.

      My experience, is that the people who designed SQL didn't understand Relational Algebra, and made a mess of things. Too bad.

      --

      Like all pain, suffering is a signal that something isn't right
    58. Re:The real reason people like noSQL... by angel'o'sphere · · Score: 1

      Insightful? People like noSQL because it allows them to have messy unstructured data and not do any data modelling.

      In noSQL environments you have to do MORE data modeling than in a traditional SQL DB.

      The data usually is not unstructured at all. Prime examples are Blogs, Forums, Postings, Answers to that postings, Tags, Labels, Users, Priviledges for that Users to see certain, "parts" of the Forums / Postings / Threads etc etc.

      Simple do do with SQL, yes. But not if you have to deal with a million of "postings" per hour. And a few hundred million read accesses through a day.

      Why don't you read up about prime examples of large scale noSQL usage like in sites as Facebook and Twitter?

      Claiming they don't do/need data modeling is bottom line an insult.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    59. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      What really pisses me off is that everyone fucking agreed with me until Android came out, then sudde... blah blah blah blah

      The world has moved on friend. Maybe you can get a job writing device drivers or something?

    60. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      the other fact is that NoSQL DBs like MongoDB have flexible "table" (collection) structures. Very very useful for me in some cases where records have similar but not identical structures and they can change weekly.

    61. Re:The real reason people like noSQL... by geekpowa · · Score: 1

      I am loving this thread. People who appear to know little about the underlying mechanics of how databases perform coming forward and saying 'use magic elixir X!'. OO databases to solve this problem? Are you serious and do you even know what you are talking about? An 'OO' database is just a relational database that includes a notion of inheritance. i.e. PostgreSQL. Though it may be possible that you may be talking about something radically different, in which case how about you point me towards some links on your 'magic elixir X' and detail on how it elegantly solves this specific generalised problem.

      The problem again, is SQL itself. SQL is an abstraction of relational indexed queries. the abstraction fails to to provide a meaningful ways to exploit certain possibilities under certain generalised use cases, and these limitations have nothing to do with the underlying technology but the abstraction layer. As I indicated in my original post, the problem is solvable if you have access to the b-trees; but difficult/cumbersome if you are working through SQL.

      Of course this is not necessarily a basis for throwing out SQL because it fails to deliver on on generalised case; but it is just one of many issues I have with SQL as a language.

    62. Re:The real reason people like noSQL... by geekpowa · · Score: 1

      I do not think you are fully groked the example, and why it fails to optimize well via SQL and why SQL itself is the problem.

      Query one is select cust_id,max(timestamp) from customers. This in theory can optimize well. But then the output of this needs to be pushed into another query in order to extract actual txn tuples. Which results in a a b-tree root to leaf walk into the transaction table for every customer. Even though the database has already discovered those tuples. It is both redundant and inefficient; and strictly a limitation of SQL

      An alternative I suggest and am currently using is to use window functioning; select rank() and filter rank output. Problem with this is you do a full b-tree date-to-date walk when under many circumstances a more efficient traversal of the b-tree, skipping parts of the walk, is theoretically possible.

    63. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      RDBMS is absolutely brilliant where you have lots of tabulated data that needs some form of processing done on it.

      However if you're working heavily with data in tree structures, if you have lots if individual key pairs, or exceptionally large data sets, standard RDBMS tend to perform poorly. Under these circumstances you might want to move away from a RDBMS, to something which was designed with your sort of data in mind. You're going to see a significant performance boost in these situations, regardless of project size.

      It's important to remember that NoSQL isn't only massive systems running using MapReduce (we're not all Google), but also little desktop applications using CouchDB (like Ubuntu's DesktopCouch framework) to store a tree of user configuration information for fast access, or innumerable other small tasks that don't "fit" the RBDMS pattern (typically these are document centric problems).

    64. Re:The real reason people like noSQL... by angel'o'sphere · · Score: 1

      An 'OO' database is just a relational database that includes a notion of inheritance. i.e. PostgreSQL.

      No, that is an Object Relational Database.

      An OO Database e.g. is http://www.orientechnologies.com/orient-db.htm
      or http://www.versant.com/ or ObjectStore or GemStone.

      Your previous post screamed for an oo database. Now you say I have no clue ... up to you ;D solve your problems yourself then.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    65. Re:The real reason people like noSQL... by WaffleMonster · · Score: 1

      ...is that SQL sucks as a language. It's not terribly expressive, the ordering of arguments is inconsistent, and whoever designed the way JOIN works should be in jail.

      Frankly, I'd like to see SQL die and get replaced with something more modern. We don't program in Cobol anymore, so why the hell are we still using SQL?

      Because you didn't suggest anything better?

    66. Re:The real reason people like noSQL... by EETech1 · · Score: 1

      That made laugh! Thanks AC :)

    67. Re:The real reason people like noSQL... by geekpowa · · Score: 1

      Thanks for the links. Look like interesting products.

      I did not mean to come off as rude, but I did. My apologies. In prior post you said "But that is not a problem of SQL!!! It is a problem of relational data bases.". Can you please clarify this/point me towards a clarified. It is not evident to me how a object graph database somehow provides a efficient and meaningful solution to this specific generalised problem and how precisely it does this presumably by avoiding some unstated limitation of RDBMS.

    68. Re:The real reason people like noSQL... by WaffleMonster · · Score: 1

      It's a language, not a data model or representation. In addition, the server sits at the end of a socket and acts like it's an interactive terminal session, using a human-friendly language, one command at a time. This means for instance that the server has to perform queries in the order issued on any one connection, but there is no guaranteed order or way to state dependencies over multiple connections. As opposed to say having a single connection with a protocol (not some chatty terminal session), asynchronous,

      All SQL databases I work with have asynchronous wire protocols allowing multiple concurrent execution within a single connection/transaction. Maybe you should upgrade?

    69. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      If your watch takes half an amp, I think you have some issues there. Most normal watches measure their power in in micro amps (1 millionth of an amp). 1/2 an amp woud blow through a watch battery in a short amount of time indeed. I know what you're getting at though...

      And, being on one of these 'other systems' that actually is pushing a single relational DB to it's knees, I think you guys are dismissing a lot of cases where the relational model isn't a good fit. For us (not a 100% typical project), we have a crap-ton of really simple data - think gobs of scientific-style time-oriented data. Storing this particular kind of data in a relational DB is kind of silly. The index is the only thing we really make use of, and that bloats our data storage needs like crazy. A product like Vertica or InfiniDB makes a whole wack more sense (and there's way more approaches than that available). They have optimized indexing and compression algorithms (among other things), because the people that use those kinds of products come to them instead of relational db's because of their specialized needs. Not however that not all of these applications are necessarily 'gigantic data stores'. Some of them are to be sure, but certainly not all.

      Granted, there's a lot of ways to tackle the problem, and some of them actually work pretty well. You could even load balance/shard over a bunch of relational DBs, but that's a complex solution for little gain (other than feeling good about sticking with 'just one database'). Much of that complexity is already baked into other packages that are designed to be used in this way.

      It's moving 'off the reservation' as it were, and it requires a whole lot more due diligence, but the long-term benefits can be dramatic. In our particular case it's allowing a radical driving down of costs that's opening up new business models and enabling real profitability.

      Looking at it as just SQL vs noSQL is simply ridiculous. The noSQL camp could be anything from simple local key-value stores, to distributed document stores, to graph db's, etc, etc. There is no such thing as 'noSQL' technology, just as there is no 'non-microsoft' technology - there's a whole ecosystem out there of other solutions that can make a lot more sense in particular scenarios.

      I have the feeling that you've found your golden hammer, and now you're just looking for nails, so I'm probably just wasting my breath here.

    70. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      I "hate on SQL". I've used SQL databases since 1996. I spend at least half an hour a day interacting with SQL database. I understand how to do the physical layout of an SQL database, the difference between row and column oriented stores, and how to translate from the relational algebra to SQL, and how to implement a query engine over just about anything. And I regularly work with "nosql" too.

      I "hate on SQL" not because I dislike the relational model and databases - I like the relational model and relational databases. I just think that SQL is a horrible language and a horrible way to do relational databases.

    71. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      I didn't say SQL wasn't powerful. I use it every day because it is currently the best tool for dealing with relational data in most cases. However, relational languages can be a lot better. They can be more regular in syntax, allowing a lot more natural and flexible composition and factoring. Can you tell me why an insert and update statement look totally different in SQL?

      Have you tried merge syntax?

    72. Re:The real reason people like noSQL... by smash · · Score: 1

      We don't program in Cobol anymore, so why the hell are we still using SQL?

      Because there is plenty of mission critical software built on top of it. Just like COBOL - although toy programmers may not program in it any more, there are decades of business logic written in it, in use by BIG BUSINESS that see no good reason to re-write in something else and re-debug, etc.

      SQL is a "known entity". Introduction of some competing non-standard is going to have an extremely difficult time getting traction unless it can demonstration some killer productivity or transactional advantage over SQL.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    73. Re:The real reason people like noSQL... by MrEricSir · · Score: 1

      SQL is not a "system." It's a language.

      --
      There's no -1 for "I don't get it."
    74. Re:The real reason people like noSQL... by smash · · Score: 1

      Their time is worth more than the machine time that any cycle-saving difference

      Be careful with that. If you're dealing with several hundred thousand or million users, then a minute of processing here or there adds up pretty bloody quickly.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    75. Re:The real reason people like noSQL... by jrbrtsn · · Score: 1

      Whether or not to use C or some higher level language is mostly a matter of economics. If the cost of resources is high, you will use a lower level language to minimize resource usage. If the premium placed on performance is very high, you will use a lower level language to maximize performance. If you already understand how to do object oriented programming in C, C++ or objective C, then you are wasting your time and your employers resources using a higher level language.

      For the most part, if you can't do it in C, C++ and objective C, then it can't be done.

    76. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      Neither SQL nor its original incarnation SEQUEL was the first language based on the relational data model. There are also more recent relational languages, such as Tutorial D, though none has gained much popularity and few people know they exist, even in the database management world. We badly need a replacement for SQL that is more flexible and more fully implements the relational model.

      You probably mean QUEL :)

    77. Re:The real reason people like noSQL... by Sarten-X · · Score: 1

      under no definition of 'toy' is included a billion data points.

      From WordNet:

      (n) toy (a device regarded as providing amusement)

      My project was done in my spare time, with no funding from anyone but myself, for the purpose of my own entertainment and education. I believe that's a reasonable candidate for a "toy". It was a web crawler that scanned a few thousand websites (top hits on Google for various terms) and analysed their connections to each other. My goal was to see what sort of relationship "reputable" sites (like CNN, for example) had to "disreputable" sites (4chan), in the hope that there'd be a way to gauge a site's reputation by how it interacted with others. A few thousand sites, a few hundred links scraped from each... and that quickly makes a billion values to connect.

      Sure, it could have been a million-dollar project from a big corporation, but it wasn't. It was just my hobby, run under a grad student's minimal budget.

      taxi drivers should be familiar with passenger cars and the ... Space Shuttle Crawler

      While I do love a good car analogy, the hyperbole ruins this one. A better example would be to suggest that taxi drivers (and especially those who may be getting a new car soon) understand what a "hybrid" car is, their advantages and disadvantages, and when they're a practical car to purchase. As emerging technologies, both hybrid cars and NoSQL databases provide additional options to be considered, and a competent driver or developer should have a basic understanding of both. To dismiss a new (or old) technology merely because of its age is a dangerous mistake.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    78. Re:The real reason people like noSQL... by billcopc · · Score: 0

      The only reason people consider Android performance "good" is because they have shit PCs that are just as slow. Those dumb phones are so sluggish I want to smash them, every time I have to test my apps :P

      Ten... no, fifteen years ago, I got a Java book. I went through a few chapters, then gave up, because I figured it would never catch on and I didn't give two shits about plastering stupid wavy animations on a web page. I was mostly coding in assembler back then, so to me this Java nonsense was 100 times too slow, plus it took a good 20 seconds to start the JVM on my 486. How that trainwreck became the de-facto standard for large-scale development, to me that's proof that 99% of all programmers are brain-damaged posers, just like the used-car-salesman I had for a C prof back in the 90s.

      Say what you will about JIT, Java and .Net are still a zillion times slower than native code. We have machines nearing the 4ghz mark, so why don't they feel a thousand times faster than a 286 ? Do we really need all this bloat ? Does it allow us to build the apps more quickly ? I don't believe so.

      --
      -Billco, Fnarg.com
    79. Re:The real reason people like noSQL... by billcopc · · Score: 1

      Java is only "another layer of the art" if you're a bullshit artist.

      --
      -Billco, Fnarg.com
    80. Re:The real reason people like noSQL... by DrEasy · · Score: 1

      Well, there's always Datalog... Also, one could imagine a direct expression of relational algebra or calculus in a lisp-based syntax, something like:

      (select f (project g (x PRODUCT AUTHOR))) (where f and g are functions defined separately or just included directly as lambdas)

      It would maybe feel more natural and more intuitive for math-friendly people, but maybe too scary-looking for anybody else? The same marketing forces behind COBOL and the same misguided ambition that a lay person should be able to program seem to have driven the syntax of SQL.

      --
      "In our tactical decisions, we are operating contrary to our strategic interest."
    81. Re:The real reason people like noSQL... by Xest · · Score: 1

      Have you ever studied set theory or relational algebra? I'm sure if you had you'd understand why SQL is the way it is.

      It's based on the relational model which provides a mathematical foundation which maybe used to provide mathematically correct models that prove the outcome of an operation. This is important if you want a solid guarantee that your software will do what you think it should do as you have the means to prove that.

      I'm not sure what your problem with joins are, could you expand?

      It sounds like your issue is that your SQL skills and general database knowledge isn't very strong, and that you simply dislike it because you don't really understand why it is the way it is- when you understand that justification you realise that for the most part, it is the way it is for damn good reason.

    82. Re:The real reason people like noSQL... by nahdude812 · · Score: 3, Informative

      Like Angel'o'sphere said, if you can adapt your database, the problem becomes trivial. Make sure that at least for a given customer, each subsequent transaction ID is greater than the prior transaction ID (if this is not already the case, then add a new field populated by a sequence so that you have a field where it is the case).

      Here's the solution with a sub-select (because it's easier to read, it can be converted to a join for efficiency):
      SELECT
              transactions.fieldNames
      FROM transactions
      WHERE
              (transactions.customerID, transactions.transactionID) IN (
                      SELECT customerID, MAX(transactionID)
                      FROM transactions
                      GROUP BY customerID
              )

      If, as you suggest, you need it for specific date ranges, then add those to the sub-select. Like I said, for most RDBMS's this would be faster if converted to a join (and basically every sub-select can be converted to a join). For some RDBMS's they would convert it to a join as part of the execution planning anyway (I believe Postgres and Oracle do this).

      Arguments like these actually only serve to strengthen RDBMS's case over NoSQL. Database engineers have been solving these problems easily and efficiently for years, but a new generation likes to think in new patterns. Not that there's anything wrong with that - except there is a certain tendency to try to put a square peg in a round hole, a complaint when it doesn't fit right, and a sigh from the guys who've been carving pegs so they fit snugly all along.

      Key/value storage does have advantages over traditional RDBMS designs (assuming the RDBMS is designed and utilized properly), but those advantages are things like linear scalability, and very few cases where a task on the K/V side is substantially faster to complete than a properly designed solution on the RDBMS side - at least not until you are talking tens or hundreds of billions of records on 100+ CPU clusters (this is the linear scalability advantage).

    83. Re:The real reason people like noSQL... by Ed+Avis · · Score: 1

      Oh, there are all sorts of relational query languages other than SQL. For example early releases of Postgres had own query language. But nobody used it, because it wasn't SQL. SQL's syntax is ugly - I'd love to see it replaced by something more functional-looking and closer to relational algebra. But like the QWERTY layout it's something we just have to live with, and also like QWERTY it's not nearly as bad as it could be.

      --
      -- Ed Avis ed@membled.com
    84. Re:The real reason people like noSQL... by mcvos · · Score: 1

      If SQL is the best we've got, and it sucks, then it makes sense to work on something better.

    85. Re:The real reason people like noSQL... by GooberToo · · Score: 1

      The problem is, in the real world, its the best we got.

      Technically the SQL specification is pointy and its far from perfect, but time and time again it prevails because, contrary to assertions by some, its likely to be the best we'll have for a very long time to come.

    86. Re:The real reason people like noSQL... by hawkfish · · Score: 1

      And yet, one of my toy projects in grad school generated over a billion data points that needed analysis. The only database server I had access to choked on the first analysis pass (of about a dozen). It took about three months of processing to get to a point that could even be considered acceptable. Since then, on a whim, I've redone the program using Hadoop and HBase. A MapReduce job completed the analysis, on worse hardware, in less than a day. A major contributing factor was the lack of a rigid structure in HBase, which greatly improved the organization of data.

      NoSQL solutions are certainly not the best tool for every job, but neither are normal relational databases. In my opinion, it's worthwhile to be familiar with both, and to be able to choose the right one for every task.

      Or you could have just used an analytic database. There are any number of them available these days including commercial offerings like Vertica, ParAccel, VectorWise, and Greenplum, not to mention open source projects such as MonetDB and C-Store.

      Hell, the darn things aren't even that hard to write - I built a commercial grade one with two other guys in about 18 months. It can query 1 billion rows in seconds and comes built into my company's data visualisation product Tableau Desktop. Free trials, and student rates. Plus, it talks to all the other databases I mentioned (well, maybe not the OSS ones, but if they have ODBC drivers, you should be able to get it hooked up).

      Now, for data shaping, some of your tools are pretty useful. But for raw speed for computation and aggregation, I'd go with a tool designed for processing numbers, not text.

      --
      You will not drink with us, but you would taste our steel? - Walter Matthau, The Pirates
    87. Re:The real reason people like noSQL... by Xphile101361 · · Score: 1

      I really think you are 20 years behind the times if you think that Java just became cool because of Android. I assure you that there have been plenty of Java shops and "Java is cool" mentality before it came out.

    88. Re:The real reason people like noSQL... by garethjrowlands · · Score: 1

      SQL is the ... only one that has a proper mathematical basis.

      Other languages have the odd mathy type thing like lambda calculus but SQL is set theory.

      Surely lambda calculus, logic and category theory are just as proper a mathematical basis as set theory? There are lots of languages based on those. The article's about category theory, which surely trumps set theory - doesn't it?

      And as for whether SQL's expressive or not, well it depends on what you want to express. It's pretty decent in its own domain but not much good outside. The original article's example language is C# 3, which includes the SQL-like LINQ, lambdas and a regular Java-style language. I'm not saying C#'s the most expressive language there is but for any random thing you'd like to express, your chances are probably better with that than just SQL.

    89. Re:The real reason people like noSQL... by majestic_twelve · · Score: 1

      SQL is a set-based language. It was never intended to be an object based language like C# or a procedural language like VBScript. Most of the trouble I've found is when I have tried to write SQL like I write C# code. The two almost never mix. When kept to set/result based operations, SQL is awesome. It's making that mental switch back and forth that hamstrings most developers.

    90. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      ...is that SQL sucks as a language. It's not terribly expressive, the ordering of arguments is inconsistent, and whoever designed the way JOIN works should be in jail.

      [...]

      So the one who invented relational algebra should be in jail too.

    91. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      For the most part, if you can't do it in C, C++ and objective C, then it can't be done.

      C _is_ Turing complete, so strictly speaking that is true! :D

    92. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      wow you sound so cool dont you. get over yourself.

    93. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      Java IS cool. Its performance with a modern JIT runtime is equal to (and sometimes better than) native C.

      You had me right up until you started spouting this anti-Java-bigot claptrap. I bet you work in PhP...

    94. Re:The real reason people like noSQL... by DavidTC · · Score: 1

      As I tried to explain in my other posts, I have no problem with people using dbm libraries, if people just need to store some random data. Just because NoSQL has retroactively claimed such things under their term doesn't mean they are as useless as the entire movement. If NoSQL was just a new way to refer to those things, I'd have no problem at all.

      But I do have a problem when people use HBase or Hypertable, instead of an SQL server, for any non-huge project. This has all the disadvantages of an SQL server, combined with all the disadvantages of a dbm library, and absolutely no advantages that any normal person would be able to take advantages of.

      And I do have a problem with document stores, because I suspect that 99% of the time, people are attempting to solve a problem that would be better solved by, you know, the actual document store called 'the file system'. That's where you store damn configuration files. If you want to keep config options in memory, how about, I dunno, making a struct and actually keeping the values in memory?

      NoSQL object servers, and NoSQL document servers, are almost always solutions looking for problems. Yes, I know that they were both created for useful real reasons, and I have no problem with using them for that reason. I do have a problem about the strange cult that's arisen around them that attempt to use them for utter nonsense, like using a database to store config files, or using an NoSQL object server to store a forum.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    95. Re:The real reason people like noSQL... by DavidTC · · Score: 1

      Looking at it as just SQL vs noSQL is simply ridiculous. The noSQL camp could be anything from simple local key-value stores, to distributed document stores, to graph db's, etc, etc. There is no such thing as 'noSQL' technology, just as there is no 'non-microsoft' technology - there's a whole ecosystem out there of other solutions that can make a lot more sense in particular scenarios.

      Dude, it's not the 'anti-NoSQL' guys who decided to look at it this way. As I've repeatedly mentioned, there are plenty of reasons to use non-relational DBs. Everyone used to be perfectly happy.

      Then Google ran into the limitations of SQL, and wrote a non-relational databases. And somewhere, somehow, a bunch of people heard of that and decided that they shall call themselves NoSQL and promote themselves as some sort of insane 'rebel alliance' fighting the lame, confusing, and stodgy SQL people, (It has to be cool if Google's using it) and this has resulted utter nonsense as people try to use non-relational databases for things utterly unsuited to it, but instead suited for, duh, relational databases. Or, you know, just files.

      The post above this one talks about using a document store for config files. Not in a hypothetical sense, but in an 'this is already happening' sense.

      No one here is against non-relational databases. We, or at least I, am against the 'NoSQL movement' which seems to be promoting non-relational databases in utterly absurd places, or at least causing that to happen.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    96. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      Wow a reference to the venerable PDP-11, my first love. Nice.

    97. Re:The real reason people like noSQL... by DavidTC · · Score: 1

      And this is exactly the sort of BULLSHIT I expect from the NoSQL crowd,

      You think a) SQL and NoSQL are functionally equivalent, and b) that NoSQL is a 'more modern' version.

      Hey, other posters, this sort of mindset is exactly what I was talking about as my actual problem. Exactly, right there. I couldn't put it better myself. This guy thinks NoSQL is the same as SQL, except it works slightly better.

      And I'll freely admit my Space Shuttle Crawler analogy was a bit silly. NoSQL is more akin to a tractor trailer. When you need one, you need one...and it's a goddamn stupid car for a person to drive off a dealer lot and attempt to use to as a passenger car.

      Actually, you could say that NoSQL attempts to encompass tractor trailers, actual tractors, bulldozers, and the space shuttle crawler, making it not that useful a category to start with, and still resulting in people making rather nonsensical decisions because they watch too many NoSQL commercials on TV.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    98. Re:The real reason people like noSQL... by mcvos · · Score: 1

      That's a nice argument against any kind of innovation.

    99. Re:The real reason people like noSQL... by Jonner · · Score: 1

      No, I meant SEQUEL. QUEL is quite distinct and appears to have been a superior language when it was created.

    100. Re:The real reason people like noSQL... by Jonner · · Score: 1

      SQL MERGE is a recently added statement that I don't have access to yet. It looks like it does nothing to improve the syntax of UPDATE or INSERT, but simply smashes them into one statement with some extra fluff. It does appear to be useful and I'd use it if I could, but it's another example of the ugliness, irregularity and unnecessary verbosity of SQL syntax.

    101. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      No, that's a common problem, encountered in a variety of different contexts. Latest transaction, earliest transaction, first instance of X, Last instance of X before Y, etc. I've had to write code like the above quite often, and there's no clean way to do it in SQL. There should be.

      Saying 'rework the database' is pointless, because you can't rework it to optimize for a multitude of ad-hoc queries based on different fields and roll-ups. That's as silly as trying to speed up queries by making every field an index.

    102. Re:The real reason people like noSQL... by DanielSmedegaardBuus · · Score: 1

      Aw, I was so much, "Yes! Someone is talking about the purity and point of SQL" (relation algebra, etc.) until you started bashing Ruby on Rails. RoR is EXACTLY about understanding the point of leaders in a domain.

      SQL is beautiful, RoR understands that.

      You seem like a retarded monkey? Born in the 40s? Stopped caring in the 80s?

    103. Re:The real reason people like noSQL... by GooberToo · · Score: 1

      No, absolutely its not.

      The bar has been set very, very high because SQL has proven it delivers and has repelled countless challengers. Let us know there actually has been innovation before declaring a high standard prevents innovation. In fact, its already looking, yet once again, there hasn't been innovation.

      Innovation happens when you're better than what's already out there. That's not the same thing as saying what's out there is perfect. Even SQL purists will say SQL is far from perfect. Thus far, there is absolutely no indication the latest challenger has innovated anything. In fact, if you look, its more of the same which have previously been defeated - excellent now data is far more fragile with the competing solutions (nosql).

      Guess what, rehashing previously failed attempts with yet more risk is anything but innovation.

    104. Re:The real reason people like noSQL... by mhelander · · Score: 1

      And what if it is not a main use case? Which version of the ad-hoc queries hurt your eyes the least?

    105. Re:The real reason people like noSQL... by Sarten-X · · Score: 1

      Thank you so much for informing me of what I think. Until now, I was under the impression that I thought RDBMSs and NoSQL databases were actually different tools for doing different (but similar) jobs. This changes my whole perception of the world! Should I also think that a hammer and a nailgun are equivalent? Should I use sulfuric acid to wash my car? What about TNT to dig a posthole?

      I have never argued that NoSQL is a replacement for RDBMSs. Not once did I suggested eliminating an RDBMS that does its job. I didn't claim that NoSQL is inherently "better" than an RDBMS. I do apologize for my mistakes, and now that I have been told what to think, I'll try harder to fit your preconceived notions of what "the NoSQL crowd" should do.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    106. Re:The real reason people like noSQL... by DarkOx · · Score: 1

      There are plenty of implementations just no large scale commercial ones you or I are aware of. One of college professors many years ago had written one as a teaching tool. It was not a multiuser ACID database but it was perfectly cable of performing any series of expressions on flat files each or which represented a table. I might still have his dos binaries in only backup some place. For a long time I used it as an analysis tool.

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    107. Re:The real reason people like noSQL... by angel'o'sphere · · Score: 1

      Well,

      if I say problem I should perhaps have said it comes from the design concepts of relational data bases.
      I'm not completely sure to what I referred exactly when I said "it is not a SQL problem, but RDBMS" but I try to clarify.

      SQL (without DDL) is a query language.

      When we only have "tables" and "relations" are expressed as foreign keys in those tables then we can "find" everything with 3 relational algebra operations: projection, filtering, joining.
      This maps to the keywords SELECT, FROM, WHERE (mainly).

      If you had a DB that was not mainly constructed around the idea of having tables, but would simplified only consist out of trees/graphs then SQL would become very less powerful and perhaps useless. E.g. how to say FROM? SELECT customer C WITH C.name = "Angelo" FROM "where ever you find him" WHERE .... and so on ... I would likely find it difficult to express a god search. But OTOH I could likely navigate pretty quickly from node to node and gather stuff algorithmically.

      Or in other words:
      a) RDBMs use tables, SQL is a relational descriptive query language.

      b) noSQL DBs are basically Hashtables that hold BLOBs. A BLOB can as well be again a Hashtable. That later case is often restricted to a few levles (on the query language level, that means you can not construct queries that follow deeper than e.g. 3 levels into nested hashtables)
      Well are a little bit similar to "network based" databases, but lack the query abilities of those.

      c) OODBMSs usually store graphs of objects. Unfortunately the first popular OODBMS
      mapped this on RDBMSes and where not really fast. Also the query language was most fo the time an extended SQL, often called OQL. See more modern versions hibernate query language HQL and entity query language EQL.

      Classical DBs have 4 main goals which are often abbreviated with ACID: atomic - transactions, all goes or nothing; consistent - foreign key relations, non null definitions, datatypes etc. are enforced; isolated - while I fiddle around and store stuff and also query stuff, I see my changes - but no one else does; durability - if the system crashes it can recover with all committed transactions but not with the active uncommitted ones.

      For working on tables / relations honouring the ACID principles the main RDBMSs are optimized.

      Problems basically always was disc io and limited ram to hold only a selected set of disc blocks for manipulation. While discs became bigger and faster, the tradeoff between which block to hold in ram became more difficult to define. There are people that claim: if you would rewrite a RDBMs now from ground up they would be 20 - 100 times faster than our days systems are. The reason is that CPU is not utilized good enough in mains stream RDBMSes.

      The papers from OrientDB http://www.orientechnologies.com/ e.g. give good background informations also MonoDB I think. There was an university project that is becoming now OS which aimes to rewrite how RDBMSs work internally, but I lost the bookmark to it :-/
      Well here si an overview about noSQL DBs: they all work slightly different or have different ways to be queried: http://nosql-database.org/

      You should check that link! Because it classifies the different approaches for storing and retrieving data in clusters of computing nodes. Especially if you think SQL is always enough ;D

      Hope my explanations helped a bit.

      So, for having full ACID you pay a hugh performance cost. In the SQL world you have no real access to your hardware. That means you don't know if you have 10 hardware nodes or 100. You don't really know (at the time where you write an INSERT or sELECT statement ofc ... the guys managing the cluster ofc know all this) how your data gets distributed over the cluster. You also don't really know (if you dont look a

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    108. Re:The real reason people like noSQL... by Tablizer · · Score: 1

      It's amazing how we have thousands of implemented imperative languages in use, but only one relational language (1.5 if you count Tutorial-D-based implementations). It may be that implementing a RDBMS is much harder than a RAM-only language. Perhaps if a kit or C library was built that only implemented relational primitives, a kind of relational machine language, then parsers could be made for different relational languages.

    109. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      > AFAIK nobody has written a language that implements the relational query model to replace SQL

      Xplain's by Johan ter Bekke
      http://www.berenddeboer.net/xplain/

      Xplain is a beautifully orthogonal database manipulation and query language. Orthogonal means that with Xplain there is usually only one solution, not dozens like in SQL. Xplain straight-forwardly supports aggregation and generalization. Or in other words, it supports has-a and is-a relations, the only possible relations.

      Xplain also has a graphical side. Data models created in Xplain are far more readable than data models drawn with ER based tools.

    110. Re:The real reason people like noSQL... by geekpowa · · Score: 1

      Thx. I have trialed this solution previously with mixed results depending on volume/cardinality of data.

      The OP's point was that the query, and how it is expressed, is complicated. For someone relatively new to SQL, this sort of query is beyond them; which compared to alternative/older methods of working with relational query data I tend to agree. My point was slightly tangental to this. My point was that not only is it complicated, but the plan when it hits the database is inefficient too. The transaction tuples are fetched twice. Once to determine the correct max tuple, and a second time to actually get the tuple. This is a limitation of SQL itself.

      Compared to my list of other things I dislike about SQL, this one is fairly trivial. There once was I time were I just got on with doing SQL and never gave it much thought if it was well designed or not. But a few years ago I heard a colleague complain bitterly about it (not about relational databases, but about SQL itself). And it planted a seed in my mind, and I have been finding and cataloguing imperfections ever since. My single biggest problem with SQL is that it is confused about who it's intended audience is. It is not clear if it is targeting programmers, DBAs or end users and it fails to serve any of these audiences particularly well. My next biggest problem with SQL is that relationships are not strongly typed/enforced. I can join anything to anything, I can join a customer_id to account_balance and SQL will not complain. I enjoy working with relational databases and particularly with big data, trying to extract interesting facts from massive data sets and doing it efficiently. But, after 10+ years of doing SQL, I've come to dislike it; but put up with it.

    111. Re:The real reason people like noSQL... by geekpowa · · Score: 1

      Thanks for the primer. Actually, I've been working with DB's for over 15 years (mostly RDBMS), and considered by those who have worked with my directly as being quite skillful at modelling large volumes of data and being able to extract it efficiently.

      My original question remains, how an object graph database solves this problem faster than a SQL database. Now I know, for a fact, that a non-SQL relational database can solve the specific use case quite efficiently, but the SQL abstraction layer over the top of the relational database removes the capacity to access the specific query plan that is useful for this use case. The OP's point is slightly different to my own, he claims that the SQL statement is too cumbersome, and for people new to SQL, he is probably correct.

      Maybe object graph system provides a means to make the query expression simple. I know from experience that OR layers such as JPQL can certainly help in this specific case. But the underlying data fetch, when dealing with large volumes of data (billions of transaction records and millions of customer records) is tediously slow; and performance is my primary interest. SQL is great because it centralises the concern of cost planning, but it's plan vocabulary is limited by the language, and also under some circumstances you do not want a statistics based cost planner at all (but that's a different issue). I think that in order to understand whether an object graph system can actually deliver a better result, one would need to benchmark and one would need to understand how the plan is converted into b-tree scans/walks and tuple fetches to understand it's proper cost.

    112. Re:The real reason people like noSQL... by Requiem18th · · Score: 1

      Actually SQL --the language-- does suck, reinventing it is non trivial but it's one of those things that's obvious that can be done better.

      The Tutorial D family of languages are an example.

      The problem with Tutorial D is that SQL exists. All the databases that support a Tutorial D language are not popular, conversely all the popular databases use SQL.

      They already struggle to keep up with SQL, managing another language is a hurdle, unless there is enough demand, but there is no demand because DBAs don't learn nor use Tutorial D languages because all popular databases use (their own) SQL (dialect).

      Like they say, the good is the enemy of the best.

      --
      But... the future refused to change.
    113. Re:The real reason people like noSQL... by DogDude · · Score: 1

      By "system", I meant RDBMS's.

      --
      I don't respond to AC's.
    114. Re:The real reason people like noSQL... by Sarten-X · · Score: 1

      Given that I was processing text for a large part of the work (if not the majority), I'll have to pass. For what it's worth, I did look into Monet. I don't recall offhand why it wasn't selected, but just that it was one of the options.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    115. Re:The real reason people like noSQL... by AlbertinaJane · · Score: 0

      So, because you've seen SQL queries that grow out of control, SQL is a disaster? :) I've seen ruby code that is beyond any explainable logic (or anti-logic, for that matter) - does that mean ruby sucks? No, it just means that untrained/uneducated people are using it. I've seen C code that makes you want to cry all night for not choosing career as car repairmen. Is C bad because of that, or idiots are using it? NoSQL and ORM stuff were invented for people who can't gasp set theory. Which is sad, to say at least.

    116. Re:The real reason people like noSQL... by nahdude812 · · Score: 1

      The transaction tuples are fetched twice. Once to determine the correct max tuple, and a second time to actually get the tuple. This is a limitation of SQL itself.

      Actually this probably doesn't happen for any modern RDBMS; the execution planner should be more intelligent than that. It certainly shouldn't happen if you do it as a join instead of a subselect, and with the benefit of an index, execution on even extremely large data sets should be trivial. If that's still too much, you can get closer to metal with stored procedures and control exactly what gets fetched and when.

      My single biggest problem with SQL is that it is confused about who it's intended audience is. It is not clear if it is targeting programmers, DBAs or end users and it fails to serve any of these audiences particularly well.

      I'm pretty sure that it's clear that it wants to target people who wish to query or manipulate the database, whomever that may be; I'm not sure I understand why it would matter what your job title is if you're attempting to perform the same task. That said, it probably is not meant for end users any more than Java or C++ or a Map/Reduce task are.

      My next biggest problem with SQL is that relationships are not strongly typed/enforced

      The rules are different for different database engines, but column types absolutely are enforced for joins (though of course you can use cast operations to bypass that). Complaining that you can join any two columns of the same or relatable type is silly. You can also pass an account balance into a procedural function which expects to receive a customer ID if there is a compatible prototype available as well. It's not the database's responsibility to enforce data semantics any more than it's a programming language's responsibility. Both will try to aid you when you're doing something which looks suspicious (joining varchar against int, for example), but it should never profess to be more knowledgeable about your data than the human (except when explicitly instructed to do so such as with constraints - which also are created by a human).

      I won't profess that SQL is a perfect query language (I actually rather like XQuery myself), but it is the most powerful general purpose query language available, and any time it does fall short (there are such scenarios - you haven't mentioned any though), stored procedures can basically always make up the gap. There are things I dislike about it as well, and I am by no means an expert at it, but what frustrates me the most is when the NoSQL crowd makes bogus claims about reasons K/V stores are better when their claims are demonstrably false. K/V stores do have advantages, it'd be nice to have a meaningful conversation about those without having to wade through a sea of misunderstandings.

    117. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      I'm old enough to have worked on flat-file systems, and hierarchical database systems. Relational DB systems based on SQL took over and survive to this day because they have produced the best combination of flexibility and performance available in retrieving and returning large volumes of data. In SQL forums, I have seen a lot of LOUSY procedural code posted by people who don't get the concept of set-based programming and have no idea how to work with the optimizer. Some people take months to understand it and some people may never get it. Does it do everything well? No. Keep your character string manipulation and formatting in your UI or middle tier. Use the DB to go get the data. The point is that SQL isn't just a language. Relational DBs are environments that balance conflicting requirements and make sophisticated decisions based on statistics about the data in a way no single developer can approach. Sure you can pick one task and set up an ideal situation, but that's not real-world. The point is the SYSTEM is a very powerful tool and survives because it's earned its place, but if you don't understand the tool, you will never get what you want from it.

    118. Re:The real reason people like noSQL... by angel'o'sphere · · Score: 1

      Basically the question is simple: does your application/database only use given sets of graphs?

      A OO or Graph Database will have the complete graph on related disc blocks, e.g. So a single read access without head movement of the hard disc from track to track, from block to block will fetch the whole graph.

      The query expression is not simpler if you have an OODBMS or a graph based DBMS ... at least not if you need to do free form queries.

      Think about a document. It is likely structured into paragraphs with headings, an index, some images, some figures and some appendixes. In OO Terms this might be a graph of objects.

      In a traditional RDBMS you would have several tables and they need to be joined and ordered together to yield the "document" as result.

      In an OODBMS you would only query for the root object "the document", e.g. with "SELECT Document d WHERE d.creationDate = MAX(Docuemnt.creationDate)" to fetch the youngest document. All Paragraphs etc. would be fetched with it.

      The drawback is: in an RDBMS you had documents, paragraphs etc. in their own tables and you could do a query like "SELECT text, changeDate from Paragraphs WHERE changeDate > XYZ" With the result you could do following queries to find the documents.

      OTOH: In an OODBMS you just fetch the paragraphs (if you can do that) and say p.getDocument() to get its associated document.

      I think that in order to understand whether an object graph system can actually deliver a better result, one would need to benchmark and one would need to understand how the plan is converted into b-tree scans/walks and tuple fetches to understand it's proper cost.

      First: keep in mind, in an RDBMS the DB itself is walking a BTREE. But that BTREE is walked according to indices and/or primary keys. The result are records ... very low level raw data.
      In an OODBMS/GraphDB the BTREE you walk is the data itself (more or less).
      Perhaps you should read up something on that orientdb.com site, as they explain their approach pretty good. (In fact they break my simple minded explanation from above ;D as they store every object-type / class in its own file)

      In other words: if you need to do free form queries / ad hoc queries often, then an OO/Graph DB wont be faster in general. Because the result you seek is not in one graph. Example: from all bills of the last year you want to get the most expensive position. (E.G. one bought 10 issues of the LOTR DVD set, for $300 in total, and all other positions on that same bill are below $300). Of course all those results have no relation to each other ... they are just spread all over the storage area on disc. If that is a standard use case however, you would have a "document" called "postion with highest price" and for every new bill you write to the DB you would update that document. Now you have a graph with pointers to those billing positions, however they are still cluttered all over the disc as they belong to their respective bills. As positions on a bill usually don't change, you could fill that extra document also with copies of that position. So if you fetch it you again et everything from closely related disc blocks.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    119. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      The only people who hate on SQL are the people who don't understand databases.

      Chris Date "hates" SQL. Are you going to argue that Chris Date doesn't understand databases?

    120. Re:The real reason people like noSQL... by Arterion · · Score: 1

      You guys should keep going. This is getting really entertaining. :)

      --
      "That which does not kill us makes us stranger." -Trevor Goodchild
    121. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      > Frankly, I'd like to see SQL die and get replaced with something more modern

      Quite frankly frankly frankly, you are a moron.

      Study the algebra behind the relational database theory and it's possible that you will say less stupidities in the future.

    122. Re:The real reason people like noSQL... by Anonymous Coward · · Score: 0

      Why write sql when you can use sqlalchemy - www.sqlalchemy.org and have it generate it for you? Never mistype, or mis-concatenate your sql again...

    123. Re:The real reason people like noSQL... by badkarmadayaccount · · Score: 1

      A central lightweight database is quite useful for storing config files - it's just that no one can implement one properly. Though CouchDB seems a good start. Oh, and depending on how advanced the forum threading is, it might not be a bad idea. Hell, comments are small, but they need to be trackable, and filesystems don't like small files - even with simple threading it might be a good idea. I otherwise completely agree.

      --
      I know tobacco is bad for you, so I smoke weed with crack.
    124. Re:The real reason people like noSQL... by badkarmadayaccount · · Score: 1

      JITs still have a way to go, until they reinvent the stuff from the 90's. But, if take care to notice - most of the molasses is written in C/C++. Or is hitting stupid bottlenecks, in the filesystem (cache pre-heating on boot ought to fix that, and maybe some filesytem denormalization, and/or two-tiers storage, sadly, that is reserved for "enterprise grade" systems). Or the system linker (guys, screw the prelinker daemon, just fuking run busybox on the fucking libs).

      --
      I know tobacco is bad for you, so I smoke weed with crack.
  5. Re:Whatever by JonySuede · · Score: 1

    no but when you are working with objects
    it is cumbersome to have to write into unchecked string.

    --
    Jehovah be praised, Oracle was not selected
  6. nothing new in computer engineering since 1980 by Hazel+Bergeron · · Score: 2, Funny

    Nothing new in computer engineering since 1980. Prove me wrong.

    1. Re:nothing new in computer engineering since 1980 by ArsonSmith · · Score: 1

      let's see. 1980 had both 1's and 0's. today we have just 1's and 0's. Even before 1980 someone invented -1's 0's and 1's, but it never really took off.

      So...

      nope, nothing new in computer engineering.

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    2. Re:nothing new in computer engineering since 1980 by Anonymous Coward · · Score: 0

      Shor's algorithm.

    3. Re:nothing new in computer engineering since 1980 by Anonymous Coward · · Score: 0

      What happened in 1980?

    4. Re:nothing new in computer engineering since 1980 by DogDude · · Score: 1

      If it ain't broke...

      And SQL isn't broke... there are just lots of people too lazy to learn not only the language, but to learn the fundamentals of how a relational database works.

      --
      I don't respond to AC's.
    5. Re:nothing new in computer engineering since 1980 by Anonymous Coward · · Score: 0

      OpenGL

    6. Re:nothing new in computer engineering since 1980 by lennier · · Score: 1

      Come on, didn't the Sinclair QL single-handedly revolutionise computing? Aren't we all using stringy floppies today, as we whizz on our C5s to the Ministry of Space?

      In your heart, you know it to be true.

      --
      You are not a brain: http://books.google.com/books?id=2oV61CeDx-YC
    7. Re:nothing new in computer engineering since 1980 by Anonymous Coward · · Score: 0

      World wide web, client-server computing, three-tier and n-tier architectures.

    8. Re:nothing new in computer engineering since 1980 by kvezach · · Score: 1

      GPGPU and coding for 216-core systems. Engineering peer-to-peer networks that stay robust in the face of attackers tinkering with the protocol. Quantum computers if you focus on the science, huge datacenters if you focus on the engineering.

  7. Re:I am weary of anything Microsoft by badboy_tw2002 · · Score: 1

    Epic M$ hate bro. There's a new web board forming called "Slash-dot" and I hear they're going to open up a comment section. You should check it out, I think you'd do well there. BTW, do you think there's anything to this "Y2K" problem or what? Either way I'm going to "party like its 1999"! :)

  8. Re:Curse of Java developers by Anonymous Coward · · Score: 0

    Or those developers never heard of a reporting database (for lack of a better term) or a data cube. I remember having a reporting database server. The hardware was even setup differently. The reporting server was mostly reads while the transactional database system was a hell of a lot more writes. We had different RAID systems on each server. One for better write performance the other favored reads. Every night the last days data was copied to the reporting system. All the data cubes were updated. All the reporting tables were also updated. The reporting tables often summed up the data to make it easier for the marketing people to understand.

  9. not surprising by Anonymous Coward · · Score: 0

    Think about it, SQL is proven to be sufficient to store any relationships between data (though it may be ugly). SQL can be captured onto a spinning disk by using one of those fancy DB engines. noSQL get's rid fo the fancy DB engine, so why is it surprising that SQL and noSQL can be shown to be equivalent? And coSQL then amounts to adding an interface layer that can be translated down to either representation. Jeeesh -- what passes for interesting these days!

    1. Re:not surprising by MightyMartian · · Score: 5, Insightful

      To my mind, SQL's biggest problem over the years has been really shitty implementations (and yeah, I'm looking at you, MySQL).

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
  10. Re:I am weary of anything Microsoft by Ant+P. · · Score: 0

    They don't need the 3 e's any more - they just make up bullshit like this, spam it everywhere until people start to use it, then surface their submarine patents.

  11. NoSQL? A better name... by Anonymous Coward · · Score: 0

    would be NoConsistency. Oh wait, they have eventual consistency... pretty good for twitter where no one cares to get stuck in a partition missing that gorgeous (fake) blond posting that she's cleaning her teeth.

  12. Both can be combined by Anonymous Coward · · Score: 0

    Greenplum supports both SQL and MapReduce (NoSQL) native.

  13. Re:Whatever by TemporalBeing · · Score: 1

    no but when you are working with objects it is cumbersome to have to write into unchecked string.

    Then you're doing it wrong.

    --
    Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
  14. NoSQL is great when hiring developers. by Anonymous Coward · · Score: 2, Insightful

    I really like NoSQL. It's a great tool to use when deciding whether I should hire a given software developer, or whether I should move on to the next candidate. All I have to do is ask the person what he thinks about NoSQL. If he gives a positive response, I send him on his way. If he points out its many flaws, I'm often tempted to hire him instantly. After all, those who dislike NoSQL the most generally know how to write good SQL queries, and they know how to use relational databases properly. They're the kind of people I want to hire, even if the position doesn't involve databases much. It just goes to show that they care about quality, that they care about knowing how to use their technology well, and that they care about doing the job properly.

    1. Re:NoSQL is great when hiring developers. by Sarten-X · · Score: 2

      That's okay... Facebook, StumbleUpon, and Twitter will be thrilled to have you pre-screening their applicants to weed out those who refuse to break tradition in the search for improvement.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    2. Re:NoSQL is great when hiring developers. by Ash-Fox · · Score: 1

      That's okay... Facebook, StumbleUpon, and Twitter will be thrilled to have you pre-screening their applicants to weed out those who refuse to break tradition in the search for improvement.

      Don't Facebook and Twitter continue using MySQL for their core software still while using NoSQL for specialized circumstances?

      If that is the case, I suspect these companies already have the talent they need for their very specialized niches. I don't think they have that many jobs in that area as what I consider, implied by your post. Due to NoSQL not being fairly common like SQL is currently in both large and small operations.

      I'm unconvinced that opting for NoSQL all the way would be the right decision for acquiring a job in general. Just looking at monster.co.uk, I only found 18 results for NoSQL with not so common programming languages either while 'SQL' returned 2767 results, many of which included far more common programming languages.

      If anything, I would honestly recommend people learn both the strengths and weaknesses of both systems and knowing where implementations of either side work best for.

      To reassert my point, I am really not convinced that NoSQL is a magical job bringer.

      --
      Change is certain; progress is not obligatory.
    3. Re:NoSQL is great when hiring developers. by Sarten-X · · Score: 1

      NoSQL certainly isn't magical, nor is it the solution for every problem. My point is that rejecting any job candidate because they're familiar with a new technology is asinine, and it's a sure way to be left behind by more open-minded companies.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    4. Re:NoSQL is great when hiring developers. by dave87656 · · Score: 2

      So, you're one of those managers. Your black and white response is too simple. It depends on the application. For some things, NoSQL (key-value stores) are simpler, faster and more scalable. For the typical business application SQL solutions are probably better. What is your application?

    5. Re:NoSQL is great when hiring developers. by GooberToo · · Score: 1

      Ugh!

      The problem is, this "improvement" has be tried and failed repeatedly over the last four decades. Here's the cycle. Some douche says, "SQL sucks", and offers the world a "vastly superior solution." Ignorant masses flock to it because of the buzz; and frequently because they lack SQL knowledge. A half or full decade later, the flocks wake up and say, "Man, were we douches. What were we thinking..." Followed by the legacy systems they created being retired, ported back to a SQL solution, or some poor chump is left holding the bag, maintaining a slowly dying system without support.

      And many benchmarks have shown, almost none of the nosql solutions provide performance advantages over SQL. Furthermore, those which do provide performance advantages do so by making fragility of data its most significant feature; typically exceeding any performance benefits. Made worse, going the nosql route means leaving being a massive pool of proven, fast, and reliable tools, not to mention a large talent pool.

      So basically, to break down the two camps, you do so with fundamental labels; ignorance vs wisdom. Or, those who know history and those doomed to repeat it. Thus far, there is every indication those jumping on the ignorant nosql bandwagon are bending over to repeat history.

    6. Re:NoSQL is great when hiring developers. by DarkOx · · Score: 1

      See I would like to hear a more intelligent answer if I were you like:

      Well for most jobs the many mature SQL RDMS solutions are certainly the best tool to use as performance wise they are so highly optimized that its hard for anything to compete with them. They are also stable, reliable, and most importantly flexible providing a path to support future requirements and analysis. There are some cases though where the data set will be very large and the relationships will all be incredibly simple that NOSQL solutions *might* make sense.

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    7. Re:NoSQL is great when hiring developers. by Sarten-X · · Score: 1

      I can certainly see history repeating itself, after 100 years...

      Ugh!

      The problem is, this "improvement" has be tried and failed repeatedly over the last fifteen decades. Here's the cycle. Some douche says, "horse-drawn carriages suck", and offers the world a "vastly superior solution." Ignorant masses flock to it because of the buzz; and frequently because they lack stablehands. A half or full decade later, the flocks wake up and say, "Man, were we douches. What were we thinking..." Followed by the legacy vehicles they created being retired, sold off to buy horses, or some poor chump is left holding the bag, maintaining a slowly dying machine without support.

      And many benchmarks have shown, almost none of the horseless carriage solutions provide performance advantages over horses. Furthermore, those which do provide performance advantages do so by making fragility of workmanship its most significant feature; typically exceeding any performance benefits. Made worse, going the horseless route means leaving being a massive pool of proven, fast, and reliable vehicles, not to mention a large stablehand pool.

      So basically, to break down the two camps, you do so with fundamental labels; ignorance vs wisdom. Or, those who know history and those doomed to repeat it. Thus far, there is every indication those jumping on the ignorant horseless carriage bandwagon are bending over to repeat history.

      Looking back over history, I see many improvements that were often dismissed out of hand before they became commercially viable. It was only through the perseverance of their supporters and the eventual unbiased judgment of their adopters that such progress was eventually received. Now, I doubt NoSQL is going to dramatically change the data-storage world, but I do think its impact is worth some attention. The business push toward Big Data needs faster analysis than current techniques, and various MapReduce solutions, running on NoSQL platforms, show promising results that RDBMS solutions haven't been able to match. If nothing else, NoSQL provides pressure for RDBMS progress. Time will tell, but for now I'll devote a few hours a week to learning new technology, so I can make better-informed decisions when I need to.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    8. Re:NoSQL is great when hiring developers. by Requiem18th · · Score: 1

      The problem is that RDMS optimizations mean nothing when you spend 99% of your application time hydrating and dehydrating complex data trees. You tell yourself "I'm a wise man, I choose SQL" but you end up doing the same joint lookups and bluiding the same objects from the tables over and over and over.

      In other words unless 100% of your application is written in SQL you *are* already using NoSQL. Custom made, application side, ad hoc NoSQL.

      The kinds of optimizations offered by RDMS are great for aggregation and analysis of data. After all you have to ask yourself. How is this data going to spend most of it time? Being aggregated and analyzed or being converted back and ford into a complex data structure? That's the question basically.

      Not that you are making the argument that RDMS are the only acceptable solution, but you really don't give credit to key-value stores. One thing you have completely wrong is that you suggest using key-value stores for simple relation ships while storing arbitrarily complex data structures is NoSQL's forte.

      The size of the data set is not really the point of key-value stores. You mention that because all the success stories of NoSQL are about huge data sets.

      If your relations are really simple, there is no reason a SQL database would fail to serve you. The reason traditional RDMS fail at such large scales is because the data is both humongous *and* complex.

      --
      But... the future refused to change.
    9. Re:NoSQL is great when hiring developers. by maxwell+demon · · Score: 1

      But if NoSQL data bases are just key/value stores, then why not simply use the key/value store provided by the operating system, generally known under the name "file system"?

      --
      The Tao of math: The numbers you can count are not the real numbers.
    10. Re:NoSQL is great when hiring developers. by Requiem18th · · Score: 1

      Are you trolling me?

      Look, for starters you need a client/server system for such simple things like decoupling the data store from the application, and before you can start talking about sharding, load balancing etc.

      And of course there is the issue of querying. If your data is split among several servers it is crazy to have each application instance mount a network share with the datastore/file system, grab each file in turn, managing locking from the instance and map-reduce the relevant data from each of the data store shards.

      Did I just fed a troll?

      --
      But... the future refused to change.
    11. Re:NoSQL is great when hiring developers. by GooberToo · · Score: 1

      Except nosql brings absolutely nothing new to the table. Literally, the only thing new nosql brings is hype. Nosql is a re-release of long existing technology which was first used on mainframes and has continued to be used after decades of use.

      Literally, there is no new pressure on SQL, aside from ignorant hype. Furthermore, time and time again, and indicated in modern tests, nosql solutions typically perform worse than sql solutions and even add poor support, a small talent pool, and a tiny subset of tools.

      Made even worse, only a tiny, tiny, tiny, tiny, tiny, tiny, tiny, fraction of nosql users should even be using nosql solutions. The fact its being widely adopted and is receiving so much hype is not only validation of the hyper surrounding the technology, but the general ignorance and stupidity of those picking it as a solution.

      At least the database technology, on which nosql solutions are based, are actually reliable and robust.

  15. Dual ... monadic ... uhuh ... by SickLittleMonkey · · Score: 1

    "Relational SQL and key-value NoSQL models are mathematically dual, and provides a monadic query language for what they have coined coSQL."

    I'm glad somebody clarified that! (Time to RTFA.)

    --
    main() {1;} // zen app
    1. Re:Dual ... monadic ... uhuh ... by JonySuede · · Score: 1

      What this all means is that coSQL and SQL are not in conflict, like good and evil. Instead they are two opposites that coexist in harmony and can transmute into each other like yin and yang. Because of the common query language based on monads, both can be implemented using the same principles.

      here, you should have skipped to the conclusion.

      --
      Jehovah be praised, Oracle was not selected
    2. Re:Dual ... monadic ... uhuh ... by Sarten-X · · Score: 1

      They're wandering doppelgängers... that's obvious, right?

      --
      You do not have a moral or legal right to do absolutely anything you want.
  16. Endless debate by alex67500 · · Score: 3, Insightful

    There are only 2 types of languages:
    - those people bitch about, and
    - those no one ever used

    1. Re:Endless debate by Anonymous Coward · · Score: 0

      ISBL is the good, but rarely used, counterpart of SQL: http://en.wikipedia.org/wiki/ISBL

  17. Joke time ! by alex67500 · · Score: 5, Funny

    An SQL statement walks into a bar. He sees 2 tables and asks "May I join you?"

    1. Re:Joke time ! by Compaqt · · Score: 1

      Naturally, of course.

      --
      I'm not a lawyer, but I play one on the Internet. Blog
    2. Re:Joke time ! by youn · · Score: 1

      Lol, this is hilarious... I guess we could let the joke go on... .. and that triggers an angry rant from one of the table that says, ah drop it, had a bad day, I have been out in the field for a transaction that went wrong... I guess I hade been out too long wasn't updated on how corrupt they had become... I had no backup plan, so I think I am out of order

      --
      Never antropomorphize computers, they do not like that :p
    3. Re:Joke time ! by Anonymous Coward · · Score: 0

      An SQL statement walks into a bar. He sees 2 tables and asks "May I join you?"

      ha!

    4. Re:Joke time ! by Anonymous Coward · · Score: 0

      And they say, "No, SQL!"

    5. Re:Joke time ! by Anonymous Coward · · Score: 0

      b:p

  18. Re:Whatever by JonySuede · · Score: 1

    When you have to support legacy data and applications any way you do it, you are doing it wrongly.

    --
    Jehovah be praised, Oracle was not selected
  19. Re:Whatever by Anonymous Coward · · Score: 0

    I have seen the pipe used as a field marker since adding a columns was to costly at the time. Try your fancy orm for a join on this

  20. Not to mention... by Anonymous Coward · · Score: 0

    The quantity is overwhelming and also conveniently broken into an overwhelming flood of users with relatively trivial needs, localized data access patterns, and little need for synchronization. These consumer mass-media aspects are what allow the embarrassingly parallel solution that is "scale out".

    1. Re:Not to mention... by DavidTC · · Score: 1

      And I'm still not convinced that it wouldn't work better in SQL. There's absolutely no reason you couldn't make relational tables like you have to use NoSQL.

      NoSQL seems just an argument in laziness. It seems like a weird mix of caching and unwillingness to design databases correctly.

      But I got sick of that argument, so I just with the idea that you need NoSQL for massive amounts of data...

      ....which still means that almost no one should use it.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    2. Re:Not to mention... by Anonymous Coward · · Score: 0

      Right, no argument from me (same AC you were responding to above). I face problems at work where there is 1 client with 10 novel requests, not 100M clients with 1K identical requests each, and none of these "share nothing," "scale out" solutions do jack shit for me. But a bunch of my peers and bosses are a bit infected with the fantasy that all the popular press must mean *something*.

      I get stuck trying to remain calm while explaining to them that map-reduce was the first thing we learned in Lisp, in lower division CS class in school, a long time ago. Not some amazing new thing. It's like watching a child "discover" recursion and insist that all CS prior to 2008 is obsolete.

      Thankfully, I got them to be skeptical enough to allow us to experiment... we provisioned a VM with about 50 GB of RAM, installed PostgreSQL and adjusted a few default config values, loaded 1.5 billion records, and then showed that some of the client's queries, feared to be intractable, could be answered in about 2 hours of processing time (after spending an afternoon designing the SQL query, and I've only touched SQL for about 1 year now, after spending the last 15 years in HPC and distributed computing).

    3. Re:Not to mention... by csirac · · Score: 1

      You can use SQL for everything, or you can use the best tool for the job. Usually that's SQL, but the other choices aren't just for big data: graphdbs like neo4j allow you to efficiently query deeply, arbitrarily linked data in a way that just can't be done with SQL.

      And then there's the triple/quad-stores like jena, 4store, virtuoso which allow you to answer questions from your data that you couldn't even begin to imagine doing with SQL.

      So although I think these graph & "triple" DBs are the way of the future, it's an extremely crazy thing to ditch SQL for your core business data. But it's also crazy to dismiss these non-SQL technologies simply because they aren't SQL - there is a lot of potential in having your data in one or more of these "alternatives", similar to the value you get from wiring up solr/lucene for full-text search.

      We've been doing a project with MongoDB (no, we're not using it as our authoritative data store, but neither are we using SQL for that), which we could have done with an SQL DB, but honestly we didn't have the resources to do so. We have less than a million records, hardly a huge amount of data - our data is arbitrarily structured, fitting the document-object model perfectly, and makes for absolutely meaningless SQL tables (with many joins, stored procedures so that we could try to service an obscure perlish query language).

      Additionally, the ability for us to delegate some parts of the more complex queries to JS on the server(s) is incredibly useful. And the integration cost was very low: the perl driver is officially supported by 10gen, it fit quite naturally into the project... the proof of concept was done in just a couple of weeks.

      Our contractor has, however, discovered some irony with MongoDB's "schemaless" claim: unless you can pick an extremely finite set of fields to be indexed, you can't actually do arbitrary queries on arbitrary documents... in other words you need to decide on a schema :-)

    4. Re:Not to mention... by DavidTC · · Score: 1

      And then there's the triple/quad-stores like jena, 4store, virtuoso which allow you to answer questions from your data that you couldn't even begin to imagine doing with SQL.,

      Here, we're running into the stupidity of the name NoSQL. What promoters normally mean by that are 'non-relational'.

      From what I understand, the databases you just listed are relational. Triplestores just use a simpler query language, and a simpler database layout, allowing for much greater speed.

      Our contractor has, however, discovered some irony with MongoDB's "schemaless" claim: unless you can pick an extremely finite set of fields to be indexed, you can't actually do arbitrary queries on arbitrary documents... in other words you need to decide on a schema :-)

      Document stores are great for storing documents and indexing metadata and the entire content. They are not great at indexing random parts of it.

      I have a feeling if you actually got that indexed, you'd be at the point where the solution would be heavier than just using SQL.

      We've been doing a project with MongoDB (no, we're not using it as our authoritative data store, but neither are we using SQL for that), which we could have done with an SQL DB, but honestly we didn't have the resources to do so. We have less than a million records, hardly a huge amount of data - our data is arbitrarily structured, fitting the document-object model perfectly, and makes for absolutely meaningless SQL tables (with many joins, stored procedures so that we could try to service an obscure perlish query language).

      See, the thing is, I don't think you know what's going on. No one, at least not me, has a problem with people using a document store to store an insane amount of unstructured documents and trying to pull some sense out of them. That's what they're for.

      But there are people out these who have decided to use a document store, because NoSQL is 'better' than SQL, or they're just lazy, so they lump their data together and throw it in one. Or they decide that their user database should be kept in HBase. And then people like me have to deal with the results of that shitpile.

      No one here is against non-relational databases, we're against the idiotic 'NoSQL movement' that has randomly sprung up where fools decided to use something besides perfectly functional non-relational databases.

      People switch to non-relational databases when what you're trying to do doesn't work well in a relational one, and that's fine. Sadly, we have a lot of people out there with no database knowledge who have decided to switch because NoSQL is 'newer and better' or because they simply don't understand how to make relational databases so throw lumps of data in an object store.

      --
      If corporations are people, aren't stockholders guilty of slavery?
  21. NoSql by codepunk · · Score: 1

    If I am running a NoSql solution it is because I need every bit of speed I can muster. Putting a additional layer on top of that does nothing to reach that goal.

    --


    Got Code?
    1. Re:NoSql by Jonner · · Score: 1

      You're not getting every bit of speed you can muster unless you're in control of what's happening at every level, down to every CPU register, byte in RAM, on a disk (not file), and every cache in between. That approach used to be common when chips were slow and expensive, but not any more because it's just not worth the effort. If you're using a "NoSql solution," you are not in control of every byte at every level.

  22. Column Based Storage by PhrstBrn · · Score: 1

    I thought the whole reason why NoSQL is "better" than SQL is it's based on column based storage, while most SQL databased are row based storage. Couldn't you make a column-based database that uses SQL as a query language? There is nothing wrong with SQL as a language, there are just some workloads where column based storage is faster (mostly data analytics).

    1. Re:Column Based Storage by Haxamanish · · Score: 1

      Couldn't you make a column-based database that uses SQL as a query language?

      Sybase IQ is column based and uses SQL.

    2. Re:Column Based Storage by Estanislao+Mart�nez · · Score: 1

      I thought the whole reason why NoSQL is "better" than SQL is it's based on column based storage, while most SQL databased are row based storage. Couldn't you make a column-based database that uses SQL as a query language? There is nothing wrong with SQL as a language, there are just some workloads where column based storage is faster (mostly data analytics).

      There are a number of column-oriented SQL databases. Another commenter pointed out Sybase IQ; I'll point out Vertica, and leave you to Google others if you want.

    3. Re:Column Based Storage by Anonymous Coward · · Score: 0

      Simple, just turn your data on its side and the columns become rows. Problem solved.

    4. Re:Column Based Storage by FlyingGuy · · Score: 1

      Column based storage is crutch for idiot MBA's and finance weenies who only understand spreadsheets.

      Just look at their spreadsheets with columns that have 01,02,0n after the names.

      You

      constantly have to tell them that spreadsheet != database.

      --
      Hey KID! Yeah you, get the fuck off my lawn!
    5. Re:Column Based Storage by Anonymous Coward · · Score: 0

      But then the data is a lot harder to read!

  23. Re:Whatever by sapgau · · Score: 1

    +1

  24. Re:I am weary of anything Microsoft by Anonymous Coward · · Score: 0

    Weary, or wary? (or maybe both?)

  25. Re:I am weary of anything Microsoft by Anonymous Coward · · Score: 0

    :-) The team is actually in a product group and we are doing this for real :-))

  26. Relational Databases are great, not SQL itself by bigsexyjoe · · Score: 2

    My I'm just being a nit-picky coder here, but I don't get why they call it noSQL, when they are really referring moving away from relational databases?

    When I first heard of "NoSQL", I thought, "Great! SQL is a terrible syntax with all it's six letter words and easy dangerous mistakes. I would love to have a superior syntax for interacting with the relational databases that are central to my work!" But "NoSQL" should be called "NoRelational." It is kind of strange that you are changing the whole paradigm of the database around and you are describing it as changing a superficial feature. It would be like calling emails "no pen" writing.

    1. Re:Relational Databases are great, not SQL itself by bondsbw · · Score: 1

      Agreed... and on that note, the article really should be "relational" and "co-relational", instead of SQL and coSQL.

      --
      All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
  27. Re:I am weary of anything Microsoft by Anonymous Coward · · Score: 0

    Rich!

  28. Re:Whatever by nschubach · · Score: 1

    See my sig. There are some parts of SQL that bug the snot out of me.

    --
    Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
  29. Re:I am weary of anything Microsoft by c0lo · · Score: 1

    Microsoft researchers Erik Meijer and Gavin Bierman ... present a mathematical model and standardized query language that could be used to unify SQL and NoSQL data models."

    Maybe we should add...

    "in an [impossible] exploratory effort to embrace, extend and extinguish..."

    at the end of the sentence as they have done in the past.

    TFA

    CONCLUSION

    The nascent noSQL market is extremely fragmented, with many competing vendors and technologies. Programming, deploying, and managing noSQL solutions requires specialized and low-level knowledge that does not easily carry over from one vendor's product to another.

    Notes:
    1. nothing to embrace in this phase... actually too many to embrace, thus not yet a "standard"
    2. can't stop to note that all the examples are LINQ-based. Is this an attempt to grow LINQ in a "standard"?

    --
    Questions raise, answers kill. Raise questions to stay alive.
  30. Nonsense Dressed up in math by Anonymous Coward · · Score: 0

    SQL and noSQL have so little in common other than the letters S Q and L that their paper is just nonsense.

    Dressing in math doesn't make nonsense anymore respectable than otherwise -- funny? as in the following? probably.

    I read this so long ago in print, I thought I may not find it on the web, but here it is. Enjoy gobbledygook shrouded in math (the first of the many URLs I found).

    http://komplexify.com/epsilon/2009/02/06/imperturbability-of-elevator-operators/

    MS Research could mainly be a tax shelter and may do as a side effect some god stuff, ocassionally.

  31. I'm skeptical by Estanislao+Mart�nez · · Score: 1

    That's a very interesting article, and I'm going to have to look up the research and read it a lot more carefully. But I'm worried that a lot of their analysis just assumes too strongly that relational model = SQL.

    For example, their claim that SQL is "not compositional." They define "compositionality" like this:

    What we observe here is SQL's lack of compositionality—the ability arbitrarily to combine complex values from simpler values without falling outside the system.

    Leaving aside that "compositional" is an odd word to use for this, the first problem here is that the relational model is in fact agnostic about this so-called "compositionality" of column's value's types. The relational model, strictly speaking, doesn't forbid you from having composite-typed columns.

    Some, some proposed purely relational solutions to the problems tackled by outer joins is to allow non-base columns to have relations (i.e., sets) as their values. To put it in more SQL-like terms, you could have queries whose result sets had columns whose value was also a multi-row result set. This sort of thing solves the Figure 4 problem from TFA—you would have one row in the result, with Title="The Right Stuff" and Keywords={"Book", "Hardcover", "American"} (a set-valued Keywords column in the result). We can even sketch a SQL-like query for this (not actually valid SQL):

    SELECT p.title AS Title, (SELECT k.keyword FROM keywords k WHERE k.productId = p.ID) AS Keywords
    FROM products p
    WHERE p.rating = '****'

    Or this, with a fictional "SET" aggregate function: (again, not actually valid SQL):

    SELECT p.title AS Title, SET(k.keyword) AS Keywords
    FROM products p INNER JOIN keywords k on p.ID = k.productId
    WHERE p.rating = '****'

  32. IIRC, ISAM used in COBOL & before SQL by Anonymous Coward · · Score: 0

    Per my subject-line above, ISAM database methods were in use before SQL, & used COBOL as an accessing language to said data (along with other programming languages as well):

    "Actually COBOL predates SQL by about 10 years" - by garyebickford (222422) on Thursday April 07, @06:12PM (#35751050)

    Indexed Sequential Access Method was in use with COBOL before SQL ever was...

    APK

    P.S.=> Just some "FYI", but I am subject-to correction too, so IF anyone knows differently, let me know... apk

  33. using noSQL by Compaqt · · Score: 2

    Could I pick your brain since you have a bit of NoSQL experience?

    How does indexing work in NoSQL? Are there EXPLAIN-type tools available? (EXPLAIN in MySQL tells you whether your query is using indexes or table scans, and can help you understand why your query is slow.)

    I'm pretty flexible with SQL. Can you do just about any query you could with SQL? ("Find all customers who have bought at least $100 of stuff over the last year, but who haven't bought anything this year.")

    --
    I'm not a lawyer, but I play one on the Internet. Blog
    1. Re:using noSQL by Sarten-X · · Score: 4, Interesting

      Yes, no, and yes, in that order. I'm basing my answers on HBase, with which I have the most experience. My answers are also practically guaranteed to be wrong in somebody's eyes, because HBase is so much more flexible than an RDBMS. If I describe one way of doing something, another layout may work just as well, and somebody's going to favor that way.

      How does indexing work in NoSQL? Are there EXPLAIN-type tools available?

      EXPLAIN tools aren't really necessary in HBase, because almost all nontrivial queries are a scan over a small chunk of the alphanumerically-sorted rows. It will take a while, but please allow me to explain. Each row is a multi-value key-value store, with each value having a column name. If you really want to stick to the RDBMS style, you could have your key be a numeric row ID, and scan everything for every query. It would suck, because you're not using any indexes.

      Indexes are more or less left up to the programmer. Creating an index is effectively just adding more rows to the table. For example, that RDBMS-style layout in the last paragraph could be a table of ID numbers, usernames, passwords, and permissions (for 50 billion people, I guess...). For whatever business reason, the main key will be the ID number. Those rows are easy. They have the expected value columns: username, password, permissions. To index by username, we add new rows, with just a column for the ID number. We could just duplicate the data, but let's not. Now, our table is going to be huge, but sparse. Half of the rows have three of four columns filled, and the other half has only one. Searching by name, it'll take two requests to get to the actual row we want, but that's okay. Doubling the amount of work lets us run faster.

      The reason for that is HBase's split design. HBase's table is split into column families and regions. Column families are a means to group columns, so that even on data with overlapping key space, separate data could remain separate. Column families are stored as separate files in Hadoop. In our example, the username "index" could be a separate column family. That could speed up scanning, because the rows keyed by numeric usernames won't be interspersed with the rows keyed by user id. More importantly, the table is split into regions, each containing a number of rows. Those regions are also stored as separate files, and distributed across the entire Hadoop cluster.

      The cluster is really where Hadoop gets its speed. If we were to run all of our processing from one central location, it would be horribly slow and require a ridiculous number of requests. Instead, we'll distribute everything, including the query, similar to how some RDBMS sharding schemes work. We send a request to all nodes, asking for "the row with the key that matches the value of the 'userid' column of the row with a given key". Each node will report back its results. Unlike RDBMS sharding, the partitioning is handled automatically by HBase into regions that are optimal. It's these regions that are scanned for every request.

      After all of that, it should be quite clear: With HBase, the programmer is expected to know the layout of the data, and write requests based on the key. There is no EXPLAIN tool, because everything is just a key-value lookup.

      Whew. Next question...

      Can you do just about any query you could with SQL?

      Yes, but it's different. Every lookup is handled by scanning a region (in parallel on nodes that have that region's data files), and checking each column of each row to see if:

      1. The row key matches what was requested, or falls within a given range.
      2. The row contains a column that was requested.
      3. A given filter approves each column.

      Note that last item. The filter is simply a program that tells Hadoop whether the row (or some part of it) should be included in the returned results. That program can include other HBase requests, using other filters. If you're really stuck on using RDBMS

      --
      You do not have a moral or legal right to do absolutely anything you want.
  34. overnormalization by Compaqt · · Score: 1

    I'm thinking about wading into the noSQL waters. Help me out:

    If authors aren't normalized, does that basically mean you don't have a separate datastore (table, whatever) for authors? E.g., a publisher might want to keep track of author name, address, etc.

    Here's another classic example: country codes vs. country names: (ca, Canada), (us, United States).

    If you want to be able to use both, you'd would (classicly) store "ca" in your User table (for what country he lives in), and then have a separate Countries table that tells you what "ca" stands for.

    How do you approach that in NoSQL (assuming you want to make use of both codes and full country names)?

    --
    I'm not a lawyer, but I play one on the Internet. Blog
    1. Re:overnormalization by DeadDecoy · · Score: 1

      Since you can store anything in the database, you might want to constrain your inputs at the application layer, maybe with an ORM or some validation checking. I've ended up using mongo with python (weak typing) so I could just write: country = { "code" : "ca", "name" :"canada" } db.places.insert(country) Since you can enter primitive values in place of ca or canada, garbage can get in your data. Mongo would just interpret it a certain way and store it in the db. In other words, you can totally shoot yourself in the foot if you're not careful. That being said, this also means that you can have application code which uses it and doesn't have to be written to a specific type. To me, this is like the argument of strongly typed languages vs weakly typed languages: No type checking can lead logic errors, but has much terser code in general.

  35. Any Recommendations? by Compaqt · · Score: 1

    For people who have worked with NoSQL (assuming you've worked extensively with SQL before):

    1. For someone wanting to either scratch an itch, or come up with the Next Great Thing, would you recommend NoSQL-type solutions to do the standard save data coming in over the web, and later retrieve it, possibly rejigger and summarize it, and feed it back over the web when a user needs it thing?

    2. Is NoSQL generally considered faster than SQL equivalents? At runtime or development time?

    3. Is there a concept of DB design? Or is it just made up as you go? By doing additional .insert()'s?

    I.e., you start off by .create(product). Then add fields: .addAttribute('name', 'Magic Rock') .addAttribute('manuf', 'Rock Emporium')

    Then you add in detail for the manufacturer table: .addAttribute('name', 'Rock Emporium') .addAttribute('st', '123 Main St') .addAttribute('state', 'NY')

    Is that how it works?

    4. And can you change field names later (ALTER TABLE)?

    5. What about aggregate functions (MAX, GROUP BY, HAVING)?

    The whole thing seems awfully gooey.

    --
    I'm not a lawyer, but I play one on the Internet. Blog
    1. Re:Any Recommendations? by angel'o'sphere · · Score: 1

      Well,

      I answer slightly simplified, as someone will add his own views anyway ;D

      First of all "NoSQL" does not mean "no SQL" ... it means "not only SQL". In other words, you likely will store parts fo your data in SQL and parts in "no SQL" databases.

      To your questions.


      For people who have worked with NoSQL (assuming you've worked extensively with SQL before):
      The correct word is "intensively" not "extensively" I have no clue why people use that word the last few years everywhere. Extensive is the opposite of intensive.


      1. For someone wanting to either scratch an itch, or come up with the Next Great Thing, would you recommend NoSQL-type solutions to do the standard save data coming in over the web, and later retrieve it, possibly rejigger and summarize it, and feed it back over the web when a user needs it thing?
      No. Or Yes, your question is frankly to shallow. It is a question of amount of data and the structure of the data and the retrieval pattern.
      Usually noSQL supports nothing like "rejigger and summarize" if you need summarization, you have to summarize during storing and save that, or you have to retrieve lots of data and summarize it in memory with your "program".


      2. Is NoSQL generally considered faster than SQL equivalents? At runtime or development time?
      Neither. Development time is likely slower as there is (depending on technology used) a HUGHE learning curve to master. At runtime it can be faster under certain conditions. Guess what ... thats the main reason why people are using it. Furthermore it is easy to scale. Usually you just add another "node" ... a PC.
      The key is to figure out if those conditions apply to you. If so, noSQL is arbitrarily faster than SQL, as the way how it works is completely different. As long as you get not into network limits, noSQL clusters scale linear with number of nodes.
      Usually e.g. you don't delete data, you just let the DB grow and figure what is outdated later. You have no "transactions", if you click on my facebook account and you don't see my latest status update just now we both never will know. How ever it will eventually be consistent. And if you look later again, you will see it. If I write a new update the server "program" is not "waiting" for the complete "transaction" to compete. You know: 2 million users trying to "write" to a DB at "the exact same time" to make an "transaction" would mean ... if one transactions takes 1/1000th of a second ... the last of those users would need to wait: 2,000 seconds.


      3. Is there a concept of DB design? Or is it just made up as you go? By doing additional .insert()'s?

      Ofc there is. If you ever programmed assembler and loved it, you might love this, too.
      As you have to design the DB structure basically on the layout of the data in the file system.
      In other words: no, there are no tables. And the things you have, call it ColumFamilies e.g. have no foreign keys e.g. except if you say: well, that string in this "table" is always a date, and I can use it as key elsewhere.
      You have no queries that span several "tables".
      You only can pick "objects" from one "table".


      I.e., you start off by .create(product). Then add fields: .addAttribute('name', 'Magic Rock') .addAttribute('manuf', 'Rock Emporium')

      Then you add in detail for the manufacturer table: .addAttribute('name', 'Rock Emporium') .addAttribute('st', '123 Main St') .addAttribute('state', 'NY')

      Is that how it works?
      No, that is an example for an object oriented data base. .... and you are missing the "DBEngine.store(graph)" statement ... or do you think it is going into the DB by itself?
      In fact what you describe is still on the p

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    2. Re:Any Recommendations? by Anonymous Coward · · Score: 0

      In other words, it's flat text files.

      "But it's not! It's NoSQL!" say the NoSQL people.

      "Then what is it, exactly?"

      "OH GOD YOU JUST DON'T GET IT, READ UP ABOUT IT!"

      So I go read up about it, and it's exactly flat text files.

      "It's flat text fi--"

      "YOU JUST DON'T UNDERSTAND NOSQL!"

      NoSQL is nothing special. It's shit we've done for years, and we've added SQL to take care of more complex data structures. There's no reason to go back. NoSQL people are just latching on to some buzzword that means basically nothing and defending it with illogic.

    3. Re:Any Recommendations? by bondsbw · · Score: 1

      Mod -1 (Wrong, RTFA)

      NoSQL has absolutely nothing to do with flat files. In fact, by definition, SQL databases are flat, and no/coSQL are hierarchical.

      I am using the noSQL database db4objects, and its representation mirrors the representation of hierarchical Java/C# objects. RavenDB is another we considered that is built on top of JSON. XML is another way to implement noSQL.

      --
      All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
    4. Re:Any Recommendations? by bondsbw · · Score: 1

      I've used SQL extensively, and I currently use db4o as a noSQL embedded database. Why?

      - My program's object model is hierarchical, and noSQL is hierarchical by nature. This eliminates the need for an O/RM tool, as the structures match naturally.
      - db4objects requires no DDL. It reflects my object model and persists the structure automatically.

      The latter part was the killer feature for me. I literally got our entire program of over 100 classes persisting, from scratch, in the matter of a few minutes. And as it has grown, I have not needed to run ALTER TABLE commands, as db4o updates the persistance hierarchy automatically.

      - Persistance of a complete object is very easy. I open the database, call "db.Store(myLargeComplexObject); db.Commit();", and it's in the database.
      - Retrieval of a complete object is very easy. I simply call "db.Query().Where(o => o.Id == myID);"

      But... that said, noSQL is not for everybody and every task. As the article suggests, SQL and coSQL can do anything the other can do, but SQL tends to be more natural in the case of ad-hoc queries. For my task, I don't need many ad hoc queries, but I have a natural hierarchical relationship, so noSQL seems to be a better fit.

      --
      All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
  36. My man crush for Erik Meijer just grew by vashfish · · Score: 1

    WTB Signed tie-dye

  37. NoSQL is a compromise by Mazzie · · Score: 1

    From what I have learned about the uses for and abilities of NoSQL, its a compromise you make when affordable scalability is required to stay in business. It is nowhere near as powerful as the RDBMS/SQL combination, however it is much cheaper to run. Don't believe anyone who tries to tell you there are things you can do with NoSQL that you can't do with SQL. That is complete bunk. Maybe it makes speed cheaper, and scaling easier, but those decisions should be forced by application demand and budget constraints, not application design. I am most interested in NoSQL as a way to store denormalized data in a pre-cache for light write, heavy read applications. Any other use would probably be due to desperation to scale to keep up with demand.

    --
    Having a bookmark to Google does not make you an expert on everything.
    1. Re:NoSQL is a compromise by thaig · · Score: 1

      Well you can create giant planet-sized data stores and find things in them :-) That's pretty cool.

      It seems to me analagous to arguing that neural networks are inaccurate and "nowhere near as powerful as computers". Some 6 billion neural nets out there are nodding along in interest while someone demonstrates their X million line program to algorithmically teach a robot arm to play table tennis in a special room.

      --
      This is all just my personal opinion.
    2. Re:NoSQL is a compromise by Mazzie · · Score: 1

      You can create giant planet-sized data stores and find things in them with an RDBMS, its just not cheap or fast. I am not bashing NoSQL as a data store, I am pointing out that it's query language is not what makes it powerful. It's query language is limited compared to SQL, a compromise to be able to do queries that scale across many machines.

      --
      Having a bookmark to Google does not make you an expert on everything.
  38. Re:Curse of Java developers by pookemon · · Score: 1

    A "Reporting Database" huh.

    Try "Data Warehouse"... Sounds like classic ETL to me.

    --
    dnuof eruc rof aixelsid
  39. Re:Curse of Java developers by SQLGuru · · Score: 1

    OLTP vs DSS. Yep. Normalize and De-Normalize based on purpose and performance. NoSQL is just another tool in the toolbox. If there were one single magic tool, they wouldn't keep inventing new ones.

  40. Interoperate? by bigstrat2003 · · Score: 2

    Why? MongoDB is web scale, we don't need anything else!

    --
    "16MB (fuck off, MiB fascists)" - The Mighty Buzzard
  41. Where is the intelligence? by WaffleMonster · · Score: 1

    Modern commercial RDBMS systems have extremely complex intelligence to manage execution cost including self optimization cost, concurrency, partitioning, escalation, versioning, distributions, index selection, data caches, auto parallelization..etc.

    When I see people talking about alternatives be it object stores, key/value, log...etc I ask where is the intelligence... Where is the billions spent on R&D in these new systems? They all appear dumb imitations that always ask you to sacrifice something..be it consistancy, concurrency, model restrictions or for a human to exactly define semantics or access patterns to enable a specific solution.

    Is there really a way to create a new **general purpose** data system at least as powerful and useful as the RDBMS without spending on the order of a billion dollars on optimizer design?

    For some applications csv flat files run circles around the RDBMS... In the general case flat files suck.

    I believe generally the same applies across the board. Yes given a specific problem you can provide a specific solution that is faster better cheaper however the shortcut would not enjoy general applicability.

    1. Re:Where is the intelligence? by thaig · · Score: 1

      Have you not ever found a simple algorithm that beats a complex one simply because the situation converts the complex attempts to be "clever" into a disadvantage?

      Simple things are flexible.

      --
      This is all just my personal opinion.
  42. R-ing TFA: a bizarre experience by jejones · · Score: 1

    Reading the introduction is kind of bizarre. Apparently the motivation for the work is to reduce the NoSQL market to a few very profitable suppliers.

  43. SQL and NoSQL are *not* 2 sides of the same coin by Anonymous Coward · · Score: 0

    select if (understands=1, 'Proceed', 'Learn more') from programmer_knowledge where topic = 'ACID';

    select 'Many NoSQL advocates don\'t get it. Yes it really is *fundamental* for many applications.' where 'Eventually consistent' not like 'Consistent';

    select concat(name, ' is not a bank nor processes orders, trades, stock, enterprise data etc') from applications where type = 'Social Media';

    select if (essential=1, 'Use relational DB', 'Consider NoSQL') from system_requirements where requirement = 'ACID';

  44. Composite value types by Anonymous Coward · · Score: 0

    Composite value types violate 1NF (as defined by some people in the field.) since they are isomorphic to relations.

    1. Re:Composite value types by Estanislao+Mart�nez · · Score: 1

      Composite value types violate 1NF (as defined by some people in the field.) since they are isomorphic to relations.

      Yeah, but you wouldn't have them in the base relvars of your schema. You'd just allow queries and views to have set-valued attributes.

  45. NoSQL ? by bytesex · · Score: 1

    *reads up*

    Ah. This is the story of how every now and then the kids rediscover DBMs, that's it.

    --
    Religion is what happens when nature strikes and groupthink goes wrong.
  46. Wrong by Anonymous Coward · · Score: 0

    Examples. Your post is worthless and will be considered bullshit until you give us actual examples.

    SQL is widely used because it works very well. It is powerful, mature, and found everywhere. I'm a database programmer by profession, and I believe SQL is the perfect tool for the job. Of course it has limitations, but that's why you have procedural SQL (which is another great tool for its job).

    Let me guess: the only experience you've had with SQL is database 101. I was bored in that class too, but when you're working in the real world, it becomes a lot more interesting. So please, stop spouting off like a teenager crying to his parents to buy a shiny new sports car, when the minivan suits the job perfectly because it was actually designed for the purpose.

    1. Re:Wrong by nedlohs · · Score: 1

      You have a strange definition of "perfect".

  47. "here, here" "hear, hear" by Barryke · · Score: 1

    "here, here" "hear, hear"
    The first is an outing of belittling sarcasm, whilst the second is more like twisting your mustache approvingly but loudly.

    Seeing this is /. i chances are he was posting sarcasm.

    --
    Hivemind harvest in progress..
  48. Stored method fixes that. by Barryke · · Score: 1

    I'm also loving this thread. My solution: stored methods.

    Inserting data should (only!) be done via a method that sits inside the database. This method also writes a crosstable matching Client_Id with LatestTransaction_Id. Voila.. and for any existing data its just a onetime batch conversion. Doesn't get any faster. Also, there is NOTHING stored twice, and with proper stored methods the chances of this crosstable getting out of sync is zero.

    If you want data, store data. If you want information, extract / combine it from data.

    --
    Hivemind harvest in progress..
  49. Re:Whatever by Dog-Cow · · Score: 1

    Your sig has nothing to do with SQL. That alone tells me more about your skill and understanding than any other opinion you might hold.

  50. Re:I am weary of anything Microsoft by bondsbw · · Score: 1

    2. can't stop to note that all the examples are LINQ-based. Is this an attempt to grow LINQ in a "standard"?

    No, it's an attempt to promote understanding and usage of monads. LINQ is arguably the most widely used implementation of monads, it's just that many people don't realize it.

    Brian Beckman's Don't fear the Monads

    An excellent article explaining how LINQ is extensible to work with any monad

    A video by Erik Meijer explaining the duality of IEnumerable/IObservable and IQueryable/IQbservable, as stated in the original article

    --
    All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
  51. Re:Whatever by Anonymous Coward · · Score: 0

    SQL - Structured Query Language

    Seeing that his sig is talking about the language (granted, it's a subset), I'd say it's your understanding.

  52. Driving Backwards with Graph Blinders by Anonymous Coward · · Score: 0

    Meijer and Bierman think in terms of modeling from an OO, hierarchical perspective. Midway through TFA they say "starting with a natural hierarchical object model". They've missed the whole point of the relational data model, which is proven to be more general than a hierarchical model. The first comment in TFA succinctly drives the point home:

    "The relational model was shown by Codd to be capable of efficiently expressing any kind of knowledge that can be expressed with graphs. In fact, it was his analysis that paved the way for the near-extinction of the network and hierarchical models that prevailed at the time. "

    If you've enough gray hair to have ever built a large OO database, you realize that schema migration is a nightmare that rapidly becomes intractable as the data volume increases.

    The closed-world problems mentioned by Meijer and Bierman are real, and apply as much to a hierarchical data model as to a relational one. In the relational world, there is no such thing as a distributed foreign key, and in a hierarchical world, the vector may reference something in no-man's land as well.

    Meijer and Bierman also focus on normalized data models and fail to mention other relational modeling techniques such as the star schema that is commonly used in data warehouses. They seemingly equate the SQL language, a normalized data model, and an RDBMS, while ignoring the R(elational) in RDBMS.

    Problems such as tackling unstructured data are real issues and are not solved by either a hierarchical or a relational model.

    1. Re:Driving Backwards with Graph Blinders by Tablizer · · Score: 1

      Meijer and Bierman think in terms of modeling from an OO, hierarchical perspective. Midway through TFA they say "starting with a natural hierarchical object model". They've missed the whole point of the relational data model, which is proven to be more general than a hierarchical model...

      Although OO is not inherently hierarchical, OO designers seem to think in terms of hierarchies first, and this is often a mistake in my opinion. The most flexible systems use many-to-many relationships, not hierarchies. And, OO does not natively handle many-to-many very well.

      The key-words in the examples are an instance of many-to-many relationships. In this case they are a simple "list" of words, but if we wanted to have a better key-word "manager", then key-words would have their own definition table, and each key-word would have a value column and description column. This allows one to change or improve the description without having to change all the references to it. It also allows the use of referential integrity to make sure the keywords are spelled correctly, etc.

  53. Alternative Relational Language History by Tablizer · · Score: 1

    In the late 70's IBM created a relational query language called BS-12 (Business System 12) that looks to be more flexible than SQL. Perhaps IBM felt it was too "mathy" to sell to executives and went with SQL instead.

    There is also the "Tutorial D" family of query languages based around Chris Date's popular textbook. I personally don't like its syntax structure and don't think it fits well with dynamic typing, and thus created my own draft relational query language called SMEQL (LOR fans will like the name). It borrows from BS-12 and functional programming.

    Here's an example that returns the top 6 earners in each department

    srt = orderBy(Employees, (dept, salary), order)
    top = group(srt, [(dept) dept2, max(order) order])
    join(srt, top, a.dept=b.dept2 and b.order - a.order < 6)

    And a brief guide to the primary operators:

            * calc(table, columnTable) // similar to SELECT clause in SQL
            * filter(table, expression) // similar to WHERE clause in SQL
            * group(table, columnTable) // roughly similar to GROUP BY in SQL
            * join(table_1, table_2, expression)
            * leftJoin(table_1, table_2, expression)
            * orderBy(table, columnTable, [sequenceColumn]) // sorts or produces sequence numbers
            * union(table_1, table_2)

  54. Re:"here, here" "hear, hear" by maxwell+demon · · Score: 1

    The first is an outing of belittling sarcasm

    Citation needed

    --
    The Tao of math: The numbers you can count are not the real numbers.
  55. Re:I am weary of anything Microsoft by Anonymous Coward · · Score: 0

    No, it's an attempt to promote understanding and usage of monads. LINQ is arguably the most widely used implementation of monads, it's just that many people don't realize it.

    Beg to differ. Emacs with heaps of lisp macros, XPath

  56. sql database and virus attack by Anonymous Coward · · Score: 0

    yah! i agree there must be some new modification required. anyways i was working on my sql server 2008 and one day later i got the corruption in the database that was due to a malicious w32 virus. after removing it the database was corrupted and i used the sql database recovery to get back the corrupted database. thanks to the people from http://sqldatabaserecovery.webs.com , i actually get my every database objects back.