<?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>In Nomine - The Lotus Land &#187; Databases</title>
	<atom:link href="http://www.in-nomine.org/category/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.in-nomine.org</link>
	<description>The focused mind can pierce through stone...</description>
	<lastBuildDate>Sat, 14 May 2011 20:22:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>CLDR 1.8 data submission closing</title>
		<link>http://www.in-nomine.org/2009/12/03/cldr-1-8-data-submission-closing/</link>
		<comments>http://www.in-nomine.org/2009/12/03/cldr-1-8-data-submission-closing/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 15:26:30 +0000</pubDate>
		<dc:creator>asmodai</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[cldr]]></category>
		<category><![CDATA[dutch]]></category>
		<category><![CDATA[unicode]]></category>

		<guid isPermaLink="false">http://www.in-nomine.org/?p=504</guid>
		<description><![CDATA[The data submission phase for CLDR 1.8 should be closed by now (although the survey tool still says it&#8217;s accepting submissions). For Dutch (nl_NL), I&#8217;ve been going over quite some items together with the Apple contributor and someone else, so &#8230; <a href="http://www.in-nomine.org/2009/12/03/cldr-1-8-data-submission-closing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The data submission phase for <a title="Unicode Common Locale Data Repository" href="http://cldr.unicode.org/">CLDR</a> 1.8 should be closed by now (although the survey tool still says it&#8217;s accepting submissions). For Dutch (<code>nl_NL</code>), I&#8217;ve been going over quite some items together with the Apple contributor and someone else, so expect quite some improvements on that area. The current release date is aimed at somewhere in March 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.in-nomine.org/2009/12/03/cldr-1-8-data-submission-closing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL to PostgreSQL</title>
		<link>http://www.in-nomine.org/2008/01/06/mysql-to-postgresql/</link>
		<comments>http://www.in-nomine.org/2008/01/06/mysql-to-postgresql/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 21:41:44 +0000</pubDate>
		<dc:creator>asmodai</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.in-nomine.org/2008/01/06/mysql-to-postgresql/</guid>
		<description><![CDATA[David Fetter informed me that he has some changes to a document I wrote back in 2005 about migration tips going from MySQL to PostgreSQL. As such I started to revamping the document, moving from DocBook 4.3 to 4.5 in &#8230; <a href="http://www.in-nomine.org/2008/01/06/mysql-to-postgresql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="David Fetter's homepage" href="http://fetter.org/">David Fetter</a> informed me that he has some changes to a document I wrote back in 2005 about migration tips going from MySQL to PostgreSQL. As such I started to revamping the document, moving from DocBook 4.3 to 4.5 in the process. The result will be located at <a title="Migrating from MySQL to PostgreSQL" href="http://www.in-nomine.org/~asmodai/mysql-to-pgsql.html">http://www.in-nomine.org/~asmodai/mysql-to-pgsql.html</a>. I hope to have his comments merged in in the remainder of the week. Feel free to send me updates after it got properly updated with David&#8217;s notes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.in-nomine.org/2008/01/06/mysql-to-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLAlchemy and simple WHERE clauses using AND</title>
		<link>http://www.in-nomine.org/2007/11/23/sqlalchemy-and-simple-where-clauses-using-and/</link>
		<comments>http://www.in-nomine.org/2007/11/23/sqlalchemy-and-simple-where-clauses-using-and/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 10:17:06 +0000</pubDate>
		<dc:creator>asmodai</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sqlalchemy]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://www.in-nomine.org/2007/11/23/sqlalchemy-and-simple-where-clauses-using-and/</guid>
		<description><![CDATA[These posts use code from the Trac project. I&#8217;m using the question mark notation for in-place variable substitution, this is where you normally use either direct variables or an indirection mechanism. If you have done SQL before you are familiar &#8230; <a href="http://www.in-nomine.org/2007/11/23/sqlalchemy-and-simple-where-clauses-using-and/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>These posts use code from the <a href="http://trac.edgewall.org/">Trac</a> project. I&#8217;m using the question mark notation for in-place variable substitution, this is where you normally use either direct variables or an indirection mechanism.</p>
<p>If you have done SQL before you are familiar with the syntax such as:</p>
<pre lang="sql">SELECT name FROM auth_cookie WHERE cookie = ? AND ipnr = ?;</pre>
<p>So, how does one do this with <a href="http://www.sqlalchemy.org/">SQLAlchemy</a>?</p>
<p>With SQLAlchemy (SA in short) you first declare a schema within Python:</p>
<pre lang="python">auth_cookie = Table('auth_cookie', metadata,
        Column('cookie', String, primary_key=True),
        Column('name', String, primary_key=True),
        Column('ipnr', String, primary_key=True),
        Column('time', Integer))</pre>
<p>Next you import this schema (living within Trac as trac/db/schema.py) as follows:</p>
<pre lang="python">from trac.db.schema import auth_cookie</pre>
<p>This allows direct manipulation using direct calls to auth_cookie. So for a SQL select we need to extend our code as follows:</p>
<pre lang="python">from sqlalchemy import select</pre>
<p>This allows us to build an almost equivalent statement as follows:</p>
<pre lang="python">statement = select([auth_cookie.c.name], auth_cookie.c.cookie==?)</pre>
<p>To add the AND clause SA has a very simple function to add into your code:</p>
<pre lang="python">from sqlalchemy import and_, select</pre>
<p>This allows us to extend the previous statement as such:</p>
<pre lang="python">statement = select([auth_cookie.c.name], and_(auth_cookie.c.cookie==?, auth_cookie.c.ipnr==?)</pre>
<p>Similarly there&#8217;s an <code>or_()</code> function as well, which works exactly the same.</p>
<p>Now the difficulty arose due to the fact this SQL query changed its WHERE-clause depending on an <code>if/else</code>. The regular case was the first statement we created, the other case added the cookie&#8217;s IP number into the equation. So how to deal with that?</p>
<pre lang="python">statement = select([auth_cookie.c.name], auth_cookie.c.cookie==?)
if self.check_ip:
    statement.append_whereclause(and_(auth_cookie.c.ipnr==?))</pre>
<p>As you can see, depending on whether or not check_ip is set it changes the statement in-place and expands the WHERE-clause with an AND for ipnr.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.in-nomine.org/2007/11/23/sqlalchemy-and-simple-where-clauses-using-and/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD, SQLite, FTS2 and SQLAlchemy</title>
		<link>http://www.in-nomine.org/2007/08/21/freebsd-sqlite-fts2-and-sqlalchemy/</link>
		<comments>http://www.in-nomine.org/2007/08/21/freebsd-sqlite-fts2-and-sqlalchemy/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 08:54:01 +0000</pubDate>
		<dc:creator>asmodai</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[sqlalchemy]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.in-nomine.org/2007/08/21/freebsd-sqlite-fts2-and-sqlalchemy/</guid>
		<description><![CDATA[I was trying to use the SQLite 3.4.1 installed port with Python and SQLAlchemy and the moment I wanted to create a table within the database Python crashed. After a bunch of debugging it turns out that enabling the FTS2 &#8230; <a href="http://www.in-nomine.org/2007/08/21/freebsd-sqlite-fts2-and-sqlalchemy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was trying to use the SQLite 3.4.1 installed port with Python and SQLAlchemy and the moment I wanted to create a table within the database Python crashed.</p>
<p>After a bunch of debugging it turns out that enabling the FTS2 option of the port causes these crashes. The sqlite3Fts2InitHashTable() call is where it fails. I notified the port maintainer and in the mean time rebuilt without FTS2.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.in-nomine.org/2007/08/21/freebsd-sqlite-fts2-and-sqlalchemy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bugzilla additional database support</title>
		<link>http://www.in-nomine.org/2005/04/20/bugzilla-additional-database-support/</link>
		<comments>http://www.in-nomine.org/2005/04/20/bugzilla-additional-database-support/#comments</comments>
		<pubDate>Wed, 20 Apr 2005 08:16:10 +0000</pubDate>
		<dc:creator>asmodai</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[tendra]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I've been using <a href="http://www.bugzilla.org">Bugzilla</a> for a while now for the <a href="http://www.tendra.org/">TenDRA Project</a>.  I am quite happy with it.  Right now I use it on a <a href="http://www.mysql.com">MySQL</a> database, but everybody that really knows me knows I prefer <a href="http://www.postgresql.org">PostgreSQL</a> over MySQL because of the real database features it has.
To counter any knee-jerk reactions, no, MySQL is not bad, I am just used to features real databases provide (views, stored procedures, etc) and once you are used to that, MySQL feels, ..., inadequate.
 <a href="http://www.in-nomine.org/2005/04/20/bugzilla-additional-database-support/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://www.bugzilla.org">Bugzilla</a> for a while now for the <a href="http://www.tendra.org/">TenDRA Project</a>.  I am quite happy with it.  Right now I use it on a <a href="http://www.mysql.com">MySQL</a> database, but everybody that really knows me knows I prefer <a href="http://www.postgresql.org">PostgreSQL</a> over MySQL because of the real database features it has.<br />
To counter any knee-jerk reactions, no, MySQL is not bad, I am just used to features real databases provide (views, stored procedures, etc) and once you are used to that, MySQL feels, &#8230;, inadequate.</p>
<p>Bugzilla has, in the last year, been working hard on making the program database independent.</p>
<p>See the following URLs for developer details on progress:</p>
<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=98304">Bugzilla PostgreSQL meta bug</a><br />
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=189947">Bugzilla Oracle meta bug</a><br />
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=173130">Bugzilla Sybase meta bug</a><br />
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=249254">Bugzilla Firebird meta bug</a></p>
<p>This is what I also emailed (the URLs that is) to the authors of IEEE&#8217;s Software magazine column about Open Source.  They wrote that Bugzilla is not database independent, and while that is undisputable (aside from the &#8216;hackish&#8217; port to PostgreSQL on the side, which I also worked on) there is significant work being done behind the scenes on making it database independent.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.in-nomine.org/2005/04/20/bugzilla-additional-database-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

