<?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>this Ministry &#187; SQL</title>
	<atom:link href="http://thisministry.net/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://thisministry.net</link>
	<description>ministry (and life) from a digital perspective</description>
	<lastBuildDate>Thu, 02 Sep 2010 16:19:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Playing with PL/pgSQL</title>
		<link>http://thisministry.net/2009/06/05/playing-with-plpgsql/</link>
		<comments>http://thisministry.net/2009/06/05/playing-with-plpgsql/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 15:47:35 +0000</pubDate>
		<dc:creator>emilio</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://thisministry.net/2009/06/05/playing-with-plpgsql/</guid>
		<description><![CDATA[Typically, end-users and webmasters will not deal with this kind of development. PL/pgSQL is the internal procedural language for creating things like functions. The most you will see a webmaster deal with is SQL for adding/editing an entry. However, my &#8230; <a href="http://thisministry.net/2009/06/05/playing-with-plpgsql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Typically, end-users and webmasters will not deal with this kind of development.  PL/pgSQL is the internal procedural language for creating things like functions.  The most you will see a webmaster deal with is SQL for adding/editing an entry.</p>
<p>However, my day job requires me to learn several new skills and this week its PL/pgSQL.  Our members receive statements twice a year based upon their inventory for a given season.  Each season updates once a year.  So, whatever you have for the Spring season for this year, will be updated the next, along with anything you added during said year.  Got it?  Good.</p>
<p>In order to automate this inventory listing, I am working on a dynamic SQL <em>SELECT </em>statement to account for time of year (really, the month) and current season.   So, why is this difficult?  Well, because I don&#8217;t know PL/pgSQL that well yet.  I would have usually done this in PHP and simply edited the SQL statement variable with a new date.  However, we have a large number of members and each of them can have one to hundreds of listings in their inventory.  That means tens of thousands of possible items for a given season.  In order to speed up the listing for any given member, we wrote functions to create a temporary table for that member&#8217;s listing.  The end result is faster page loading on the member portal.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://thisministry.net/2009/02/19/to-tell-or-not-to-tell/" rel="bookmark" class="crp_title">To tell or not to tell</a></li><li><a href="http://thisministry.net/2010/06/24/how-to-select-the-firstleastmax-row-per-group-in-sql/" rel="bookmark" class="crp_title">How to select the first/least/max row per group in SQL</a></li><li><a href="http://thisministry.net/2006/11/09/spurs-baby/" rel="bookmark" class="crp_title">Spurs, baby!</a></li><li><a href="http://thisministry.net/2009/06/03/facebook-groups-for-church/" rel="bookmark" class="crp_title">[Updated] Facebook Groups for Church</a></li><li><a href="http://thisministry.net/2008/03/11/a-better-way-to-view-your-data-and-report/" rel="bookmark" class="crp_title">A better way to view your data and report?</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://thisministry.net/2009/06/05/playing-with-plpgsql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A better way to view your data and report?</title>
		<link>http://thisministry.net/2008/03/11/a-better-way-to-view-your-data-and-report/</link>
		<comments>http://thisministry.net/2008/03/11/a-better-way-to-view-your-data-and-report/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 13:50:29 +0000</pubDate>
		<dc:creator>emilio</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://blog.thisministry.net/?p=9</guid>
		<description><![CDATA[I just attended a session here that describes a product from Datatel that is designed to off-load data from your Unidata/SQL Server/Oracle backend for Colleague. This is an intriguing way of solving reporting problems. It essentially works by making a &#8230; <a href="http://thisministry.net/2008/03/11/a-better-way-to-view-your-data-and-report/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just attended a session here that describes a product from Datatel that is designed to off-load data from your Unidata/SQL Server/Oracle backend for Colleague.  This is an intriguing way of solving reporting problems.  </p>
<p>It essentially works by making a copy of relevant data to a secondary (or reporting) server.  The real trick is that no matter what database is used for the application back-end, you are reporting off a SQL compliant database with industry standard tools.  Additionally, even if the application changes its data model over time (and what app doesn&#8217;t), it should not affect your existing reports.  This is because when the data is copied (or extracted), only relevant fields are carried over.  Those which are not typically used do not make the transition to the new database (let&#8217;s say with a name like person_extract).</p>
<p>For example, let&#8217;s say you have a table that describes a person.  It will have typical information like name, address, city, state, zip, birthdate, social security number (a really helpful bit in tracking people.  i know, a little creepy.), and perhaps maiden name for women.  Now, the location for all this information may have names like first_name, last_name, etc.  What you see on the reporting server is something like first_name_extract, last_name_extract, etc.  However, if the data model is changed and the maiden name is then placed in another table and given a name like maiden_name or name (assuming a table name like alternate_names and a field denoting maiden name, it will not make a difference to you.  You are still reporting off person_extract. Where the data comes from to populate first_name_extract or last_name_extract, you do not care.  The ODS takes care of that.</p>
<p>Really nice for keeping old reports relevant.</p>
<p>In addition, you can also use several database servers to report from.  Datatel&#8217;s Data Orchestrator ODS (Operational Data Store) can use Microsoft SQL Server and Oracle.  They are looking at MySQL as well.  Moving forward, any additional SQL compliant servers they add just gives the IT department flexibility and smaller organizations a chance to save money.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://thisministry.net/2006/07/21/filemake-pro-to-mysql/" rel="bookmark" class="crp_title">FileMaker Pro to MySQL</a></li><li><a href="http://thisministry.net/2008/03/12/last-day-dug-2008/" rel="bookmark" class="crp_title">Last day @ DUG 2008</a></li><li><a href="http://thisministry.net/2008/07/22/technology-is-great-and-useful/" rel="bookmark" class="crp_title">Technology is great and useful</a></li><li><a href="http://thisministry.net/2008/07/22/am-i-the-only-one-loving-the-iphone-20-software/" rel="bookmark" class="crp_title">Am I the only one loving the iPhone 2.0 software?</a></li><li><a href="http://thisministry.net/2009/04/29/joomla-install-error/" rel="bookmark" class="crp_title">Joomla Install Error</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/">Contextual Related Posts</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://thisministry.net/2008/03/11/a-better-way-to-view-your-data-and-report/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
