<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: lds-scriptures postgresql update snapshot</title>
	<atom:link href="http://wonkabar.org/archives/208/feed" rel="self" type="application/rss+xml" />
	<link>http://wonkabar.org/archives/208</link>
	<description>linux, databases, cartoons and cornflakes</description>
	<pubDate>Tue, 06 Jan 2009 07:28:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Harley Pig</title>
		<link>http://wonkabar.org/archives/208#comment-1404</link>
		<dc:creator>Harley Pig</dc:creator>
		<pubDate>Fri, 17 Nov 2006 21:07:54 +0000</pubDate>
		<guid isPermaLink="false">http://wonkabar.org/archives/208#comment-1404</guid>
		<description>Speaking as a programmer, those table names are hideous.  I'd go nuts writing a program that accessed those tables and even some of the fields:

lds_scriptures_verses.verse_scripture

would be a pain in any language.  Even if I wrote a wrapper for it (which I would) I would still have to keep in mind what I had aliased to what.

Might I suggest the following?

lds_scriptures_volumes =&#62; volumes
lds_scriptures_books =&#62; books
lds_scriptures_verses =&#62; verses

lds_scriptures_verses.verse_scripture =&#62; verses.vtext

(I'd rather just do text, but that's a reserved word.)

Also, the following view in its various forms (long title lookup, short title lookup, lds_org lookup, etc.):

CREATE VIEW verse_lookup AS
SELECT vol.title, book.title, v.chapter, v.verse, v.verse_scripture
  FROM lds_scriptures_volumes vol, lds_scriptures_books book, lds_scriptures_verses v
 WHERE v.book = book.id
   AND book.volume = vol.id</description>
		<content:encoded><![CDATA[<p>Speaking as a programmer, those table names are hideous.  I&#8217;d go nuts writing a program that accessed those tables and even some of the fields:</p>
<p>lds_scriptures_verses.verse_scripture</p>
<p>would be a pain in any language.  Even if I wrote a wrapper for it (which I would) I would still have to keep in mind what I had aliased to what.</p>
<p>Might I suggest the following?</p>
<p>lds_scriptures_volumes =&gt; volumes<br />
lds_scriptures_books =&gt; books<br />
lds_scriptures_verses =&gt; verses</p>
<p>lds_scriptures_verses.verse_scripture =&gt; verses.vtext</p>
<p>(I&#8217;d rather just do text, but that&#8217;s a reserved word.)</p>
<p>Also, the following view in its various forms (long title lookup, short title lookup, lds_org lookup, etc.):</p>
<p>CREATE VIEW verse_lookup AS<br />
SELECT vol.title, book.title, v.chapter, v.verse, v.verse_scripture<br />
  FROM lds_scriptures_volumes vol, lds_scriptures_books book, lds_scriptures_verses v<br />
 WHERE v.book = book.id<br />
   AND book.volume = vol.id</p>
]]></content:encoded>
	</item>
</channel>
</rss>
