7 ms·
Sqlite – Most Deployed Database in the World
- sudeepj 8y agohttps://www.sqlite.org/testing.html https://www.sqlite.org/testing.html The testing each release goes through is quite impressive. I bet more time is spent on testing (or writing tests) than actually developing the features.
- fuddle 8y ago"the project has 711 times as much test code and test scripts" than source code. That's a really impressive feat.
- deleted 8y ago[deleted]
- monocasa 8y agoHuh, at that point it'd probably make more sense to formally verify it. For sel4 last time I checked the ratio was 25/1 proof code/verified code.
- sudeepj 8y agoAs far as I understand, formal verification does not certify the implementation even though the algorithms used are sound.
- geofft 8y agoIt depends—many proof-assistant languages let you extract an implementation directly out of your formally-specified algorithm (generally by dropping rich typing-ish information, but you've already verified it's correct). Or take seL4, which amazingly proves that not just the C code but also the binary faithfully matches their formally-specified algorithms. https://sel4.systems/Info/FAQ/proof.pml https://sel4.systems/Info/FAQ/proof.pml Of course who knows what your CPU microcode is doing, but for the question at hand—ensuring a highly portable C library does what it claims to do more efficiently and accurately than exhaustive testing—formal verification is certainly a reasonable approach.
- krylon 8y agoSQLite is used on many platforms, built using many compilers. All of those compilers might have bugs themselves (who am I kidding? They do), something verification cannot account for.
- simonw 8y agoI also like this page of the docs: "SQLite as an application file format": https://www.sqlite.org/appfileformat.html https://www.sqlite.org/appfileformat.html
- hardwaresofton 8y agoAlso on my list of favorites: https://www.sqlite.org/whentouse.html https://www.sqlite.org/whentouse.html Back when I worked at a large semi conductor company they used GDSII[0] and Calibre[1] files along with internal formats and I always wondered why they wouldn't just use SQLite. SQLite is even threadsafe[2]. [0]: https://en.wikipedia.org/wiki/GDSII https://en.wikipedia.org/wiki/GDSII [1]: https://www.mentor.com/products/ic_nanometer_design/verification-signoff/ https://www.mentor.com/products/ic_nanometer_design/verifica... [2]: https://www.sqlite.org/threadsafe.html https://www.sqlite.org/threadsafe.html
- mistrial9 8y agoalso see GeoPackage https://en.wikipedia.org/wiki/GeoPackage https://en.wikipedia.org/wiki/GeoPackage
- simonebrunozzi 8y agoMost = highest number of installations. I bet the winner for largest amount of data managed could be another one (Oracle? MySQL?)
- fl0wenol 8y agoIt might still be SQLite in that case. The largest data management systems are proprietary (i.e. Google's ever-evolving data layer)
- jayonsoftware 8y ago"Every Windows10 machine" , did not know that, where is it located ?
- xkcd-sucks 8y agoI would contribute towards a Wall St Journal full page ad "SQLite: Most widely used DB in the world" with little misleading graphs comparing to Oracle and DB2
- qwerty456127 8y agoIndeed it would be interesting to also see comparison by the volume of data stored and the number of requests processed.
- darkpuma 8y agoTrying to make Larry Ellison blow a fuse?
- kakwa_ 8y agoHe has reasons to, given that Oracle owns BerkeleyDB which used to dominate the embedded DB use case in the past, being often replaced by sqlite.
- virtualwhys 8y ago> SQLite is likely used more than all other database engines combined. Billions and billions of copies of SQLite exist in the wild. SQLite is found in: > Every Firefox, Chrome, and Safari web browser Where is SQLite in Firefox? It would be wonderful to use SQL in the browser, on the server, in mobile devices (everywhere!), but alas I suspect SQLite can be "found" in Firefox as the underlying storage engine on top of which IndexedDB is built. Dammit Mozilla, set SQLite free!
- hnaccy 8y agoThat was Web SQL. https://hacks.mozilla.org/2010/06/beyond-html5-database-apis-and-the-road-to-indexeddb/ https://hacks.mozilla.org/2010/06/beyond-html5-database-apis...
- virtualwhys 8y ago> That was Web SQL and very much still is in Chrome and Safari, nearly 10 years after WebSQL was "deprecated". Firefox removed WebSQL, replacing it with IndexedDB, a simple k -> v store. Cross platform SQL everywhere? Not with Firefox still in the mix.
- nerflad 8y agoConsidering the Type-flexibility of SQLite, would it necessarily be too difficult to have an object-relational mapping that works across both DB's? I guess it depends on the application. Surely it would be a pain, but perhaps still a possibility.
- bch 8y agohttps://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data https://support.mozilla.org/en-US/kb/profiles-where-firefox-... https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager-webext/ https://addons.mozilla.org/en-US/firefox/addon/sqlite-manage...
- quietbritishjim 8y agoI believe that quotation is just saying that Firefox uses SQLite to store some of its internal state, not that it has an API to interact with general SQLite databases.
- baldfat 8y agoI love sqlite. It is far to under used. It scales incredibly well and if you out grow you can easily move it into a different dB system.
- wenc 8y agoThere is a way that it does not. It is flexibly typed so you can insert a string into an integer column. This is by design. This also means you’ll run into trouble when you try to move it to most SQL databases which are strongly typed.
- solarkraft 8y ago> This is by design. Oh god, why?
- thisgoodlife 8y agoNo. In reality, it's incredibly hard to migrate any database to another database. Even if you have high test coverage, there can be some corner cases bite you later. Hack, simply a version upgrade can have all kinds of problems.
- n-gate 8y agoIsnt it Microsoft windows registry?
- mkl 8y agoNo, even if you count that as a database, it isn't the most deployed. Look at the list in the article. SQLite is on every Android device and Windows 10 device, and many/most personal computers with other operating systems (including earlier Windows versions). There are more Android devices in use than Windows ones: https://www.computerworld.com/article/2919104/windows-pcs/where-will-microsoft-find-1-billion-devices-for-windows-10.html https://www.computerworld.com/article/2919104/windows-pcs/wh...
- misterkolaz 8y agoMost of android apps use it as well ;)
- qwerty456127 8y agoThis makes me wonder why there are no alternative implementations of it (i.e. I felt like I would appreciate a .Net-native implementation many times).
- hawkice 8y agoIt's written in C, you should be able to FFI into it from anywhere. The API is reasonably small, too.
- qwerty456127 8y agoI know it's written in C. And it usually takes hours of shamanic dances to make it work in a Visual Studio WinForms app (while performance is rarely important for these projects).
- jasode 8y agoA C# native port[0] of Sqlite was attempted in 2009 and eventually abandoned in 2012. It was a lot of work and the developer didn't get 100% of the verification tests to pass. To be fair to the programmer, he said the C-to-C# translation was mostly a self-learning exercise rather than a serious attempt at creating a production-quality library. I think the obvious answer is that there's no market demand for a C# native version of SQLite. People just use the C# ADO.NET wrapper that calls the "unsafe" C compiled DLL[1]. Using that method, it's easier to stay up-to-date with the canonical C source code that has the latest bug fixes and new features. If you look at high frequency of updates in the release history[2], you can see that constantly porting the new C code to C# to maintain feature parity would be a tremendous amount of work. Also, if you create a C to C# port, it means using the C Language style API such as "sqlite3_open()" instead of the more natural C# paradigm of ADO.NET "new SQLiteConnection(@"Data Source=x")". Somebody would than have to write another ADO.NET wrapper to specifically interface with the C# port of SQLite. [0] https://code.google.com/archive/p/csharp-sqlite/ https://code.google.com/archive/p/csharp-sqlite/ [1] https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki https://system.data.sqlite.org/index.html/doc/trunk/www/down... [2] https://www.sqlite.org/changes.html https://www.sqlite.org/changes.html
- ksec 8y agoI wonder why there aren't more DB like bedrock which builds on top of SQLite. https://github.com/Expensify/Bedrock https://github.com/Expensify/Bedrock
- stickupkid 8y agoLXD has a distributed cluster system built upon SQLite[1], that's based on the raft consensus protocol. 1. https://github.com/CanonicalLtd/go-dqlite/ https://github.com/CanonicalLtd/go-dqlite/
- InGodsName 8y agoI don't think Sqlite will maintain this position for long. Apps are moving to LSM based storage engines. RocksDB or Badger are the future. Now, you just need to make embedded DB with Sqlite API using rocksdb/badger and sell it as direct competitor to Sqlite. It will be a dropin replacement for Sqlite, written in a safer (hacker hype) language. For more Omph, use Rust as a language for this and create libaries using FFI for python/ruby/node/c#
- pdimitar 8y ago> and sell it as direct competitor to Sqlite Pretty sure selling it won't work. For many, a convenient mini-storage is an afterthought during a product development and it doesn't warrant a cost.
- InGodsName 8y agoSelling as in marketing it to same crowd.