title: Store a large set of relational data in a JavaScript Electron Desktop App?
body: <p>I am building a Bookmarking app using JavaScript and Electron <a href="http://electron.atom.io/" rel="nofollow">http://electron.atom.io/</a> to make it a desktop offline app.</p>
  
  <p>Generally I would be building it online as a web app with a PHP and MySQL backend.  As a self hosted Electron desktop app I do not have the pleasure of a nice relational database that can handle massive loads of data!</p>
  
  <p>Some info about my data that I need to somehow store on the users computer for the Electron app...</p>
  
  <p>Assuming this was a typical MySQL database it would have these tables...</p>
  
  <ul>
  <li>Bookmark Collection Lists</li>
  <li>Bookmark Tags</li>
  <li>Bookmarks</li>
  <li>website URLs (each URL can have 1 record however a bookmark can have multiple records for the same page as long as they all reference the 1 url record.)</li>
  <li>Bookmark Tags relation table to Bookmarks</li>
  <li>Bookmarks relation table to website URLs</li>
  </ul>
  
  <p>Potential issues due to size of data collection...</p>
  
  <ul>
  <li>Bookmark Tags table could have anywhere from 1 record up to 5,000 records</li>
  <li>Bookmarks and website URL records could easily pass the 10,000 record mark.</li>
  </ul>
  
  <p>My mockup app so far is currently storing the tags and bookmarks in 2 JSON files.  Based on the number of records I will have though I do not see the JSON file being a practical solution!</p>
  
  <p>So my question is, what are some possibble solutions to store this amount of relational data for an offline JavaScript Electron desktop app?</p>
  
  <p>My research so far has only resulted in a few JavaScript libraries that act like a database using things like IndexedDB but I am not sure if these will work with my large data set?</p>
  
  <p>Also is there anything relational I can use as I have Bookmmarks which can have multiple Tag records and searching?  All articles about using SQLite in Electron have resulted in failure as well as my own attempt at it.</p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I finally found a working version of SQLite in Electron using SQLJS <a href="https://github.com/kripken/sql.js" rel="nofollow">https://github.com/kripken/sql.js</a> and this test app shows it working  E:\Software\ElectronWebApps\electron-sqljs-master </p>