Slashdot Mirror


Cassandra 0.7 Can Pack 2 Billion Columns Into a Row

angry tapir writes "The cadre of volunteer developers behind the Cassandra distributed database have released the latest version of their open source software, able to hold up to 2 billion columns per row. The newly installed Large Row Support feature of Cassandra version 0.7 allows the database to hold up to 2 billion columns per row. Previous versions had no set upper limit, though the maximum amount of material that could be held in a single row was approximately 2GB. This upper limit has been eliminated."

60 of 235 comments (clear)

  1. Typical applications? by oldhack · · Score: 3, Interesting

    What sorta applications need so many columns? Curious.

    --
    Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.
    1. Re:Typical applications? by Brummund · · Score: 5, Funny

      Any application developed by one or more Visual Basic developers, given enough time.

    2. Re:Typical applications? by Musically_ut · · Score: 2

      What sorta applications need so many columns? Curious.

      From the article:

      An open source database capable of holding such lengthy rows could be most useful to big data cloud computing projects and large-scale Web applications, the developers behind the Apache Software Foundation project assert.

      So, basically, they don't know either but think (probably rightly so) that this a pretty cool feature. So cool that they made this the heading of their article.

      --
      Never trust a spiritual leader who cannot dance -- Mr. Miyagi
    3. Re:Typical applications? by gratuitous_arp · · Score: 5, Interesting

      Apparently the extra columns can be used to the effect of doing "more" than store data. A link in the article explains how lots of extra columns can be useful for querying data (Casandra doesn't use SQL). http://maxgrinev.com/2010/07/12/do-you-really-need-sql-to-do-it-all-in-cassandra/

      So the primary reason for this doesn't seem to be that one's run-of-the-mill database needs more columns.

    4. Re:Typical applications? by SQL+Error · · Score: 3, Interesting

      The main reason was that Cassandra prior to 0.7 didn't support secondary indexes. Your keys in a table ("columnfamily" in Cassandra-speak) were indexed, and the names of the columns in a row were indexed. And Cassandra is schemaless, so the columns in one row could be completely different to the columns in another.

      So you'd use columns as sub-records to get the data structures you need.

      With 0.7 and secondary indexes, that's going to be less important.

    5. Re:Typical applications? by jrumney · · Score: 5, Funny

      What sorta applications need so many columns?

      Facebook needs one column for every privacy violation.

    6. Re:Typical applications? by Whiternoise · · Score: 2

      I can only think of something where you might want to input something ridiculously large like an image (or similar matrix of information with millions of points) so you could perform statistical analysis on a per-pixel basis. The pixel example would be for an image, but if you wanted to store something like, say, some parameter at a grid point and you wanted to compare those parameters between a load of different grids. It seems a very laborious way of doing things, but maybe if each point is storing a lot of data, it's easier to have a database where you can run "SELECT row1000col2000 FROM Things" (where row1000col2000 contains a blob or something) and get a long list instead of comparing a load of arrays.

      In the example of an image, you could feasibly run into hundreds of millions of columns (assuming you want to store your data in one table and not a table per comparison object and of course for some obscure reason you're storing each pixel in a field) with astronomical cameras.

      Failing that, never underestimate government and/or military databases. Heck, even someone like Google could probably find a use for a 2 billion column table.

    7. Re:Typical applications? by bieber · · Score: 2

      In all seriousness, I'm horrified to see the potential abuses people will come up with for this.

      "Still using MySQL? Man, you need to check out Cassandra! MySQL kept clashing with my every-user-gets-their-own-column architecture..."

    8. Re:Typical applications? by Sarten-X · · Score: 2

      I don't know if that was sarcastic or not, but given that Cassandra is column-oriented, that's pretty much right (not so much with the header, but metadata is likely). Use a column family for each region, and you can process statistics in small chunks without a ridiculously-overpowered server. Only the requested column families need to be loaded into memory for processing.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    9. Re:Typical applications? by NNKK · · Score: 2

      Cassandra doesn't have "tables", and Cassandra's rows and columns have nothing to do with the rows and columns you're used to in SQL databases. Until you understand this, you will continue to be confused.

      The "name" of a column is an arbitrary key -- you could have a row with a bunch of columns named things like "Country", or "Username", but you could also have columns named "jsmith", "jdoe", "12345", "USA", "Canada", etc., and you don't have to pre-define the column names.

    10. Re:Typical applications? by RobertM1968 · · Score: 3, Funny

      Any application developed by one or more Visual Basic developers, given enough time.

      How could that possibly be true, MS Access only supports 255 columns.

      And now you understand why Cassandra is so important! :-)

    11. Re:Typical applications? by RobertM1968 · · Score: 2, Funny

      Apparently the extra columns can be used to the effect of doing "more" than store data. A link in the article...

      Not sure what that last word means....

    12. Re:Typical applications? by DavidTC · · Score: 2, Interesting

      Wow, it's almost like you've invented databases, but rotated 90 degrees so that every single existing programming paradigm fails and you have to invent new ones to loop through columns.

      Instead of what every other database does, load the rows you want, and just those rows. With nicely named headers that get used to label the parts of each row. Oh, and types that vary per column.

      And indexes on columns...wait, let me guess, you can now index rows...although that can't actually work, programmaticly, because the columns aren't stored next to each other, so locating a value in a specific row can't tell how to retrieve that entire column..WAIT!

      Did this just exchange the meaning of rows and columns in some sort of mindfuck, but left everything the same?

      This is making more and more sense for Bizarro, but not really for anyone else.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    13. Re:Typical applications? by red_blue_yellow · · Score: 3, Informative

      Columns in Cassandra aren't analogous to columns in an RDBMS. Every row is basically a list of (key, value) pairs. This is referred to as a column, with the key being the column name. There's no requirement that rows have the same set of column names.

      Typically large rows are used for indexes or timelines. In a timeline example, you might use a timestamp for every column name and store the entry as the column value. Cassandra keeps the row sorted by column name, so all of the entries in the row (timeline) will be in chronological order.

      In the case of indexes, you may use one row for every indexed value (say, one row for all users from Utah, one for all from Texas, etc). Here, each column would store the row key (primary key) of a row in another column family (table) that matches that indexed value; in this case, every column might hold a userId.

      --
      A neutral communications medium is essential. It is the basis of science, by which humankind should decide what is true.
    14. Re:Typical applications? by WuphonsReach · · Score: 2

      I've been in the business for more than two decades, and I have never ever encountered a situation where I need 256(!) columns. True, I have worked mostly in tech/business sectors, and that's why I asked the question: what sorta application need so many columns.

      Data collection where you are reporting across samples (averages, means, group by) but where you are collecting dozens or hundreds of generally unrelated attributes for each sample. Some attributes might be related, but only loosely, other attributes are completely distinct from the other attributes. Because all of the attributes need to map back to the sample ID, there's no point in creating lots of different tables unless you are forced to due to database constraints. Plus the users want to be able to scan across the columns and down rows to spot patterns, so storing as "sampleID-attributekey-value" triplets means you have to do a lot more work in the presentation layer, converting it back to a "sample-attr1-attr2-attr3" style.

      --
      Wolde you bothe eate your cake, and have your cake?
    15. Re:Typical applications? by mini+me · · Score: 3, Informative

      Cassandra did not support said indexes until this very release. Even with secondary indexes, storing data in columns is still a reasonable design choice for many requirements. A column in Cassandra is not like a column in a relational database.

      I am sure that this is welcome news for big Cassandra users, but I do agree that it is a strange choice for the front page of Slashdot. Then again, with the number of comments asking why you would need so many columns, it seems that Slashdot needs to talk about Cassandra a little more.

    16. Re:Typical applications? by Mr+Z · · Score: 2

      In perl-speak, a Cassandra table sounds suspiciously like a nested hash if Cassandra's rows and columns are unsorted, or an array of array of key-value pairs if they are sorted.

      And if I understood the brief description of the use model from the article someone else linked, it sounds like you make a new table (columnfamily?) for each of the different criteria you might query against. The index for that table would be the parameterized bits of that query, and the other columns represent all the data that would match that particular query. Their example showed indexing employees by DOB.

      If i had a more complex query (say "all employees of a particular gender and date of birth"), then the index column would contain both details, so there'd be a row for "Feb 31st, 2013, Male," "Feb 31st, 2013, Female," etc. Am I understanding this correctly?

      Sounds like it'd be total crap (read: next to, if not completely impossible to use for) fully ad hoc queries whose structure isn't known beforehand. But, if you were building up something that had fairly static parameterized query structures, then it'd work out pretty well. The main thing to remember is that it transforms a pull-oriented SQL-style datamining operation into a more push-oriented "sort it as it arrives" structure.

    17. Re:Typical applications? by NFN_NLN · · Score: 3, Informative

      Any application developed by one or more Visual Basic developers, given enough time.

      How could that possibly be true, MS Access only supports 255 columns.

      And now you understand why Cassandra is so important! :-)

      In all seriousness I had no idea what Cassandra was or what made it unique as a database. However, I did find this tutorial that others might also find useful:

      http://arin.me/blog/wtf-is-a-supercolumn-cassandra-data-model

    18. Re:Typical applications? by Sarten-X · · Score: 4, Informative

      Welcome to the first five minutes of using a column store. Screwey, ain't it?

      My understanding is that rows' contents are indexed such that they may be retrieved quickly. Think of a row name as a primary key. It's easy to get the whole row when you know its name. Continuing the census application, it's be like asking for all the birth years of everyone in a geographical region. The requested column family (geographical region) is opened, and each column (person) is quickly checked for the particular row's contents (in case the birth year wasn't provided). Partitioning is done by both row and column family, so only some of the column family's data is actually scanned. That's where the cluster provides a very nice speedup, as well.

      locating a value in a specific row can't tell how to retrieve that entire column

      Now, I'm not sure if I understand your rage-induced rambling correctly, but if you're trying to make a SQL example, you're starting from the wrong premise, which explains why you're having trouble making sense of it all.

      Quick review: The "R" in "RDBMS" stands for "relational", referring to a n-ary relation. SQL is intended to manipulate those relations, isolating the data you want to extract. Something that is not described as an RDBMS should not be expected to have relations.

      Cassandra functions (from the application perspective) as a key-value store, with no relation structure. That means you don't work with sets, and you don't need to think about set operations. Pull out a row, and you get a list of columns with defined values, as well as those values. Iterate through each value looking for whatever value you're looking for. When you find it, you already have the column name. Just ask for the whole column next. Since the whole thing is running in a cluster, you can parallelize the iterations (I think... I've used HBase, but not Cassandra personally) to speed up the scan.

      If that's not fast enough for you (which is likely), you can use Hadoop's MapReduce framework to scan each cell and create an index, possibly laid over the other table as just more rows & columns (though a different table would be better, from a sanity perspective). Since there's no mandatory structure, that's legit.

      Of course, that's only valid for this particular census application, which assumes that the only reason for the database is either basic statistics or something complex enough for a MapReduce program.

      It's entirely possible to run Cassandra arranged similar to a normal RDBMS. Use only a few column families with very specific columns (such as a single family for all the "Name, address, etc."). Throw in a bunch of index families, updated with MapReduce. Then, your processing can be a complex MapReduce job, iterating over each row with a particular set of rows meeting all your needed criteria. It'd be just like a normal RDBMS, except you have better scalability, and maintain indexes yourself.

      If the trouble of indexing is too much for you, you can follow Google's route with Colossus, which runs MapReduce-like tasks when rows are changed. That's your dynamic indexing.

      Here's some links to help your understanding:

      --
      You do not have a moral or legal right to do absolutely anything you want.
    19. Re:Typical applications? by Sarten-X · · Score: 3, Informative

      Close. It's more of a hash table of a sorted hash table... Columns are unsorted, but rows are (I think... I've only used HBase personally).

      If you know what you'll be looking for ahead of time, you can make your life easy with a write-heavy system. What's missing in standard Cassandra is a way to run ad-hoc queries. My understanding is that Cassandra can now run with Hadoop's MapReduce framework. Any query or computation can be run against the Cassandra table in a widely-distributed fashion as a MapReduce job. It's not as fast as an SQL query on an indexed column, but far better than a query on an unindexed one, because everything runs in parallel across the cluster.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    20. Re:Typical applications? by Hognoxious · · Score: 2

      Obviously you're trapped in a relational mindset.

      That makes two of us.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    21. Re:Typical applications? by AlXtreme · · Score: 3, Insightful

      Dear $DEITY, the number of times I've seen (mostly) PHP crapplications use CREATE DATABASE and CREATE / ALTER TABLE, often with ingenious naming schemes, instead of simply inserting new rows. Certain people shouldn't be allowed to touch databases.

      If anyone needs me I'll be sobbing over my coffee.

      --
      This sig is intentionally left blank
    22. Re:Typical applications? by Noughmad · · Score: 2

      Each user gets a single wooden table with a plastic folder containing a paper file.

      --
      PlusFive Slashdot reader for Android. Can post comments.
    23. Re:Typical applications? by jellomizer · · Score: 3, Interesting

      I don't think it is a good idea to propose limitation just to stop bad coding practices.

      For 1 the limitations rairly incourage good ones they only make them worse. Eg 254 columns with the 255th pointing to the tablename2 with more data.

      Second by preventing people from doing something stupid they also prevent them from doing something ingenious.

      Third there may be a good reason to do this as well.

      Fourth you make it big enough so you won't need to make it bigger

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    24. Re:Typical applications? by bjourne · · Score: 4, Informative

      Maybe Cassandra should have choosen some other terminology for their database that so obviously doesn't conflict with already existing terms. A column in Cassandra is a tuple which in an RDBMS is a row. Confusion all around.

    25. Re:Typical applications? by ultranova · · Score: 2

      What sorta applications need so many columns? Curious.

      Judging by the name, a pretty incredible one.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    26. Re:Typical applications? by Hognoxious · · Score: 2

      Doesn't a name/value pair act for like a field? A record would be several of those that are related to each other. Or maybe not, who knows?

      But in any case, borrowing a term that's already in established usage to mean something superficially similar but significantly different is just fucking retarded. Whoever made that decision ought to be dragged behind a moderately slow horse.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    27. Re:Typical applications? by butlerm · · Score: 2

      Welcome to the first five minutes of using a column store.

      Calling Cassandra a "column store" or "column oriented database" is an abuse of the language. Real column oriented databases store "columns" of data in a linear sequential manner, so that they can be scanned in the fastest manner possible.

      Cassandra isn't like that - it stores denormalized rows with repeating groups in a free form manner, not "columns" at all. If it were a real column oriented database it would be completely unusable for most online web and OLTP applications. Real column oriented databases are designed for OLAP and numerical-statistical analysis, getting a single "row" or "record", "record group", or "even" document at a time is the opposite of what they are designed for.

      At best, you could call Cassandra a "cell" or "field" oriented database. But a "column oriented" database it is not. It is practically the opposite of a column oriented database.

  2. Why? by Xoc-S · · Score: 3, Insightful
    Only a completely de-normalized flat-file database would need anything like that number of columns. That would mean many duplicate pieces of information, and a complete maintenance nightmare. The only purpose I can see is to have views of existing normalized data for fast searching, but that would be read-only data.

    This is a feature in need of an application and I can see very few applications.

    1. Re:Why? by Jeremi · · Score: 3, Funny

      This is a feature in need of an application and I can see very few applications.

      I think you're right, but as long as we're adding features for the sake of having features... why limit the table to two dimensions? Perhaps the next version of Cassandra can support 3D-data-cubes, with each cell specified via a (row,column,level) triplet. And the version after that will allow hypercubes of data with any number of dimensions (up to 2 billion dimensions maximum, of course).

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    2. Re:Why? by maraist · · Score: 2

      There are many problem-sets where you might like to perform associative mapping. If the keys and or values are large, you can easily hit the 2GB limit on a single primary key. Imagine if you felt that cassandra could help you in CPU node mappings.. Or weather patterns. The associations can be in the billions, and while you may or may not have a primary key for each main node, the association list may approach N. In traditional RDBMS, such large association mappings M:N tables, are impractical to traverse. An object oriented database might be a better fit, but the open-source ones I'm aware of aren't sufficient in horsepower. I'm not saying Cassandra fits the bill, but with TB sized total DBs this would be significantly faster than RDBMS with row-oriented storage (column store tables might do ok). And probably more to the point - the population of those large associations is what's going to kill traditional RDBMS M:N tables (or even proprietary blobs).

      --
      -Michael
    3. Re:Why? by Daniel+Dvorkin · · Score: 2

      As an example, let's consider a forum. One row per thread, one column per post.

      Um, okay, but why would you set your database up that way in the first place? I really don't see the advantage of this over a more standard table table having columns for, say, forum ID, thread ID, poster ID, timestamp, and content.

      --
      The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
    4. Re:Why? by Dynedain · · Score: 2

      In the example you just made, I can see that the benefit is that you don't need another layer (PHP, stored queries, etc) to stitch the thread back together. The data structure inherently "knows" how the thread of posts are assembled.

      --
      I'm out of my mind right now, but feel free to leave a message.....
    5. Re:Why? by Sarten-X · · Score: 2

      Why not, if you expect to have several billion posts?

      The more important issue in this architecture decision would be scaling needs and abilities. How many billion rows can a typical RDBMS handle on a $20,000 budget? If that budget goes to $40,000, will that capacity double? With a column-oriented database, only the needed column families are loaded into memory. For this forum example, you could have a family for each month of operation. Old threads would then be entirely in old column families, so they would remain untouched on disk, never even read until they're needed. The lower memory use leads to less expensive servers (since storage is cheap now), and linear scaling.

      If your application doesn't need ridiculously large storage, go ahead and use a plain old RDBMS, just so you can avoid learning a new skill set. You're probably not going to hit a meaningful limit. If you're looking at a huge amount of data, or a moderate amount of data with a lot of processing, newer technology may be a better choice.

      Cassandra can also run with Hadoop's MapReduce framework. Taking the forum example further, a periodic job could process all the posts, updating another table (or set of columns) with a map of keywords to posts that contain them. Scanning one thread at a time, each node in the Hadoop cluster could compute the index in parallel, allowing the index creation to be separated from the load of making a post. Again, it's not a big deal for a small application, but when you're dealing with something scaling up to the size of Facebook, StumbleUpon, or Google, new tools with new designs just work better.

      --
      You do not have a moral or legal right to do absolutely anything you want.
  3. 2 billion columns... by aBaldrich · · Score: 4, Funny

    ought to be enough for everybody

    --
    In soviet russia the government regulates the companies.
    1. Re:2 billion columns... by ian_from_brisbane · · Score: 2

      When I turn my head sideways it looks just like 2 billion rows

      Where can I buy a monitor like yours?

  4. This is a triumph for hideously bad schema by Sarusa · · Score: 4, Informative

    Well good on them for solving an interesting technical problem, but the use cases for this are all bad.

    Obvious first use: boss will suggest we optimize the database by using only one gigantic row with two billion columns.

    1. Re:This is a triumph for hideously bad schema by Jugalator · · Score: 2

      This is a triumph for hideously bad schema

      This isn't a relational database. There is no schema. [/matrix]

      --
      Beware: In C++, your friends can see your privates!
  5. Re:Only 2 billion? by Anonymous Coward · · Score: 5, Funny

    You work for Gillette, don't you.

  6. for those that absolutely positively cannot RTFA by Son+of+Byrne · · Score: 5, Informative

    Cassandra appears to be a multi-dimensional datastore that does not store data in the same fashion as a typical RDBMS. It uses columns and rows both to store sets of data uniquely. If you're familiar with Big Table, then, apparently, its kinda like that.

    That just means that they've added even more storage vectors to it than before...not sure why it made slashdot front page...

    --
    I'd happily pay you Tuesday for a biopsy today!
  7. Re:If you have more than 30 columns by ogrisel · · Score: 5, Informative

    Not with column store databases such as Cassandra, HBase and BigTable.

  8. Re:Bah, this is silly. by Sarten-X · · Score: 2

    on the fly

    Like storing the contents of a web crawl. The row key is the URL, the column is the crawl timestamp, and the cell contains the page (or keywords). That's a column created on the fly. Another application off the top of my head is storing access logs, where each row is a date, each column is a person, and each cell contains a resource they accessed. Having two billion columns is hardly excessive (in theory) for a suitably-large application.

    Cassandra, like BigTable and HBase, is not the same as a traditional RDBMS. It's also a column-oriented DBMS. Since each group of columns is stored separately, there's no performance impact to having extra columns. Columns that aren't needed (like old crawls in the example above) simply aren't loaded into memory. What's bad design for an RDBMS is perfect for Cassandra or HBase.

    --
    You do not have a moral or legal right to do absolutely anything you want.
  9. Cassandra by tverbeek · · Score: 5, Funny

    I predict that bad things will come of this.

    Not that anyone will believe me.

    --
    http://alternatives.rzero.com/
  10. figured it out by Bizzeh · · Score: 2

    I know why the developers thought this would be a good idea. A feature this mental would be sure to get them free publicity on slashdot

    1. Re:figured it out by mini+me · · Score: 2

      A column in Cassandra is sort of, if you have to make a comparison, like a join in SQL. Using Slashdot as an example, the topic would be the row, and each comment within that topic would be a column. Wanting to store more than 2GB of column data doesn't seem mental at all.

      Whether or not it is worthy of the front page is another question.

    2. Re:figured it out by butlerm · · Score: 2

      They are just not columns in the relational database sense.

      They are not columns _even_ in the sense that column oriented databases use. They are repeating groups. What column oriented databases call "columns" have a perfect logical correspondence with what relational databases call columns. Nothing about the relational model dictates either row or column orientation, so far as storage is concerned.

      The logical and physical structure of a Cassandra row has been used in some databases (Adabas, Pick, etc) for thirty or forty years. In fact others (such as Oracle and DB2) can implement the logical model of a relational database on the same physical model as that used by repeating group databases like Cassandra, getting the best of both worlds.

      The end game for contemporary NoSQL databases is to evolve step by step in the direction of distributed, shared nothing relational databases with some special purpose relaxations. Secondary indexes? We have that. Transactions? We have that too! And so on...

      The only problem with Cassandra is that the designer seem to have ignored everything written about database implementation in the past fifty years. Either that or have a severe case of the not-invented-here syndrome. Why use standard nomenclature when we can make up one maximally designed to confuse everyone and everybody?

  11. Re:If you have more than 30 columns by mini+me · · Score: 2

    If you are writing SQL, maybe. Cassandra is not a relational database.

  12. Re:SQL statement from hell by Sarten-X · · Score: 2

    Cassandra doesn't use SQL, and isn't even like a RDBMS in any way other than "it stores a table of data", so the SQL statement would be nonexistent.

    --
    You do not have a moral or legal right to do absolutely anything you want.
  13. Indexes by Twillerror · · Score: 3, Informative

    Cassandra like many of the "no sql" type databases doesn't have classic indexes.

    So instead of having an index you typically have a separate table that acts as the index.

    Image you have a users table. One of the field is country. Now you want to know all the users for a particular country.

    In standard RDMS type systems you just scan each row or have a index that has done that "ahead of time" or as rows are inserted.

    In Cassandra the rows of users are distributed possibly among 100s of servers. So scanning for all users that have a particular country would require scanning all rows which could a long time.

    Unlike RDMS like system rows don't have a 2d structure and don't have real limitation on the number of columns they can have. And columns can essentially be arrays\rows of objects.

    So as you design/bang out your application you typically realize you need to know "users by country" for some stupid report. So you create a new table to hold these values. This has one row per country. As users are entered you append to this row. This essentially creates an array like structure. You then lookup the row for a particular country and you now know all the users for that particular country.

    Sounds like Cassandra is getting rid of a limitation that could have caused very large index to require multiple rows.

  14. Yes and the funniest thing about all this is by Giant+Electronic+Bra · · Score: 4, Insightful

    That we had all of this stuff 30 years ago. It was called 'network' databases, which were pretty much the standard sort of technology before RDBMS came along and everyone realized how incredibly much better relational algebra was for the vast majority of problems. As with many other things older ideas eventually resurface with new names and a few more features. There are times when this kind of facility is useful. Nothing wrong with it. The vast majority of cases though where I've seen people using something like Cassandra or Big Table were ill advised. A properly optimized RDBMS with correctly designed schema can handle all but a few edge cases. Most of the hype these tools are generating is based on a lack of real understanding of how to properly use databases combined with people believing myths about other technologies and helped along by the industry's short memory span. The best part though is that when something turns into a giant mess guys like me can make nice money fixing the mess. lol.

    --
    "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
    1. Re:Yes and the funniest thing about all this is by DavidTC · · Score: 2

      The vast majority of cases though where I've seen people using something like Cassandra or Big Table were ill advised. A properly optimized RDBMS with correctly designed schema can handle all but a few edge cases. Most of the hype these tools are generating is based on a lack of real understanding of how to properly use databases combined with people believing myths about other technologies and helped along by the industry's short memory span.

      Indeed, and there are edge cases, like Facebook, or Google, or whatever. The edge cases are gigantic databases that are accessed in certain specific way.

      There are probably less edge cases than actual NoSQL codebases, which is pretty surreal. There are more actual products then the number of people who need the products.

      And 99.99% of the people playing with them don't need them at all.

      Rule of thumb: If you ever have to decide whether or not you need NoSQL or not...you don't. Because the actual databases that would be better off under NoSQL are operating inside corporations where individuals don't ever make that sort of decisions anyway.

      The real joke is people using them in ways that are actually slower than any RDBMS, but they think it's 'easier', usually because they never bothered to learn how JOINs work, and don't understand that it's perfectly fine to make a dozen SQL queries on a web page...that's what indexes are for. (Someone should ask them to estimate how many SQL queries a slashdot page takes.)

      --
      If corporations are people, aren't stockholders guilty of slavery?
    2. Re:Yes and the funniest thing about all this is by red_blue_yellow · · Score: 3, Informative

      Indeed, and there are edge cases, like Facebook, or Google, or whatever. The edge cases are gigantic databases that are accessed in certain specific way.

      It's true that many people attempt to prematurely optimize by using Cassandra first instead of something they are already familiar with. However, when faced with some of the pains of growing an RDMBS beyond what a single box can handle, it's worth it to consider your other options. Keep in mind that if it's easy to store and make use of a huge pile of data, you're more tempted to gather that data in the first place, where 10 years ago it might have been prohibitively expensive or difficult.

      There are probably less edge cases than actual NoSQL codebases, which is pretty surreal. There are more actual products then the number of people who need the products. And 99.99% of the people playing with them don't need them at all.

      I can assure you that you're incorrect, but since you don't have any data to back this up, I won't bother either.

      The real joke is people using them in ways that are actually slower than any RDBMS, but they think it's 'easier', usually because they never bothered to learn how JOINs work, and don't understand that it's perfectly fine to make a dozen SQL queries on a web page...that's what indexes are for.

      Yes, only knuckle-dragging imbeciles are interested in new systems... *sigh*. This is an often-touted piece of flamebait that has little basis in reality. Some of the largest Cassandra users are companies who already have extensive experience scaling MySQL and other RDMBS.

      While some might find that document stores like MongoDB are "easier" and use it for that reason, Cassandra has a reputation for being difficult to get started with; the reason it gets used nevertheless is because the benefits outweigh the steep learning curve.

      --
      A neutral communications medium is essential. It is the basis of science, by which humankind should decide what is true.
    3. Re:Yes and the funniest thing about all this is by Giant+Electronic+Bra · · Score: 2

      My comment would just be along the lines of what the DavidTC stated though, in the case where that kind of technology is warranted you're either in a huge organization with very specialized needs or well beyond the competency level of small shops. It isn't so much a factor of being able to find a tool that could do the job. It is a matter that the various factors going into that kind of scale of system are so complex and varied. You need expertise in large scale mass storage, clustering, management, etc to back up something like that, and you're probably well into the realm of highly tweaked network, kernel, networking layer, etc. What you need is a dedicated team of experts. Something like Cassandra can be a great boon to them, but you better already have a very hefty IT budget or you're probably better off with vertical scaling and an RDBMS. You can go a LONG ways with that, trust me.

      --
      "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
  15. Re:Only 2 billion? by zach_the_lizard · · Score: 4, Funny

    He doesn't, otherwise it'd be uint64_t and a lather strip!

    --
    SSC
  16. Finally! by Compaqt · · Score: 2

    I'm was having trouble making a table for my new Web 3.0 m-commerce application on lesser databases:

    CREATE TABLE peeps(
    peep1_first_name VARCHAR(255),
    peep1_last_name VARCHAR(255),
    peep1_address VARCHAR(255),
    peep1_address2 VARCHAR(255),
    peep1_address3 VARCHAR(255),
    peep1_creditcard VARCHAR(255),
    peep1_creditcard2 VARCHAR(255),
    peep1_creditcard3 VARCHAR(255),
    peep2_first_name VARCHAR(255),
    peep2_last_name VARCHAR(255),
    peep2_address VARCHAR(255),
    peep2_address2 VARCHAR(255),
    peep2_address3 VARCHAR(255),
    peep2_creditcard VARCHAR(255),
    peep2_creditcard2 VARCHAR(255),
    peep2_creditcard3 VARCHAR(255), ...

    509 Bandwidth Limit Exceeded

    --
    I'm not a lawyer, but I play one on the Internet. Blog
  17. And Oracle supports EXABYTE sized databases by dirkdodgers · · Score: 3, Interesting

    So I can appreciate that this announcement sounds like News for Nerds, but can someone why it Matters that Cassandra can support 2 billion columns?

    The article basically says "because you can't execute SQL you need lots of columns". OK, great, why would I want that? The article doesn't tell me. The Cassandra website sure doesn't tell me.

    Oracle 11 supports up to 8 fucking EXABYTES of data in an RDBMS that I can execute SQL against. What Cassandra puts in columns, I put in rows.

    I've scoured this thread like all the other ones on Cassandra for the killer feature, for the "you can do this with Cassandra that you can't do as well with an RDBMS" and I can't find it.

    The best I can come up with is "I want to store lots of indexed data, I don't care about transactional integrity, and I don't want to pay Oracle". Is that it? That's fine if it's it, Oracle doesn't come cheap and that can be a deal breaker for new companies, but I just wish someone would spell out that this is the justification for Cassandra's existence.

    1. Re:And Oracle supports EXABYTE sized databases by DavidTC · · Score: 4, Interesting

      NoSQL stuff is useful in weird extreme fringe cases, where you need to access data in essentially random ways. Digg, Facebook, and Google all NoSQL databases, and I think the first two use Cassandra.

      Specifically, you kinda make your own rows. It's like having permanent multiple JOINs that you can access instantly, from what I understand. (This is what this article is talking about, it's now unlimited.)

      Essentially, it's a giant blob of data that exists, and you draw lines on it in advance that are your results, and you can get those result instantly, at the cost of being unable to decide to get other results in real time.

      Many of the products let you have them on different servers, so you can have a 'people who have voted for this Digg' table or something, on the server that handles that thing.

      I'm not entirely sure how it works, but that's basically it. Oh, and the fact they talk about 'columns' and 'rows' is just utter stupidity in naming to confuse everyone. Basically, they simply tend to keep each column as a file, which allows them to do what I mentioned above..copy needed columns, and just needed columns, to other servers.

      It's really weird, and, like I said, only relevant for giant giant databases. There's no way that google could do a full text search on a RDBMS, regardless if it fits in Oracle. What it can do is make a 'column' for each word, and a 'row' for each URL, put different columns on different servers, and that actually works in the non-relational database they use, when there's no way in hell that would work on a RDBMS.

      However, more importantly for slashdot, a fuckload of fools think that SQL is somehow 'retarded' and that NoSQL is 'awesome, dude', so they like to play with it, usually by spewing out some crap PHP or Perl or something that works about a tenth as well as just using an RDBMS would work. If they actually understood how to use an RDBMS, that is.

      --
      If corporations are people, aren't stockholders guilty of slavery?
    2. Re:And Oracle supports EXABYTE sized databases by melted · · Score: 2

      Try to deploy Postgres on a 5000 machine cluster, with replication and failover and then get back to me. And by "failover" here I mean the entire racks or ever network segments going away with nary a hiccup in serving, no manual intervention (except for bringing up replacement nodes), and no data loss.

      Then there's the issue of RDBMSs being suboptimal for straightfoward user profile storage. You have to implement a lot of things by hand. Cassandra (or BigTable) gives you a versioned, fault tolerant, scalable, multidimensional map. It's really convenient for a lot of things, but it's not a replacement for proper DBs when you need realtime aggregation or joins.

      Heck, even Google used MySQL here and there for this exact reason.

      I think it's really unfortunate that folks consider these a replacement for your typical DB-like scenarios. They're merely a replacement for DBs in cases where the use of DB was a kludge in the first place, and calling multidimensional maps "databases" is really a misnomer.

    3. Re:And Oracle supports EXABYTE sized databases by melted · · Score: 2

      You still haven't described how you'd implement sharding (at which point with most realistic relational schemas you're likely to lose the ability to do joins), load balancing and transparent, reliable failover. SANs don't free you from the need to do DB replication, since several processes can't write to the same set of files without massive synchronization overhead, so you're in a losing position right from the start, SANs notwithstanding.

      But even assuming you got all of this to work, you're still doing it on high end hardware, whereas Cassandra can do the same on bare motherboards with cheap SATA drives velcroed on (which is how FB uses it), at a fraction of the cost, with higher reliability (since it was built for shitty hardware), and possibly with higher per-node performance.

      Right tool for the job, man, right tool for the job.

  18. Re:If you have more than 30 columns by Anonymous Coward · · Score: 2, Insightful

    - Not everyone answers every question. There is skip logic involved and there are loops, sometimes nested. These would lend themselves well for a multi table relational approach but the data does not come out of the data collection systems like that (most of them anyway). Would be nice to normalize, but as mentioned, there are new datasets every week, most of them having 1000s of columns. Good luck with normalizing all that before your deadline.

    - Normalized data is not as easy to use in statistical applications. SPSS, the 800 pound gorilla in stats land, only supports flat data, for example.

    - There are things called multiple response questions, sometimes having 100s of options, sometimes 1000s. Ergo 100s to 1000s of columns per question. "Which car models have you ever owned" + every single car model produced in the last 40 years is a good example. Of course there are alternatives such as blob fields and bit shifting, or storing only max 20 answers (first car, second car, etc) but it costs time to convert them. And these formats are also harder to use in statistical analysis, even in flat data.

    In a world where you have complete control over the provided input, and the required output, you are right. In the real world, not so much.