Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is one excellent format that meets all your criteria:</p> <blockquote> <h1>SQLite!</h1> </blockquote> <p>Please read <strong><a href="http://www.sqlite.org/appfileformat.html" rel="nofollow">article</a></strong> about using SQLite as an application file format. Also, please <strong><a href="http://youtu.be/jN_YdMdjVpU" rel="nofollow">watch Google Tech Talk</a></strong> by D. Richard Hipp (SQLite author) about this very topic.</p> <p>Now, lets see how SQLite meets your requirements:</p> <blockquote> <p><strong>The format is a "standard"</strong></p> </blockquote> <p>SQLite has become format of choice for most mobile environments, and for many desktop apps (Firefox, Thunderbird, Google Chrome, Adobe Reader, you name it).</p> <blockquote> <p><strong>Easily integrates with C++</strong></p> </blockquote> <p>SQLite has <a href="http://www.sqlite.org/cintro.html" rel="nofollow">standard C interface</a>, which is only one source file and one header file. There are <a href="http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers" rel="nofollow">C++ wrappers too</a>.</p> <blockquote> <p><strong>Supports tabular input (2d, n-dimensional)</strong></p> </blockquote> <p>SQLite table is as tabular as you could possibly imagine. To represent say 3-dimensional data, create table with columns <code>x,y,z,value</code> and store your data as a set of rows like this:</p> <pre><code>x1,y1,z1,value1 x2,y2,z2,value2 ... </code></pre> <blockquote> <p><strong>Supports POD types</strong></p> </blockquote> <p>I assume by POD you meant Plain Old Data, or BLOB. SQLite lets you store BLOB fields as is.</p> <blockquote> <p><strong>Can expand as more inputs are required, binds well to variables</strong></p> </blockquote> <p>This is where it really shines.</p> <blockquote> <p><strong>Parsing speed is not terribly important</strong></p> </blockquote> <p>But SQLite speed is superb. In fact, parsing is basically transparent.</p> <blockquote> <p><strong>Ideally, as easy to write (reflect) as it is to read</strong></p> </blockquote> <p>Just use <code>INSERT</code> to write and <code>SELECT</code> to read - what could be easier?</p> <blockquote> <p><strong>Works well on Windows and Linux</strong></p> </blockquote> <p>You bet, and all other platforms as well.</p> <blockquote> <p><strong>Supports compositing (one file referencing another file to read)</strong></p> </blockquote> <p>You can ATTACH one database to another.</p> <blockquote> <p><strong>Human Readable</strong></p> </blockquote> <p>Not in binary, but there are many excellent SQLite browsers/editors out there. I like <a href="http://www.sqliteexpert.com" rel="nofollow">SQLite Expert Personal</a> on Windows and <a href="http://sqliteman.com" rel="nofollow">sqliteman</a> on Linux. There is also <a href="https://addons.mozilla.org/en-us/firefox/addon/sqlite-manager/" rel="nofollow">SQLite editor plugin for Firefox</a>.</p> <hr> <blockquote> <p>There are other advantages that SQLite gives you for free:</p> </blockquote> <ul> <li><p>Data is <strong>indexable</strong> which makes it very fast to search. You just cannot do this using XML, JSON or any other text-only formats.</p></li> <li><p>Data can be edited <strong>partially</strong>, even when amount of data is very large. You do not have to rewrite few gigabytes just to edit one value.</p></li> <li><p>SQLite is fully <strong>transactional</strong>: it guarantees that your data is consistent at all times. Even if your application (or whole computer) crashes, your data will be automatically restored to last known consistent state on next first attempt to connect to the database.</p></li> <li><p>SQLite stores your data <strong>verbatim</strong>: you do not need to worry about escaping junk characters in your data (including zero bytes embedded in your strings) - simply always use <a href="http://en.wikipedia.org/wiki/Prepared_statement" rel="nofollow">prepared statements</a>, that's all it takes to make it transparent. This can be big and annoying problem when dealing with text data formats, XML in particular.</p></li> <li><p>SQLite stores all strings in <strong>Unicode</strong>: <code>UTF-8</code> (default) or <code>UTF-16</code>. In other words, you do not need to worry about text encodings or international support for your data format.</p></li> <li><p>SQLite allows you to process data in small chunks (row by row in fact), thus it works well in <strong>low memory conditions</strong>. This can be a problem for any text based formats, because often they need to load all text into memory to parse it. Granted, there are few efficient stream-based XML parsers out there, but in general any XML parser will be quite memory greedy compared to SQLite.</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload