<p>Can you please point to alternative data storage tools and give good reasons to use them instead of good-old relational databases? In my opinion, most applications rarely use the full power of SQL--it would be interesting to see how to build an SQL-free application.</p>

[{'answer_id': 37841, 'author': 'Ubiguchi', 'author_id': 2562, 'author_profile': 'https://Stackoverflow.com/users/2562', 'pm_score': 3, 'selected': False, 'text': "<p>The filesystem's prety handy for storing binary data, which never works amazingly well in relational databases.</p>\n"}, {'answer_id': 37844, 'author': 'Rob Wells', 'author_id': 2974, 'author_profile': 'https://Stackoverflow.com/users/2974', 'pm_score': 2, 'selected': False, 'text': '<p>G\'day,</p>\n\n<p>One case that I can think of is when the data you are modelling cannot be easily represented in a relational database.</p>\n\n<p>Once such example is the database used by mobile phone operators to monitor and control base stations for mobile telephone networks.</p>\n\n<p>I almost all of these cases, an <a href="http://en.wikipedia.org/wiki/Object_database" rel="nofollow noreferrer">OO DB</a> is used, either a commercial product or a self-rolled system that allows heirarchies of objects.</p>\n\n<p>I\'ve worked on a 3G monitoring application for a large company who will remain nameless, but whose logo is a red wine stain (-:  , and they used such an OO DB to keep track of all the various attributes for individual cells within the network.</p>\n\n<p>Interrogation of such DBs is done using proprietary techniques that are, usually, completely free from SQL.</p>\n\n<p>HTH.</p>\n\n<p>cheers,</p>\n\n<p>Rob</p>\n'}, {'answer_id': 37852, 'author': 'Matt Sheppard', 'author_id': 797, 'author_profile': 'https://Stackoverflow.com/users/797', 'pm_score': 8, 'selected': True, 'text': '<p>Plain text files in a filesystem</p>\n\n<ul>\n<li>Very simple to create and edit</li>\n<li>Easy for users to manipulate with simple tools (i.e. text editors, grep etc)</li>\n<li>Efficient storage of binary documents</li>\n</ul>\n\n<hr>\n\n<p>XML or JSON files on disk</p>\n\n<ul>\n<li>As above, but with a bit more ability to validate the structure.</li>\n</ul>\n\n<hr>\n\n<p>Spreadsheet / CSV file</p>\n\n<ul>\n<li>Very easy model for business users to understand</li>\n</ul>\n\n<hr>\n\n<p>Subversion (or similar disk based version control system)</p>\n\n<ul>\n<li>Very good support for versioning of data</li>\n</ul>\n\n<hr>\n\n<p><a href="http://www.oracle.com/technology/products/berkeley-db/index.html" rel="noreferrer">Berkeley DB</a> (Basically, a disk based hashtable)</p>\n\n<ul>\n<li>Very simple conceptually (just un-typed key/value)</li>\n<li>Quite fast</li>\n<li>No administration overhead</li>\n<li>Supports transactions I believe</li>\n</ul>\n\n<hr>\n\n<p><a href="http://www.amazon.com/SimpleDB-AWS-Service-Pricing/b/ref=sc_fe_l_2?ie=UTF8&amp;node=342335011&amp;no=3435361&amp;me=A36L942TSJ2AJA" rel="noreferrer">Amazon\'s Simple DB</a></p>\n\n<ul>\n<li>Much like Berkeley DB I believe, but hosted</li>\n</ul>\n\n<hr>\n\n<p><a href="http://code.google.com/appengine/docs/datastore/" rel="noreferrer">Google\'s App Engine Datastore</a></p>\n\n<ul>\n<li>Hosted and highly scalable</li>\n<li>Per document key-value storage (i.e. flexible data model)</li>\n</ul>\n\n<hr>\n\n<p><a href="http://incubator.apache.org/couchdb/" rel="noreferrer">CouchDB</a></p>\n\n<ul>\n<li>Document focus</li>\n<li>Simple storage of semi-structured / document based data</li>\n</ul>\n\n<hr>\n\n<p>Native language collections (stored in memory or serialised on disk)</p>\n\n<ul>\n<li>Very tight language integration</li>\n</ul>\n\n<hr>\n\n<p>Custom (hand-written) storage engine</p>\n\n<ul>\n<li>Potentially very high performance in required uses cases</li>\n</ul>\n\n<hr>\n\n<p>I can\'t claim to know anything much about them, but you might also like to look into <a href="http://en.wikipedia.org/wiki/Object_database" rel="noreferrer">object database systems</a>.</p>\n'}, {'answer_id': 37855, 'author': 'Chris de Vries', 'author_id': 3836, 'author_profile': 'https://Stackoverflow.com/users/3836', 'pm_score': 2, 'selected': False, 'text': '<p>Object databases are not relational databases. They can be really handy if you just want to stuff some objects in a database. They also support versioning and modify classes for objects that already exist in the database. <a href="http://www.db4o.com/" rel="nofollow noreferrer">db4o</a> is the first one that comes to mind.</p>\n'}, {'answer_id': 37858, 'author': 'Tom', 'author_id': 3715, 'author_profile': 'https://Stackoverflow.com/users/3715', 'pm_score': 1, 'selected': False, 'text': '<p>You can go a long way just using files stored in the file system.  RDBMSs are getting better at handling blobs, but this can be a natural way to handle image data and the like, particularly if the queries are simple (enumerating and selecting individual items.)</p>\n\n<p>Other things that don\'t fit very well in a RDBMS are hierarchical data structures and I\'m guessing geospatial data and 3D models aren\'t that easy to work with either.</p>\n\n<p>Services like <a href="http://aws.amazon.com/s3" rel="nofollow noreferrer">Amazon S3</a> provide simpler storage models (key->value) that don\'t support SQL.  Scalability is the key there.</p>\n\n<p>Excel files can be useful too, particularly if users need to be able to manipulate the data in a familiar environment and building a full application to do that isn\'t feasible.</p>\n'}, {'answer_id': 37859, 'author': 'zaca', 'author_id': 3031, 'author_profile': 'https://Stackoverflow.com/users/3031', 'pm_score': 3, 'selected': False, 'text': '<p>Try Prevayler:\n<a href="http://www.prevayler.org/wiki/" rel="nofollow noreferrer">http://www.prevayler.org/wiki/</a>\nPrevayler is alternative to RDBMS. In the site have more info.</p>\n'}, {'answer_id': 37869, 'author': 'Murph', 'author_id': 1070, 'author_profile': 'https://Stackoverflow.com/users/1070', 'pm_score': 1, 'selected': False, 'text': '<p>There are a large number of ways to store data - even "relational databse" covers a range of alternatives from a simple library of code that manipulates a local file (or files) as if it were a relational database on a single user basis, through file based systems than can handle multiple-users to a generous selection of serious "server" based systems.</p>\n\n<p>We use XML files a lot - you get well structured data, nice tools for querying same the ability to do edits if appropriate, something that\'s human readable and you don\'t then have to worry about the db engine working (or the workings of the db engine). This works well for stuff that\'s essentially read only (in our case more often than not generated from a db elsewhere) and also for single user systems where you can just load the data in and save it out as required - but you\'re creating opportunities for problems if you want multi-user editing - at least of a single file. </p>\n\n<p>For us that\'s about it - we\'re either going to use something that will do SQL (MS offer a set of tools that run from a .DLL to do single user stuff all the way through to enterprise server and they all speak the same SQL (with limitations at the lower end)) or we\'re going to use XML as a format because (for us) the verbosity is seldom an issue.</p>\n\n<p>We don\'t currently have to manipulate binary data in our apps so that question doesn\'t arise.</p>\n\n<p>Murph</p>\n'}, {'answer_id': 38001, 'author': 'Tristan Juricek', 'author_id': 3436, 'author_profile': 'https://Stackoverflow.com/users/3436', 'pm_score': 5, 'selected': False, 'text': '<p>Matt Sheppard\'s answer is great (mod up), but I would take account these factors when thinking about a spindle:</p>\n\n<ol>\n<li>Structure : does it obviously break into pieces, or are you making tradeoffs?</li>\n<li>Usage : how will the data be analyzed/retrieved/grokked?</li>\n<li>Lifetime : how long is the data useful?</li>\n<li>Size : how much data is there?</li>\n</ol>\n\n<p>One particular advantage of CSV files over RDBMSes is that they can be easy to condense and move around to practically any other machine. We do large data transfers, and everything\'s simple enough we just use one big CSV file, and easy to script using tools like rsync. To reduce repetition on big CSV files, you could use something like <a href="http://yaml.org" rel="noreferrer">YAML</a>. I\'m not sure I\'d store anything like JSON or XML, unless you had significant relationship requirements.</p>\n\n<p>As far as not-mentioned alternatives, don\'t discount <a href="http://hadoop.apache.org/core/" rel="noreferrer">Hadoop</a>, which is an open source implementation of MapReduce. This should work well if you have a TON of loosely structured data that needs to be analyzed, and you want to be in a scenario where you can just add 10 more machines to handle data processing.</p>\n\n<p>For example, I started trying to analyze performance that was essentially all timing numbers of different functions logged across around 20 machines. After trying to stick everything in a RDBMS, I realized that I really don\'t need to query the data again once I\'ve aggregated it. And, it\'s only useful in it\'s aggregated format to me. So, I keep the log files around, compressed, and then leave the aggregated data in a DB.</p>\n\n<p><em>Note</em> I\'m more used to thinking with "big" sizes.</p>\n'}, {'answer_id': 38058, 'author': 'horace', 'author_id': 2887, 'author_profile': 'https://Stackoverflow.com/users/2887', 'pm_score': 2, 'selected': False, 'text': '<p>In some cases (financial market data and process control for example) you might need to use a real-time database rather than a RDBMS. See <a href="http://en.wikipedia.org/wiki/Real_time_database" rel="nofollow noreferrer">wiki link</a></p>\n'}, {'answer_id': 38069, 'author': 'Terry Longrie', 'author_id': 4063, 'author_profile': 'https://Stackoverflow.com/users/4063', 'pm_score': 1, 'selected': False, 'text': '<p>One might want to consider the use of an LDAP server in the place of a traditional SQL database if the application data is heavily key/value oriented and hierarchical in nature.</p>\n'}, {'answer_id': 38527, 'author': 'John Channing', 'author_id': 3305, 'author_profile': 'https://Stackoverflow.com/users/3305', 'pm_score': 0, 'selected': False, 'text': '<p>One good reason not to use a relational database would be when you have a massive data set and want to do massively parallel and distributed processing on the data.  The Google web index would be a perfect example of such a case.  </p>\n\n<p>Hadoop also has an implementation of the <a href="http://labs.google.com/papers/gfs.html" rel="nofollow noreferrer">Google File System</a> called the <a href="http://hadoop.apache.org/core/docs/current/hdfs_design.html" rel="nofollow noreferrer">Hadoop Distributed File System</a>.</p>\n'}, {'answer_id': 38533, 'author': 'Celestial M Weasel', 'author_id': 4125, 'author_profile': 'https://Stackoverflow.com/users/4125', 'pm_score': 1, 'selected': False, 'text': "<p>BTree files are often much faster than relational databases. SQLite contains within it a BTree library which is in the public domain (as in genuinely 'public domain', not using the term loosely). </p>\n\n<p>Frankly though, if I wanted a multi-user system I would need a lot of persuading not to use a decent server relational database. </p>\n"}, {'answer_id': 46995, 'author': 'Jared Updike', 'author_id': 2543, 'author_profile': 'https://Stackoverflow.com/users/2543', 'pm_score': 3, 'selected': False, 'text': '<blockquote>\n  <p>Custom (hand-written) storage engine / Potentially very high performance in required uses cases</p>\n</blockquote>\n\n<p><a href="http://www.hdfgroup.org/" rel="nofollow noreferrer">http://www.hdfgroup.org/</a></p>\n\n<p>If you have enormous data sets, instead of rolling your own, you might use HDF, the Hierarchical Data Format.</p>\n\n<p><a href="http://en.wikipedia.org/wiki/Hierarchical_Data_Format" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Hierarchical_Data_Format</a>:</p>\n\n<blockquote>\n  <p>HDF supports several different data models, including multidimensional arrays, raster images, and tables.</p>\n</blockquote>\n\n<p>It\'s also hierarchical like a file system, but the data is stored in one magic binary file.</p>\n\n<blockquote>\n  <p>HDF5 is a suite that makes possible the management of extremely large and complex data collections.</p>\n</blockquote>\n\n<p>Think petabytes of NASA/JPL remote sensing data.</p>\n'}, {'answer_id': 65105, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>Full-text databases, which can be queried with proximity operators such as "within 10 words of," etc.</p>\n\n<p>Relational databases are an ideal business tool for many purposes - easy enough to understand and design, fast enough, adequate even when they aren\'t designed and optimized by a genius who could "use the full power," etc.  </p>\n\n<p>But some business purposes require full-text indexing, which relational engines either don\'t provide or tack on as an afterthought.  In particular, the legal and medical fields have large swaths of unstructured text to store and wade through.</p>\n'}, {'answer_id': 96798, 'author': 'ConcernedOfTunbridgeWells', 'author_id': 15401, 'author_profile': 'https://Stackoverflow.com/users/15401', 'pm_score': 2, 'selected': False, 'text': '<p>There was a RAD tool called <a href="http://www.jadeworld.com/" rel="nofollow noreferrer">JADE </a>written a few years ago that has a built-in OODBMS.  Earlier incarnations of the DB engine also supported Digitalk Smalltalk.  If you want to sample application building using a non-RDBMS paradigm this might be a start.  </p>\n\n<p>Other OODBMS products include <a href="http://www.objectivity.com/" rel="nofollow noreferrer">Objectivity</a>, <a href="http://www.gemstone.com/" rel="nofollow noreferrer">GemStone</a> (You will need to get <a href="http://www.cincomsmalltalk.com/" rel="nofollow noreferrer">VisualWorks</a> Smalltalk to run the Smalltalk version but there is also a java version).  There were also some open-source research projects in this space - EXODUS and its descendent SHORE come to mind.</p>\n\n<p>Sadly, the concept seemed to die a death, probably due to the lack of a clearly visible standard and relatively poor ad-hoc query capability relative to SQL-based RDMBS systems.</p>\n\n<p>An OODBMS is most suitable for applications with core data structures that are best represented as a graph of interconnected nodes.  I used to say that the quintessential OODBMS application was a Multi-User Dungeon (MUD) where rooms would contain players\' avatars and other objects.</p>\n'}, {'answer_id': 145614, 'author': 'Goran', 'author_id': 23164, 'author_profile': 'https://Stackoverflow.com/users/23164', 'pm_score': 1, 'selected': False, 'text': '<p>Also:\n* Embedded scenarios - Where usually it is required to use something smaller then a full fledged RDBMS. <a href="http://www.db4o.com" rel="nofollow noreferrer">Db4o</a> is an ODB that can be easily used in such case.\n* Rapid or proof-of-concept development - where you wish to focus on the business and not worry about persistence layer</p>\n'}, {'answer_id': 145616, 'author': 'bzlm', 'author_id': 7724, 'author_profile': 'https://Stackoverflow.com/users/7724', 'pm_score': 3, 'selected': False, 'text': '<p>If you don\'t need <a href="http://en.wikipedia.org/wiki/ACID" rel="noreferrer">ACID</a>, you probably don\'t need the overhead of an RDBMS. So, determine whether you need that first. Most of the non-RDBMS answers provided here do <em>not</em> provide ACID.</p>\n'}, {'answer_id': 145626, 'author': 'borjab', 'author_id': 16206, 'author_profile': 'https://Stackoverflow.com/users/16206', 'pm_score': 1, 'selected': False, 'text': '<p>K.I.S.S:  Keep It Small and Simple</p>\n'}, {'answer_id': 145642, 'author': 'akauppi', 'author_id': 14455, 'author_profile': 'https://Stackoverflow.com/users/14455', 'pm_score': 0, 'selected': False, 'text': '<p>I would strongly recommend Lua as an alternative to SQLite-kind of data storage.</p>\n\n<p>Because:</p>\n\n<ul>\n<li>The language was designed as a data description language to begin with</li>\n<li>The syntax is human readable (XML is <em>not</em>)</li>\n<li>One can compile Lua chunks to binary, for added performance</li>\n</ul>\n\n<p>This is the "native language collection" option of the accepted answer. If you\'re using C/C++ as the application level, it is perfectly reasonable to throw in the Lua engine (100kB of binary) just for the sake of reading configs/data or writing them out.</p>\n'}, {'answer_id': 2358338, 'author': 'Chris de Vries', 'author_id': 3836, 'author_profile': 'https://Stackoverflow.com/users/3836', 'pm_score': 1, 'selected': False, 'text': '<p><a href="http://camelcase.blogspot.com/2007/08/cap-theorem.html" rel="nofollow noreferrer">CAP theorem</a> explains it succinctly. SQL mainly provides "Strong Consistency: all clients see the same view, even in presence of updates".</p>\n'}, {'answer_id': 5384209, 'author': 'Anton Prokofiev', 'author_id': 330251, 'author_profile': 'https://Stackoverflow.com/users/330251', 'pm_score': 1, 'selected': False, 'text': '<p>I would offer RDBMS :)\nIf you do  not wont to have troubles with set up/administration go for SQLite. \nBuilt in RDBMS with full SQL support. It even allows you to store any type of data in any column.</p>\n\n<p>Main advantage against for example log file: If you have huge one, how are you going to search in it? With SQL engine you just create index and speed up operation dramatically.</p>\n\n<p>About full text search: SQLite has modules for full text search too..</p>\n\n<p>Just enjoy nice standard interface to your data :)</p>\n'}]
['https://Stackoverflow.com/questions/37823', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4018/']