{"id":2853,"date":"2013-05-02T16:56:57","date_gmt":"2013-05-02T22:56:57","guid":{"rendered":"http:\/\/www.contrapositivediary.com\/?p=2853"},"modified":"2013-05-02T16:56:58","modified_gmt":"2013-05-02T22:56:58","slug":"wheres-the-rest-of-sqlite","status":"publish","type":"post","link":"https:\/\/www.contrapositivediary.com\/?p=2853","title":{"rendered":"Where&#8217;s the rest of SQLite?"},"content":{"rendered":"<p>Wait. Oh. That&#8217;s all there is.<\/p>\n<p>Really.<\/p>\n<p>I had this problem once before, with <a href=\"http:\/\/www.atlantiswordprocessor.com\/en\/\" target=\"_blank\">the Atlantis word processor<\/a>. It&#8217;s 5MB installed. 5. The first time I installed it I suspected I had downloaded a corrupt file, but no: However they did it, the wizards over at Atlantis implemented a damned fine Word 2000 clone in 5MB. It doesn&#8217;t have the collaboration features, but for solo work it&#8217;s a very big win, and exports extremely clean epubs as a side benefit.<\/p>\n<p>For a fair number of years now, my non-Delphi database work has all been in MySQL. (With Delphi I use a VCL product called DBISAM, which is linked into the compiled .exe and doesn&#8217;t have to be installed separately.) Because SQLite is available for the Raspbian OS and MySQL isn&#8217;t (as best I know; Percona runs on Arch Linux) I&#8217;m going to be using SQLite as a database teaching tool. So when I installed it the other day, I stared at the 600K .dll and wondered, <em>Is that all there is?<\/em><\/p>\n<p>Yes, that&#8217;s all there is, my friend&#8211;so let&#8217;s keep dancing. Let&#8217;s break out the tools and have a ball. &#8216;Cause that&#8217;s all there is!<\/p>\n<p>Wow. I verified it by searching for the sqlite3.dll file on my system. The Calibre ebook manager uses an older version (as do a few other things) and the file was not only that same unbelievable size, but <em>smaller<\/em>. Can you implement a relational database engine in only 372K? I guess you can.<\/p>\n<p>One reason SQLite&#8217;s .dll is so small is that it contains no UI at all. There&#8217;s a bare-bones command-line management utility available as a separate download. As some of you may know (or suspect) I dislike command lines intensely. So it wasn&#8217;t long before I had two free GUI management apps for SQLite databases. One was recommended by <a href=\"http:\/\/www.amazon.com\/SQLite-Chris-Newman\/dp\/067232685X\/\" target=\"_blank\">Chris Newman&#8217;s book on SQLite<\/a>, <a href=\"http:\/\/sourceforge.net\/projects\/sqlitebrowser\/\" target=\"_blank\">SQLite Database Browser<\/a>, and the other is <a href=\"http:\/\/sqliteman.com\/\" target=\"_blank\">SQLiteMan<\/a>. Both are free and installed without drama. So far I prefer SQLiteMan, but it&#8217;s really too early to tell. <a href=\"http:\/\/www.raspberrypi.org\/phpBB3\/\/viewtopic.php?f=30&amp;t=14963\" target=\"_blank\">SQLiteMan is supposedly compilable on the RPi<\/a>. I intend to try that. I&#8217;ll let you know how it goes.<\/p>\n<p>One other reason may be that SQLite is &#8220;typeless,&#8221; which means that the engine does not do type-checking on reads and writes. You can put anything you want in any field (apart from key fields, which are treated specially) and if it makes no sense, it&#8217;s your screwup on your conscience. I&#8217;m a strongly typed guy and this would rankle, if it didn&#8217;t allow a database engine to come in at half a megabyte.<\/p>\n<p>There are wrappers for most common languages, including Lua and Lazarus\/FreePascal, both of which I have here and have been fooling with in recent months. I&#8217;ve been very spoiled by DBISAM, and I&#8217;m interested to see how well SQLite works in non-server applications. More as it happens.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wait. Oh. That&#8217;s all there is. Really. I had this problem once before, with the Atlantis word processor. It&#8217;s 5MB installed. 5. The first time I installed it I suspected I had downloaded a corrupt file, but no: However they did it, the wizards over at Atlantis implemented a damned fine Word 2000 clone in [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[132,32],"class_list":["post-2853","post","type-post","status-publish","format-standard","hentry","category-daybook","tag-lazarus","tag-programming"],"_links":{"self":[{"href":"https:\/\/www.contrapositivediary.com\/index.php?rest_route=\/wp\/v2\/posts\/2853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.contrapositivediary.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.contrapositivediary.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.contrapositivediary.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.contrapositivediary.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2853"}],"version-history":[{"count":0,"href":"https:\/\/www.contrapositivediary.com\/index.php?rest_route=\/wp\/v2\/posts\/2853\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.contrapositivediary.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.contrapositivediary.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.contrapositivediary.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}