<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>has_many :thoughts: Tag sqlite</title>
    <link>http://blog.kineticweb.com/articles/tag/sqlite</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Musings from a Ruby on Rails development team</description>
    <item>
      <title>Exporting data from SQLite</title>
      <description>&lt;p&gt;I recently discovered that sqlite3 has a number of output modes to spit out query results in different formats:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;.mode MODE ?TABLE?   Set output mode where MODE is one of:

csv      Comma-separated values
column   Left-aligned columns.  (See .width)
html     HTML &amp;lt;table&amp;gt; code
insert   SQL insert statements for TABLE
line     One value per line
list     Values delimited by .separator string
tabs     Tab-separated values
tcl      TCL list elements&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;By specifying &lt;code&gt;.mode insert&lt;/code&gt; one can get nicely formatted insert statements that can be imported right into MySQL. This is what I did to convert my Voicemail app to MySQL. However, if you don&amp;#8217;t specify a table name on the same line, the resulting insert statements just say &amp;#8220;insert into table&amp;#8221;. One must use &lt;code&gt;.mode insert voicemails&lt;/code&gt; to get insert statements out of sqlite3 that read &amp;#8220;insert into voicemails&amp;#8221;. A bit silly if you ask me&amp;#8230; one would think the table name in the insert statements would just default to the name of the table you were selecting from. But, this worked great for me and was all I needed to get converted.&lt;/p&gt;</description>
      <pubDate>Sun, 03 Feb 2008 09:50:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:39df7e5a-240c-43b9-94f8-2fc17746c8e8</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2008/02/03/exporting-data-from-sqlite</link>
      <category>sqlite</category>
      <category>MySQL</category>
    </item>
    <item>
      <title>My first Camping app</title>
      <description>&lt;p&gt;The first time I heard of Camping, was &lt;a href="http://blog.evanweaver.com/articles/2006/10/06/introduction-to-camping-presentation"&gt;Evan Weaver&amp;#8217;s talk about it at Philly on Rails&lt;/a&gt;. I&amp;#8217;ll admit that, at first, I was a bit skeptical. It seemed silly to have something that duplicated some of what Rails already did.&lt;/p&gt;


	&lt;p&gt;But I just built my first little app with Camping and I am pleasantly surprised. It was a just a little weekend project: A page that lists things in and around Philly that my wife and I like to do and can suggest to friends visiting the area. It has only one view to List out the items and a simple Add and Remove action. The database is sqlite, my first time using it.&lt;/p&gt;


	&lt;p&gt;Building it in Rails would probably have been overkill. Now, I still haven&amp;#8217;t figured out the best way to deploy this on our server: I&amp;#8217;m thinking I&amp;#8217;ll try FastCGI. But the development process has been a joy and I love how everything is just one file of about 100 lines of code. (Except for, of course, Ruby, Camping, ActiveRecord, and a bunch of other libraries.)&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://redhanded.hobix.com/inspect/markaby03.html"&gt;Markaby&lt;/a&gt; was the most interesting thing to learn. I haven&amp;#8217;t compared it thoroughly to &lt;span class="caps"&gt;HAML&lt;/span&gt;, which I&amp;#8217;ve tried and do like, but it seems to be quite similar and just as fun to write with.&lt;/p&gt;</description>
      <pubDate>Sun, 12 Aug 2007 13:27:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:7c65ec63-cdd7-46d4-bd0c-d58823764999</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/08/12/my-first-camping-app</link>
      <category>ruby</category>
      <category>camping</category>
      <category>sqlite</category>
      <trackback:ping>http://blog.kineticweb.com/articles/trackback/53</trackback:ping>
    </item>
    <item>
      <title>SQLite vs. MySQL/etc...</title>
      <description>&lt;p&gt;After reading about the wonderful release of mother &lt;a href="http://www.joyent.com"&gt;Joyent&amp;#8217;s&lt;/a&gt; &lt;a href="http://www.joyent.com/developers/slingshot/"&gt;Slingshot&lt;/a&gt; the other day, I noticed that in the docs it said Slingshot uses &lt;a href="http://www.sqlite.org/index.html"&gt;SQLite&lt;/a&gt; on desktop clients. I thought that this was pertaining to personal preference, support the underdog kinda thing. That was wrong, SQLite is easier on memory because it uses file-io instead of in-memory db access&amp;#8230;&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&amp;#8220;For low load websites, SQLite has worked great in our projects. If you&amp;#8217;re doing an application in C, its &lt;span class="caps"&gt;API&lt;/span&gt; is simply unbeatable. Perhaps its most distinguishing feature is that it pretty much ignores types. This is, in fact, a &amp;#8220;feature&amp;#8221;, and I have found that it gives it flexibility that is lacking in other situations(although, you have to put your dates in very specific formats to get the sort order to come out right&amp;#8230;).&amp;#8221;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&amp;#8220;For web development purposes, if you&amp;#8217;re doing a really high load website, you&amp;#8217;re going to want to use a non-file based database(personally, I prefer PostgreSQL, but sub MySQL, &lt;span class="caps"&gt;SQL&lt;/span&gt; Server, whatever&amp;#8230;)&amp;#8221;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&amp;#8220;I also can&amp;#8217;t express just how great it is for desktop apps though. Its great for 95% of the situations you would need to save data in an application in a &amp;#8220;file format&amp;#8221; of some variety. It make debugging great(fire up the console on the file your app is writing too and watch inserts as they happen). No configuration at all. No mucking about with binary file formats. No &lt;span class="caps"&gt;XML&lt;/span&gt; parsing.&amp;#8221;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;blockquote&gt;
		&lt;p&gt;(&lt;a href="http://discuss.joelonsoftware.com/default.asp?design.4.281660.5"&gt;external quote&lt;/a&gt;)&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;I have heard many Rails users glorify the use of SQLite as a testing db&amp;#8230; choose wisely! For me, I think I&amp;#8217;ll stick to what my apps will probably be using as there primary production db, MySQL. :)&lt;/p&gt;</description>
      <pubDate>Fri, 11 May 2007 08:41:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:e36d9d11-a7b0-4ecf-9743-0377644e49c3</guid>
      <author>Justin Reagor</author>
      <link>http://blog.kineticweb.com/articles/2007/05/11/sqlite-vs-mysql</link>
      <category>Rails</category>
      <category>database</category>
      <category>sqlite</category>
      <category>MySQL</category>
    </item>
  </channel>
</rss>
