<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ajaxian &#187; Database</title>
	<atom:link href="http://ajaxian.com/by/topic/database/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 02 Feb 2012 22:23:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
    	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>JSINQ 1.0: now fully supports .NET 3.0 query operators</title>
		<link>http://ajaxian.com/archives/jsinq-10</link>
		<comments>http://ajaxian.com/archives/jsinq-10#comments</comments>
		<pubDate>Tue, 30 Mar 2010 11:25:25 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8797</guid>
		<description><![CDATA[Kai Jäger's JSINQ has now gotten to the long sort after 1.0 release. Kai has kindly shared a few thoughts on the release and the project: I’m happy to announce that one year after its initial release, JSINQ is now stable and packed with new features. Just like the previous version, JSINQ supports the complete <a href="http://ajaxian.com/archives/jsinq-10">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Kai Jäger's <a href="http://jsinq.codeplex.com/">JSINQ</a> has now gotten to the long sort after 1.0 release. Kai has kindly shared a few thoughts on the release and the project:</p>
<blockquote><p>
I’m happy to announce that one year after its initial release, JSINQ is now stable and packed with new features. Just like the previous version, JSINQ supports the complete set of .NET 3.5 query operators. As of version 1.0, JSINQ also supports the .NET 4.0 query operator “zip”. Additionally, JSINQ now contains complete implementations of System.Collections.Generic.List and System.Collections.Generic.Dictionary. The dictionary class is especially useful, as it supports arbitrary values as keys (unlike JavaScript objects). JSINQ is fully documented, comes with a comprehensive suite of tests and is already being used in production. Without the optional query compiler, JSINQ is only 23 KB when minified.
</p></blockquote>
<p>See it action at the <a href="http://kaijaeger.com/downloads/jsinq/playground/">JSINQ playground</a> where you can play with your own queries such as:</p>
<div class="igBar"><a href="javascript:showCodeTxt('sql-2');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">SQL:</span>
<div id="sql-2">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">FROM</span> customer <span style="color: #993333; font-weight: bold;">IN</span> $<span style="color:#800000;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">WHERE</span> customer.lastname.charAt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span> == <span style="color: #ff0000;">'S'</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color:#006600; font-weight:bold;">&#123;</span>id: customer.id, name: customer.firstname + <span style="color: #ff0000;">' '</span> + customer.lastname<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/jsinq-10/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Moving from the Couch to the LawnChair</title>
		<link>http://ajaxian.com/archives/moving-from-the-couch-to-the-lawnchair</link>
		<comments>http://ajaxian.com/archives/moving-from-the-couch-to-the-lawnchair#comments</comments>
		<pubDate>Tue, 24 Nov 2009 11:20:25 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8016</guid>
		<description><![CDATA[We have mentioned attempts at doing Couch in the browser before, and now we have a new project. Brian LeRoux of PhoneGap/Nitobi fame, has taken a lighter couch outside as he announces Lawnchair that aims at being applicable for mobile Web usage (but can of course work anywhere else): Features micro tiny storage without the <a href="http://ajaxian.com/archives/moving-from-the-couch-to-the-lawnchair">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>We have mentioned <a href="http://ajaxian.com/archives/browsing-on-the-couch">attempts at doing Couch in the browser</a> before, and now we have a new project. </p>
<p><a href="http://westcoastlogic.com/">Brian LeRoux</a> of PhoneGap/Nitobi fame, has taken a lighter couch outside as he announces <a href="http://brianleroux.github.com/lawnchair/">Lawnchair</a> that aims at being applicable for mobile Web usage (but can of course work anywhere else):</p>
<p><b>Features</b></p>
<ul>
<li>micro tiny storage without the nasty SQL: pure and delicious JSON
</li>
<li>clean and simple oo design with one db table per store
</li>
<li>key/value store.. specifying a key is optional
</li>
<li>happily and handily will treat your store as an array of objects
</li>
<li>terse syntax for searching and therefore finding of objects
</li>
</ul>
<p>Give it <a href="http://github.com/brianleroux/lawnchair">a hack</a>:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-4');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-4">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// create a store</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> people = <span style="color: #003366; font-weight: bold;">new</span> Lawnchair<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'people'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// -- adding to the store</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Saving a document</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> me = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color: #000066;">name</span>:<span style="color: #3366CC;">'brian'</span><span style="color:#006600; font-weight:bold;">&#125;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">people.<span style="color: #006600;">save</span><span style="color:#006600; font-weight:bold;">&#40;</span>me<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Saving a document async</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">people.<span style="color: #006600;">save</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color: #000066;">name</span>:<span style="color: #3366CC;">'frank'</span><span style="color:#006600; font-weight:bold;">&#125;</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>r<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; console.<span style="color: #006600;">log</span><span style="color:#006600; font-weight:bold;">&#40;</span>r<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Specifying your own key</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">people.<span style="color: #006600;">save</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>key:<span style="color: #3366CC;">'whatever'</span>, <span style="color: #000066;">name</span>:<span style="color: #3366CC;">'dracula'</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// -- Getting content out</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Get that document</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">people.<span style="color: #006600;">get</span><span style="color:#006600; font-weight:bold;">&#40;</span>me.<span style="color: #006600;">key</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>r<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; console.<span style="color: #006600;">log</span><span style="color:#006600; font-weight:bold;">&#40;</span>r<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Returns all documents as an array to a callback</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">people.<span style="color: #006600;">all</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>r<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; console.<span style="color: #006600;">log</span><span style="color:#006600; font-weight:bold;">&#40;</span>r<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// List all with shortcut syntax</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">people.<span style="color: #006600;">all</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'console.log(r)'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// -- Removal</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Remove a document directly</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">people.<span style="color: #006600;">get</span><span style="color:#006600; font-weight:bold;">&#40;</span>me.<span style="color: #006600;">key</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>r<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; people.<span style="color: #006600;">remove</span><span style="color:#006600; font-weight:bold;">&#40;</span>me<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Remove a document by key</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">people.<span style="color: #006600;">save</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>key:<span style="color: #3366CC;">'die'</span>, <span style="color: #000066;">name</span>:<span style="color: #3366CC;">'duder'</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">people.<span style="color: #006600;">remove</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'die'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// Destroy all documents</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">people.<span style="color: #006600;">nuke</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/moving-from-the-couch-to-the-lawnchair/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Web Storage Portability Layer: Abstract on top of HTML5 and Gears Storage</title>
		<link>http://ajaxian.com/archives/web-storage-portability-layer-abstract-on-top-of-html5-and-gears-storage</link>
		<comments>http://ajaxian.com/archives/web-storage-portability-layer-abstract-on-top-of-html5-and-gears-storage#comments</comments>
		<pubDate>Fri, 29 May 2009 13:45:54 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6857</guid>
		<description><![CDATA[Robert Kroeger has released a nice library for local database access. The Web Storage Portability Layer nicely abstracts on top of HTML5 and Gears for database access. The WSPL consists of a collection of classes that provide asynchronous transactional access to both Gears and HTML5 databases and can be found on Project Hosting on Google <a href="http://ajaxian.com/archives/web-storage-portability-layer-abstract-on-top-of-html5-and-gears-storage">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Robert Kroeger has released a nice library for local database access. The <a href="http://google-opensource.blogspot.com/2009/05/web-storage-portability-layer-common.html">Web Storage Portability Layer</a> nicely abstracts on top of HTML5 and Gears for database access.</p>
<blockquote><p>
The WSPL consists of a collection of classes that provide asynchronous transactional access to both Gears and HTML5 databases and can be found on <a href="http://code.google.com/p/webstorageportabilitylayer" target="blank">Project Hosting on Google Code</a>.</p>
<p>There are five basic classes:</p>
<p><span style="font-family:'Courier New';">google.wspl.Statement</span> - A parametrizable SQL statement class</p>
<p><span style="font-family:'Courier New';">google.wspl.Transaction</span> - Used to execute one or more Statements with ACID properties</p>
<p><span style="font-family:'Courier New';">google.wspl.ResultSet</span> - Arrays of JavaScript hash objects, where the hash key is the table column name</p>
<p><span style="font-family:'Courier New';">google.wspl.Database</span> - A connection to the backing database, also provides transaction support</p>
<p><span style="font-family:'Courier New';">google.wspl.DatabaseFactory</span> - Creates the appropriate HTML5 or Gears database implementation</p>
<p>Also included in the distribution is a simple note-taking application with a persistent database cache built using the WSPL library. This application (along with Gmail mobile for iPhone and Android-powered devices) is an example of the <i>cache pattern</i> for building offline web applications. In the cache pattern, we insert a browser-local cache into the web application to break the synchronous link between user actions in the browser and server-generated responses. Instead, as shown below, we have two data flows.  First, entirely local to the device, contents flow from the cache to the UI while changes made by the user update the cache. In the second flow, the cache asynchronously forwards user changes to the web server and receives updates in response.</p>
<p>By using this architectural pattern, a web application can made tolerant of a flaky (or even absent) network connection!
</p></blockquote>
<p>You can of course take a peak at the code to see how it works, for example:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-6');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-6">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">google.<span style="color: #006600;">wspl</span>.<span style="color: #006600;">DatabaseFactory</span>.<span style="color: #006600;">createDatabase</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>dbName, dbworkerUrl<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> dbms;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>window.<span style="color: #006600;">openDatabase</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// We have HTML5 functionality.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dbms = <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #006600;">wspl</span>.<span style="color: #006600;">html5</span>.<span style="color: #006600;">Database</span><span style="color:#006600; font-weight:bold;">&#40;</span>dbName<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Try to use Google Gears.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> gearsDb = goog.<span style="color: #006600;">gears</span>.<span style="color: #006600;">getFactory</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">create</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'beta.database'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> wp = goog.<span style="color: #006600;">gears</span>.<span style="color: #006600;">getFactory</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">create</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'beta.workerpool'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Note that Gears will not allow file based URLs when creating a worker.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dbms = <span style="color: #003366; font-weight: bold;">new</span> wireless.<span style="color: #006600;">db</span>.<span style="color: #006600;">gears</span>.<span style="color: #006600;">Database</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dbms.<span style="color: #006600;">openDatabase</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">''</span>, dbName, gearsDb<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; wp.<span style="color: #006600;">onmessage</span> = google.<span style="color: #006600;">bind</span><span style="color:#006600; font-weight:bold;">&#40;</span>dbms.<span style="color: #006600;">onMessage_</span>, dbms<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Comment this line out to use the synchronous database.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dbms.<span style="color: #006600;">startWorker</span><span style="color:#006600; font-weight:bold;">&#40;</span>wp, dbworkerUrl, <span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">return</span> dbms;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Nicely done. It would be great to see a version that acts as a shim and when in Gears mode manually implements the HTML5 standard API so you can write your user code to that and not a new google package.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/web-storage-portability-layer-abstract-on-top-of-html5-and-gears-storage/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Persevere&#8217;s JavaScriptDB: Impressive JSON Performance</title>
		<link>http://ajaxian.com/archives/perseveres-javascriptdb-impressive-json-performance</link>
		<comments>http://ajaxian.com/archives/perseveres-javascriptdb-impressive-json-performance#comments</comments>
		<pubDate>Tue, 21 Apr 2009 18:00:58 +0000</pubDate>
		<dc:creator>Ben Galbraith</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6665</guid>
		<description><![CDATA[Kris Zyp recently posted about an intriguing new chapter in the application persistence space: The latest beta of Persevere features a new native object storage engine called JavaScriptDB that provides high-end scalability and performance. Persevere now outperforms the common PHP and MySQL combination for accessing data via HTTP by about 40% and outperforms CouchDB by <a href="http://ajaxian.com/archives/perseveres-javascriptdb-impressive-json-performance">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Kris Zyp recently <a href="http://www.sitepen.com/blog/2009/04/20/javascriptdb-perseveres-new-high-performance-storage-engine/">posted about an intriguing new chapter in the application persistence space</a>:</p>
<blockquote><p>
The latest beta of Persevere features a new native object storage engine called JavaScriptDB that provides high-end scalability and performance. Persevere now outperforms the common PHP and MySQL combination for accessing data via HTTP by about 40% and outperforms CouchDB by 249%. The new storage engine is designed and optimized specifically for persisting JavaScript and JSON data with dynamic object structures. It is also built for extreme scalability, with support for up to 9,000 petabytes of JSON/JS data in addition to any binary data.
</p></blockquote>
<p><img src="http://ajaxian.com/wp-content/uploads/pgraph.png" alt="" title="Perservere\&#039;s Performance" width="470" height="273" class="alignnone size-full wp-image-6666" /></p>
<p>This comparison isn't exactly apples-to-apples as it turns out–for the web app use case, Perservere has a bunch of value-adds on top of data storage:</p>
<blockquote><p>
Persevere/JavaScriptDB goes further [than relational DBs] with the flexibility to evolve schemas and handle partial schemas. Persevere also provides integrated server side JavaScript (SSJS) with persistence, Comet-driven data change notifications, JSONQuery, standards based HTTP interface with content negotiation, JSON-RPC interface to SSJS, cross-domain handling, CSRF protection, and more. All of these things are additional features that one would have to add to the stack for other storage systems, making them even slower. Persevere includes this functionality out of the box, while still maintaining extremely fast performance.
</p></blockquote>
<p>Kris spends a bit of time in his post explaining his test setup, but then gets to the good stuff:</p>
<blockquote><p>
So how does Persevere achieve this level of performance with the JavaScriptDB storage? The dynamic object-oriented nature of the data that is stored in JavaScriptDB is much different than that of a traditional relational database, so a number of innovative approaches were employed.
</p></blockquote>
<p>He goes into quite a bit of detail explaining the implementation details behind JavaScriptDB. The summary (with lightly edited quotes) is:</p>
<ul>
<li>Direct Data-Bound Object Representation: "In a traditional application stack, a record must have separate in-memory representations for [the database] and [the application] result set which then might be mapped to an object representation. With JavaScriptDB, the single in-memory object is reused for all result sets and data caching."</li>
<li>Shared Cache of Objects with Copy-on-Write</li>
<li>Append-based Database Storage: "Many traditional database commit data to a transaction log before committing data to the table, requiring multiple writes. JavaScriptDB appends transactional data directly to the main storage file; writes can be committed with a single IO operation."</li>
<li>Adaptive On-Demand Concurrent Indexing</li>
<li>Batched writes in integrity mode</li>
<li>Pluggable Storage</li>
</ul>
<p>Check out the <a href="http://www.sitepen.com/blog/2009/04/20/javascriptdb-perseveres-new-high-performance-storage-engine/">full post</a> all the details.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/perseveres-javascriptdb-impressive-json-performance/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Browsing on the Couch</title>
		<link>http://ajaxian.com/archives/browsing-on-the-couch</link>
		<comments>http://ajaxian.com/archives/browsing-on-the-couch#comments</comments>
		<pubDate>Tue, 21 Apr 2009 11:34:29 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Library]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6627</guid>
		<description><![CDATA[Atul Varma, a fantastic colleague in Building "S" at Mozilla, has been playing with a JavaScript implementation of CouchDB called BrowserCouch: BrowserCouch is an attempt at an in-browser MapReduce implementation. It's written entirely in JavaScript and intended to work on all browsers, gracefully upgrading when support for better efficiency or feature set is detected. Not <a href="http://ajaxian.com/archives/browsing-on-the-couch">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Atul Varma, a fantastic colleague in Building "S" at Mozilla, has been playing with a <a href="http://www.toolness.com/wp/?p=580">JavaScript implementation of CouchDB</a> called <a href="http://hg.toolness.com/browser-couch/raw-file/blog-post/index.html">BrowserCouch</a>:</p>
<blockquote><p>
BrowserCouch is an attempt at an in-browser MapReduce  implementation. It's written entirely in JavaScript and intended to work on all browsers, gracefully upgrading when support for better efficiency or feature set is detected.</p>
<p>Not coincidentally, this library is intended to mimic the functionality of CouchDB on the client-side, and may even support integration with CouchDB in the future.</p>
<p><b>Why?</b></p>
<p>This prototype is intended as a response to Vladimir Vuki?evi?'s blog post entitled HTML5 Web Storage and SQL. A CouchDB-like API seems like a nice solution to persistent storage on the Web because so many of its semantics are delegated out to the JavaScript language, which makes it potentially easy to standardize. Furthermore, the MapReduce paradigm also naturally takes advantage of multiple processor cores—something that is increasingly common in today's computing devices.
</p></blockquote>
<p>There is also an <a href="http://labs.mudynamics.com/2009/04/03/interactive-couchdb/">interactive CouchDB</a> project that "is an emulator written in 100% JavaScript with tons of jQuery thrown in. It also implements the collation schemes as well as the map/reduce algorithms. While it doesn’t demonstrate replication, conflict management and a host of other capabilities in CouchDB, it does strive to illustrate concepts like schema-less JSON documents, map/reduce and how these things fit together."</p>
<p>You can check out the <a href="http://labs.mudynamics.com/wp-content/uploads/2009/04/icouch.html">emulator here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/browsing-on-the-couch/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML5 Features in latest iPhone; Application Cache and Database</title>
		<link>http://ajaxian.com/archives/html5-features-in-latest-iphone-application-cache-and-database</link>
		<comments>http://ajaxian.com/archives/html5-features-in-latest-iphone-application-cache-and-database#comments</comments>
		<pubDate>Tue, 03 Feb 2009 05:31:36 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Standards]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=5861</guid>
		<description><![CDATA[Brad Neuberg told me about two cool additions to the iPhone that now use HTML5 features: Safari JavaScript Database Programming The HTML 5 specification provides a new mechanism for client-side data storage: JavaScript database support. HTML 5 is currently in development by the Web Hypertext Application Technology Working Group (WHATWG). JavaScript database support is available <a href="http://ajaxian.com/archives/html5-features-in-latest-iphone-application-cache-and-database">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Brad Neuberg told me about two cool additions to the iPhone that now use HTML5 features:</p>
<p><a href="http://developer.apple.com/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/Introduction/chapter_1_section_1.html">Safari JavaScript Database Programming</a></p>
<blockquote><p>
The HTML 5 specification provides a new mechanism for client-side data storage: JavaScript database support. HTML 5 is currently in development by the Web Hypertext Application Technology Working Group (WHATWG).</p>
<p>JavaScript database support is available in Safari 3.1 and later, and in iPhone OS 2.0 and later.</p>
<p>You should read this documentation if you are a web developer who wants to store data locally on a user’s computer in amounts beyond what can reasonably be stored in an HTTP cookie.
</p></blockquote>
<p><a href="http://lists.macosforge.org/pipermail/webkit-dev/2008-September/004987.html">HTML5 Application Cache</a></p>
<blockquote><p>
Michael Nordman of Google asked "Is this stuff built into shipping Safari or iPhone browsers yet?"</p>
<p>David Kilzer replied "This feature shipped with iPhone OS 2.1.  When you use "Add to Home Screen" from the "+" button on Safari for iPhone, a web application with a manifest defined (per the HTML5 spec) will be saved with any cached resources.  Note that the manifest file *must* be served with the correct MIME type for this to work.</p>
<p>There is no shipping version of Safari for Mac OS X or Windows that supports this feature yet."
</p></blockquote>
<p>Fantastic to see!</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/html5-features-in-latest-iphone-application-cache-and-database/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>JStORM: A New JavaScript Object-Relational Mapper</title>
		<link>http://ajaxian.com/archives/jstorm-a-new-javascript-object-relational-mapper</link>
		<comments>http://ajaxian.com/archives/jstorm-a-new-javascript-object-relational-mapper#comments</comments>
		<pubDate>Wed, 01 Oct 2008 12:29:25 +0000</pubDate>
		<dc:creator>Ben Galbraith</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=4645</guid>
		<description><![CDATA[Uriel Katz wrote in to tell us that he's burned his GearsORM framework to the ground to create the entirely new JStORM framework, announced in his blog. JStORM currently supports Google Gears, Aptana Jaxer, and Adobe AIR, but it's still bleeding edge: no documentation yet, just code. But the feature-set is interesting: * define your <a href="http://ajaxian.com/archives/jstorm-a-new-javascript-object-relational-mapper">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Uriel Katz wrote in to tell us that he's burned his GearsORM framework to the ground to create the entirely new <a href="http://labs.urielkatz.com/wiki/JStORM">JStORM</a> framework, <a href="http://www.urielkatz.com/archive/detail/introducing-jstorm/">announced in his blog</a>. JStORM currently supports Google Gears, Aptana Jaxer, and Adobe AIR, but it's still bleeding edge: no documentation yet, just code. But the feature-set is interesting:</p>
<blockquote><p>
* define your tables as models.<br />
* full CRUD support.<br />
* events on(Before/After)Delete/Save/Update.<br />
* SQL LIMIT/OFFSET support.<br />
* order by support.<br />
* automatic creation of tables.<br />
* selecting and deleting over relations.<br />
* easy iterating with each syntax like in Ruby,support for query chaining and more.<br />
* basic introspection support.<br />
* transaction support.<br />
* self relations.<br />
* support multiple backends and multiple dialects,currently MySQL (in Jaxer only) and Sqlite (Jaxer, Gears and AIR).
</p></blockquote>
<p>Here's an example of loading "Person" entities from a database using JStORM:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-8');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-8">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> Person = <span style="color: #003366; font-weight: bold;">new</span> JStORM.<span style="color: #006600;">Model</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066;">name</span>:<span style="color: #3366CC;">"Person"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; fields: <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;firstName:<span style="color: #003366; font-weight: bold;">new</span> JStORM.<span style="color: #006600;">Field</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>type:<span style="color: #3366CC;">"String"</span>,maxLength:<span style="color:#800000;">25</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;lastName:<span style="color: #003366; font-weight: bold;">new</span> JStORM.<span style="color: #006600;">Field</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>type:<span style="color: #3366CC;">"String"</span>,maxLength:<span style="color:#800000;">25</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; connection:<span style="color: #3366CC;">"default"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">Person.<span style="color: #006600;">all</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">each</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>person<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; console.<span style="color: #006600;">log</span><span style="color:#006600; font-weight:bold;">&#40;</span>person.<span style="color: #006600;">firstName</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>Looking forward to seeing some docs, Uriel ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/jstorm-a-new-javascript-object-relational-mapper/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Taffy DB Javascript Database</title>
		<link>http://ajaxian.com/archives/taffy-db-javascript-database</link>
		<comments>http://ajaxian.com/archives/taffy-db-javascript-database#comments</comments>
		<pubDate>Tue, 11 Mar 2008 17:37:00 +0000</pubDate>
		<dc:creator>Rey Bango</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=3427</guid>
		<description><![CDATA[Working client-side with data can be challenging and projects have tried to address this in different fashions. Ian Smith, creator of Joe's Goals, has his own approach. He's created Taffy DB, a lightweight Javascript database that allows you to insert, update, delete, order, loop, and query against a client-side collection of data. The great thing <a href="http://ajaxian.com/archives/taffy-db-javascript-database">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Working client-side with data can be challenging and projects have tried to address this in <a href="http://dojotoolkit.org/node/98">different</a> <a href="http://gears.google.com/">fashions</a>. Ian Smith, creator of <a href="http://www.joesgoals.com/">Joe's Goals</a>, has his own approach. He's created <a href="http://taffydb.com/">Taffy DB</a>, a lightweight Javascript database<br />
that allows you to insert, update, delete, order, loop, and query against a client-side collection of data. The great thing about it is that it's library agnostic and can work with all of the popular frameworks.</p>
<blockquote><p>The idea came to me as I was working on Joeâ€™s Goals 2.0 and I realized that one of the hardest parts about building any Web 2.0 application is working with data. There is no good way to use JavaScript by itself to gather, search, and maintain a collection of data. There are lots of great ways to great interfaces now days, but what about the data behind them? Taffy DB is the result of the research and testing I did for Joeâ€™s Goals and is now avaliable for everyone to use.</p></blockquote>
<p>Some of the key features include:</p>
<ul>
<li>Under 10K!</li>
<li>Simple, JavaScript Centric Syntax</li>
<li>Fast</li>
<li>Easy to include in any web application</li>
<li>Compatible with major Ajax libraries: YUI, JQuery, Dojo, Prototype, EXT, etc</li>
<li>CRUD Interface (Create, Read, Update, Delete)</li>
<li>Sorting</li>
<li>Looping</li>
<li>Advanced Queries</li>
</ul>
<p>The syntax to use the libary is very straightforward:</p>
<p><strong>Updating:</strong></p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-11');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-11">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">friends.<span style="color: #006600;">update</span><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; state:<span style="color: #3366CC;">"CA"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; married:<span style="color: #3366CC;">"Yes"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">name</span>:<span style="color: #3366CC;">"Joyce"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p><strong>Inserting:</strong></p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-12');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-12">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">friends.<span style="color: #006600;">insert</span><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color: #000066;">name</span>:<span style="color: #3366CC;">"Brian"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; gender:<span style="color: #3366CC;">"M"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; married:<span style="color: #3366CC;">"No"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; age:<span style="color:#800000;">52</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; state:<span style="color: #3366CC;">"FL"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; favorite_foods:<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color: #3366CC;">"fruit"</span>,<span style="color: #3366CC;">"steak"</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>In addition, Taffy DB provides 12 different conditional statements (e.g.: "greaterthan", "equal", "like") to help build advanced queries that can further filter your results.</p>
<p>Ian has created a<a href="http://taffydb.com/index.cfm?oa=gettingstarted"> Getting Started Guide</a> which will help in getting up to speed on the full capabilities of Taffy DB.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/taffy-db-javascript-database/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>CouchDB: Using E4X to get the XML back</title>
		<link>http://ajaxian.com/archives/couchdb-using-e4x-to-get-the-xml-back</link>
		<comments>http://ajaxian.com/archives/couchdb-using-e4x-to-get-the-xml-back#comments</comments>
		<pubDate>Wed, 05 Mar 2008 11:18:36 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=3403</guid>
		<description><![CDATA[Christopher Lenz has been spending time on the CouchDB project. He got lulled over when CouchDB went to JSON. He talks about how "CouchDB is pretty well positioned for storing and querying XML data in addition to JSON" via the E4X support that it gets out of the box as it uses SpiderMonkey. PLAIN TEXT <a href="http://ajaxian.com/archives/couchdb-using-e4x-to-get-the-xml-back">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Christopher Lenz has been spending time on the CouchDB project. He got lulled over when <a href="http://jan.prima.de/~jan/plok/archives/89-CouchDb-updates.html">CouchDB went to JSON</a>.</p>
<p>He talks about how <a href="http://www.cmlenz.net/archives/2008/03/couchdb-xml-and-e4x">"CouchDB is pretty well positioned for storing and querying XML data in addition to JSON"</a> via the E4X support that it gets out of the box as it uses SpiderMonkey.</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-14');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-14">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">by_lang: <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>doc<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> html = <span style="color: #003366; font-weight: bold;">new</span> XML<span style="color:#006600; font-weight:bold;">&#40;</span>doc.<span style="color: #006600;">content</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; map<span style="color:#006600; font-weight:bold;">&#40;</span>html.@lang, <span style="color:#006600; font-weight:bold;">&#123;</span>title: html.<span style="color: #006600;">head</span>.<span style="color: #006600;">title</span>.<span style="color: #006600;">text</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>, â€¦<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<blockquote><p>
To be fair, this is already possible if you use other view servers (such as the Ruby or Python ones), where you also have access to the XML support provided by the respective standard libraries. Given CouchDBâ€™s incremental view update model, you usually donâ€™t care so much about the performance of view functions as you care about the data it produces. So if your view function can somehow parse the XML and put some data into the view index, that's usually all you need. Actually querying the view is going to be really fast.</p>
<p>But E4X is an exceptionally convenient API for XML. I think using E4X is going to be a pretty good approach for those who want to to CouchDB to store and query XML content.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/couchdb-using-e4x-to-get-the-xml-back/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache CouchDB: Congrats to IBM and Damian Katz</title>
		<link>http://ajaxian.com/archives/apache-couchdb-congrats-to-ibm-and-damian-katz</link>
		<comments>http://ajaxian.com/archives/apache-couchdb-congrats-to-ibm-and-damian-katz#comments</comments>
		<pubDate>Thu, 03 Jan 2008 12:27:50 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=3168</guid>
		<description><![CDATA[CouchDB has been getting people re-energized about DB stuff recently. Some got gung-ho about the OODBMS and that fizzled and people went back to the "ug, I guess we just do the SQL thing and be done with it... and maybe use an ORM if we really hate it". Then the Couch came along and <a href="http://ajaxian.com/archives/apache-couchdb-congrats-to-ibm-and-damian-katz">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://damienkatz.net/pics/logo.png" border="0" /></p>
<p><a href="http://couchdb.org/">CouchDB</a> has been getting people re-energized about DB stuff recently. Some got gung-ho about the OODBMS and that fizzled and people went back to the "ug, I guess we just do the SQL thing and be done with it... and maybe use an ORM if we really hate it".</p>
<p>Then the Couch came along and had us all thinking about JSON being the next "turtles all the way down".</p>
<p>Well, IBM was excited enough to <a href="http://damienkatz.net/2008/01/new_gig.html">hire Damien Katz to work full time on it</a>:</p>
<blockquote><p>
All the code will be Apache licensed and donated to the Apache Software Foundation, with the plan CouchDB will eventually become an official Apache project. A big plus here is the Apache license allows anyone to do pretty much anything with the code, so everything remains truly open source. I wouldn't have done this without IBM's commitment to keeping CouchDB open.
</p></blockquote>
<p>It is going to be to see what us JavaScript folk do with a DB that is RESTful and JSONified.</p>
<p>Congratulations to IBM for a great score (and to Damien too).</p>
<p><b>NOTE: Kris Zyp joining SitePen</b></p>
<p>Also, congrats to Kris Zyp and SitePen for <a href="http://www.json.com/2008/01/02/joining-sitepen/">tying the knot</a>. Both Kris and SitePen are top notch outfits, and a great fit.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/apache-couchdb-congrats-to-ibm-and-damian-katz/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WebKit Does HTML5 Client-side Database Storage</title>
		<link>http://ajaxian.com/archives/webkit-does-html5-client-side-database-storage</link>
		<comments>http://ajaxian.com/archives/webkit-does-html5-client-side-database-storage#comments</comments>
		<pubDate>Mon, 22 Oct 2007 13:03:27 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=2919</guid>
		<description><![CDATA[The WebKit team has implemented an implementation of the HTML 5 client side storage API which gives you an asynchronous API: PLAIN TEXT JAVASCRIPT: &#160; var database = openDatabase&#40;"Database Name", "Database Version"&#41;; &#160; database.executeSql&#40;"SELECT * FROM test", function&#40;result1&#41; &#123; &#160; &#160;// do something with the results &#160; &#160;database.executeSql&#40;"DROP TABLE test", function&#40;result2&#41; &#123; &#160; &#160; &#160;// <a href="http://ajaxian.com/archives/webkit-does-html5-client-side-database-storage">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>The WebKit team has implemented <a href="http://webkit.org/blog/126/webkit-does-html5-client-side-database-storage">an implementation of the HTML 5 client side storage API</a> which gives you an asynchronous API:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-16');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-16">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> database = openDatabase<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"Database Name"</span>, <span style="color: #3366CC;">"Database Version"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">database.<span style="color: #006600;">executeSql</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"SELECT * FROM test"</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>result1<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #009900; font-style: italic;">// do something with the results</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;database.<span style="color: #006600;">executeSql</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"DROP TABLE test"</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>result2<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #009900; font-style: italic;">// do some more stuff</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #000066;">alert</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"My second database query finished executing!"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Once you have the latest nightly, you can check out their <a href="http://webkit.org/misc/DatabaseExample.html">database example</a> and even see the tool that is available in the Web inspector:</p>
<p><a href="http://webkit.org/blog/126/webkit-does-html5-client-side-database-storage"><img src="http://webkit.org/blog/wp-content/uploads/2007/10/picture-5.png" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/webkit-does-html5-client-side-database-storage/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Adobe AIR: Can we have synchronous queries, please?</title>
		<link>http://ajaxian.com/archives/adobe-air-can-we-have-synchronous-queries-please</link>
		<comments>http://ajaxian.com/archives/adobe-air-can-we-have-synchronous-queries-please#comments</comments>
		<pubDate>Fri, 24 Aug 2007 11:00:34 +0000</pubDate>
		<dc:creator>Rey Bango</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=2698</guid>
		<description><![CDATA[Justin Palmer has an interesting post about the dealing with the asynchronous nature of Adobe AIRâ€™s SQLConnection class and the challenges it poses when dealing with the DBMS' response. Justin shows some creative ways of working around this through the use of Responder objects and event listeners: var connection = new air.SQLConnection(); connection.open(air.File.applicationResourceDirectory.resolve('development.sqlite')); var statement <a href="http://ajaxian.com/archives/adobe-air-can-we-have-synchronous-queries-please">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://alternateidea.com/">Justin Palmer</a> has an <a href="http://alternateidea.com/blog/articles/2007/8/7/asynchronous-sqlite-adobe-air">interesting post about the dealing with the asynchronous nature</a> of <a href="http://labs.adobe.com/technologies/air/">Adobe AIRâ€™s</a> SQLConnection class and the challenges it poses when dealing with the DBMS' response. Justin shows some creative ways of working around this through the use of Responder objects and event listeners:</p>
<blockquote><p><code>var connection = new air.SQLConnection();<br />
connection.open(air.File.applicationResourceDirectory.resolve('development.sqlite'));</p>
<p>var statement = new air.SQLStatement();<br />
statement.sqlConnection = connection;<br />
statement.text = "SELECT * FROM contacts";<br />
statement.execute();</code></p>
<p>The code above, albeit a little long winded, is the bare necessities for executing a query. While it looks fairly straightforward on the surface, weâ€™ve already run into our first problem. If the execute operation is asynchronous, how do we know when we can begin to retrieve and manipulate the data returned? We can do it one of two ways, register an event listener or pass a Responder object to the execute method.
</p></blockquote>
<p>From the looks of <a href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=641&#038;threadid=1276219#4614276">this thread</a> it appears this is on the minds of several other folks and Adobe's working on developing a method for synchronous SQL calls is in the works. </p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/adobe-air-can-we-have-synchronous-queries-please/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>OpenToro 4.0: Ajax Web Database Publisher</title>
		<link>http://ajaxian.com/archives/opentoro-40-ajax-web-database-publisher</link>
		<comments>http://ajaxian.com/archives/opentoro-40-ajax-web-database-publisher#comments</comments>
		<pubDate>Wed, 07 Feb 2007 11:29:27 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=2092</guid>
		<description><![CDATA[OpenToro 4.0, an open source Ajax Web Database Publishing tool, has been released. OpenToro is a CMS written in Java that allows the development of database driven web Applications in a quick and agile way. If you need to build simple CRUD applications that are faces onto your database, this could be a tool for <a href="http://ajaxian.com/archives/opentoro-40-ajax-web-database-publisher">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://opentoro.sourceforge.net/">OpenToro 4.0</a>, an open source Ajax Web Database Publishing tool, has been released.</p>
<p>OpenToro is a CMS written in Java that allows the development of database driven web Applications in a quick and agile way.</p>
<p>If you need to build simple CRUD applications that are faces onto your database, this could be a tool for you.</p>
<p>Download the <a href="http://downloads.sourceforge.net/opentoro/OpenTorov4.0.VideoTutorial.English.zip?modtime=1169675167&#038;big_mirror=0"> set of demo screencasts</a> to learn more.</p>
<p><a href="http://opentoro.sourceforge.net/"><img src="http://ajaxian.com/wp-content/images/opentoro.jpg" alt="Open Toro" border="0" width="580" height="373"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/opentoro-40-ajax-web-database-publisher/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PHP-Based MySQL-to-JSON Converter</title>
		<link>http://ajaxian.com/archives/php-based-mysql-to-json-converter</link>
		<comments>http://ajaxian.com/archives/php-based-mysql-to-json-converter#comments</comments>
		<pubDate>Fri, 07 Jul 2006 13:23:18 +0000</pubDate>
		<dc:creator>Michael Mahemoff</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Remoting]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=1332</guid>
		<description><![CDATA[A new PHP component by Adnan Siddiqi accepts a MySQL result set and converts it into a JSON message. MySQL To JSON: This class can be used to convert data from MySQL query results into a JavaScript expression in JavaScript Object Notation. It takes a MySQL query result handle and retrieves the query result column <a href="http://ajaxian.com/archives/php-based-mysql-to-json-converter">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>A new PHP component by Adnan Siddiqi accepts a MySQL result set and converts it into a JSON message. <a href="http://www.phpclasses.org/browse/package/3195.html">MySQL To JSON</a>:</p>
<blockquote><p>
This class can be used to convert data from MySQL query results into a JavaScript expression in JavaScript Object Notation.</p>
<p>It takes a MySQL query result handle and retrieves the query result column names and the query result data.</p>
<p>The class generates the definition of a JavaScript object in JSON that contains an array of a rows of query result data.</p>
<p>Each array element represents an object with the properties set to the query result column names. The property values are the query results for the respective row and column.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/php-based-mysql-to-json-converter/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Under the Radar: Session 2 &#8211; Make It Easy 2.0</title>
		<link>http://ajaxian.com/archives/under-the-radar-session-2-make-it-easy-20</link>
		<comments>http://ajaxian.com/archives/under-the-radar-session-2-make-it-easy-20#comments</comments>
		<pubDate>Thu, 02 Mar 2006 19:57:55 +0000</pubDate>
		<dc:creator>Ben Galbraith</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Editorial]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Office]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=938</guid>
		<description><![CDATA[After four "When" companies got a chance to impress us with their Web 2.0 goodness, four "Make It Easy" concerns are now up to the plate: Dabble DB, Rallypoint, The Form Assembly, and Zoho. Each company has eight minutes to present their wares. A panel (Michael Arrington, Rael Dornfest, and Krishna Akella in this session) <a href="http://ajaxian.com/archives/under-the-radar-session-2-make-it-easy-20">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>After four "When" companies got a chance to impress us with their Web 2.0 goodness, four "Make It Easy" concerns are now up to the plate: Dabble DB, Rallypoint, The Form Assembly, and Zoho.</p>
<p>Each company has eight minutes to present their wares. A panel (Michael Arrington, Rael Dornfest, and Krishna Akella in this session) and the audience give feedback for eight minutes.</p>
<h3>Dabble DB</h3>
<p>The co-founders are up talking to us about their Dabble DB service. It's a hosted database for the rest of us. Business users know that spreadsheets aren't the best way to store data, but they feel that databases are "scary."</p>
<p>They showed a demo of taking a spreadsheet of information from an O'Reilly OSCON from a few years ago. The UI of Dabble DB lets you either import data to create a spreadsheet, or manually enter the data. They cut-and-pasted and CSV export from Excel, and they're demoing a really neat ajaxian interface for the data -- spreadsheet on the web.</p>
<p>They're also showing ad-hoc queries against the spreadsheet interface, using a simple filter type interface both across all text or specific fields, and you can save the results of queries for later viewing.</p>
<p>They also have a calendar view of database data, where they parse out date-like values and plot them on a calendar -- and you can apply the same searches against the calendar view, too. It's a really fast, compelling interface -- better than some of the When calendaring apps we saw in the last session.</p>
<p>They are also demoing schema changes. For example, they make it super easy to take a text field and change that to a lookup table relationship -- something that traditional databases make painful, and they also make it easy to migrate other fields to the new lookup table.</p>
<p>They also export data to RSS, PDF, CSV, iCal, HTML, OPML, and text.</p>
<p>The audience was very complementary, and both Michael and Rael on the panel seemed impressed. A great product.</p>
<h3>Rallypoint</h3>
<p>The Rallypoint dude is talking about how hard it is to do effective collaboration in a team environment: you start passing documents around, you lose track of ersions, and before you know it, things are a big soupy mess.</p>
<p>Goal for Rallypoint: combine the features of a word processor with the collaboration features of a Wiki, tied together with an ajaxian user interface.</p>
<p>The demo of adding a new page shows off their word processor interface. It's pretty much the kind of rich text editing we've come to expect from ajax apps without any dramatic differences.</p>
<p>The security features allow you to protect a page, allowing only certain users and groups to view/edit/subscribe to the page.</p>
<p>The versioning features weren't shown, and there's no way to export data at present, though they all working on an export feature.</p>
<p>The general consensus from the panel was: "This is a crowded space, good luck."</p>
<h3>The Form Assembly</h3>
<p>The creator of The Form Assembly is up, talking about web forms, saying that many websites need web forms for various reasons (registrations, etc.) and up until now there hasn't been an easy way to get them (riiiiiight).</p>
<p>The product lets you build forms and show reports based on the form data. The UI was pretty nice. I didn't see anything revolutionary.</p>
<p>The product is free up until you get more than five responses to your form. After that you either pay as you go (12 cents per response) or you buy a $25/month subscription.</p>
<p>Michael Arrington: "Can I massage the data that users enter?"<br />
Answer: There's a junk filter for removing spam.</p>
<p>The panel thought the pricing was just way off but otherwise seemed to appreciate the product, though not enthusiastically.</p>
<h3>Zoho</h3>
<p>Wow, Zoho is a suite of business applications on the web: Writer, Virtual Office, CRM, and, err, more. They're showing us Zoho Creator, which is for "creating web applications with no lines of code."</p>
<p>(By the way, thanks to a crash, we're able to see it was written using Java Struts. Neat.)</p>
<p>You can create applications either by basing it off a template, or creating a new one from scratch. So far, the application is composed of creating a web form.</p>
<p>The form creation is less visually impressive than the other form builders we just saw. In fact, once you actually start using the form you've created, the quality of the UI is quite primitive compared to the other Web 2.0 apps we've seen. There are some ajax features, but they look tacked on in a really cheesy fashion.</p>
<p>So, they're done showing features, so it looks like "applications" are just web forms and tables showing the data entered in the web form. Neat. The table viewer of the entered data isn't as impressive as Dabble DB but does have a few ajax features, like the ability to dynamically change the set of columns displayed, etc.</p>
<p>They showed us their on-ine spreadsheet for just a few seconds, and it looked really cool. I was tempted to think they were showing us an embedded Excel instance as the demo was in IE Windows, but I think it was a pure Ajax implementation. Geez, they also have an Outlook clone, too. So, some of the products look pretty cool but they didn't go very deep.</p>
<p>Their vision is to be a complete, fully functional MS Office clone on-line. They let you import Excel and Word and other formats into their products.</p>
<p>Michael Arrington: "You guys have a reputation of copying others and being overly aggressive in PR. You need to change that."<br />
Answer: Some sort of muffled argument refuting the accusation.</p>
<h3>Conclusion</h3>
<p>There are a lot of really cool emerging database/form applications that make web-based form applications really easy to create. Dabble DB rivaled <em>desktop</em> database front-ends in terms of making it really easy to deal with data. Very cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/under-the-radar-session-2-make-it-easy-20/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>AjaxMyTop: MySQL Monitor</title>
		<link>http://ajaxian.com/archives/779</link>
		<comments>http://ajaxian.com/archives/779#comments</comments>
		<pubDate>Wed, 25 Jan 2006 17:06:21 +0000</pubDate>
		<dc:creator>Michael Mahemoff</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=779</guid>
		<description><![CDATA[We've seen in-browser SQL, a database administrator, and even a database designer. Now there's a database monitor... AjaxMyTop shows active MySQL connections. You get a data grid showing connections, each showing ID, user, duration, and so on. Periodic Refresh ensures the connections are kept fresh, and you can easily set the refresh period in an <a href="http://ajaxian.com/archives/779">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>We've seen <a href="http://ajaxian.com/archives/javascript-database-in-browser">in-browser SQL</a>, a <a href="http://ajaxian.com/archives/turbodbadmin-first-release-version-01">database administrator</a>, and even a <a href="http://ajaxian.com/archives/www-sql-designer">database designer</a>. Now there's a database monitor...</p>
<p><a href="http://sourceforge.net/projects/ajaxmytop/">AjaxMyTop</a> shows active MySQL connections. You get a data grid showing connections, each showing ID, user, duration, and so on. <a href="http://ajaxpatterns.org/Periodic_Refresh">Periodic Refresh</a> ensures the connections are kept fresh, and you can easily set the refresh period in an input field. Being a true data grid, the connection list can be sorted and filtered on one or more fields. In a nice touch, the column heading morphs to include a text input when you want to type in a filter for that column. It's nice to see keyboard shortcuts here, certainly a feature every DBA will welcome.</p>
<p>Right now it looks to be read-only ... hopefully the team will add a "destroy connection" button real soon now!</p>
<p><a href="http://sourceforge.net/project/screenshots.php?group_id=156708"><img src="http://ajaxian.com/wp-content/images/ajaxmytop.jpg" alt="" border="0" width="469" height="480"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/779/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

