<?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: potential postgres schema for lds-scriptures 3.0</title>
	<atom:link href="http://wonkabar.org/archives/273/feed" rel="self" type="application/rss+xml" />
	<link>http://wonkabar.org/archives/273</link>
	<description>linux, databases, cartoons and cornflakes</description>
	<pubDate>Thu, 08 Jan 2009 12:20:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Harley J Pig</title>
		<link>http://wonkabar.org/archives/273#comment-10928</link>
		<dc:creator>Harley J Pig</dc:creator>
		<pubDate>Fri, 27 Apr 2007 03:59:57 +0000</pubDate>
		<guid isPermaLink="false">http://wonkabar.org/archives/273#comment-10928</guid>
		<description>Looks good.

For the indexes, you might want to add indexes for the lds_org columns in each of the tables as well.

chapters looks like a lookup table ... if so, I'd say just have one index on both columns, and you don't have a fk restraint on the chapter column.

In verses, I would have one index on the chapter and verse columns.  You're not likely to ever want these separately, I don't think.

Finally, I'd suggest not trying to be so complex with your view.  Only sellect the volume_id, book_id, chapter_id and verse_id.  Otherwise, as a programmer I'd be throwing away a lot of data most of the time, since I would most likely want to build the information based on user criteria.

Oh, yeah; the ORDER BY in your view only works because you've forced the data to fit (verse #1 is Gen 1:1, #2 is Gen 1:2, etc.) ... it would be better to do ORDER BY b.volume_id, c.book, c.id, v.id

Keep it up ... you'll have me studying the scriptures again in no time! :&#62;</description>
		<content:encoded><![CDATA[<p>Looks good.</p>
<p>For the indexes, you might want to add indexes for the lds_org columns in each of the tables as well.</p>
<p>chapters looks like a lookup table &#8230; if so, I&#8217;d say just have one index on both columns, and you don&#8217;t have a fk restraint on the chapter column.</p>
<p>In verses, I would have one index on the chapter and verse columns.  You&#8217;re not likely to ever want these separately, I don&#8217;t think.</p>
<p>Finally, I&#8217;d suggest not trying to be so complex with your view.  Only sellect the volume_id, book_id, chapter_id and verse_id.  Otherwise, as a programmer I&#8217;d be throwing away a lot of data most of the time, since I would most likely want to build the information based on user criteria.</p>
<p>Oh, yeah; the ORDER BY in your view only works because you&#8217;ve forced the data to fit (verse #1 is Gen 1:1, #2 is Gen 1:2, etc.) &#8230; it would be better to do ORDER BY b.volume_id, c.book, c.id, v.id</p>
<p>Keep it up &#8230; you&#8217;ll have me studying the scriptures again in no time! :&gt;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
