<?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>Digital Divide &#187; Databases</title>
	<atom:link href="http://www.simonecampora.com/blog/category/technology/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simonecampora.com/blog</link>
	<description>Simone Campora's Blog: about Databases, GIS, RIA and more...</description>
	<lastBuildDate>Tue, 13 Jul 2010 10:15:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to efficiently extract and load Tables in Oracle with sqlplus, sqlldr</title>
		<link>http://www.simonecampora.com/blog/2010/07/09/how-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix/</link>
		<comments>http://www.simonecampora.com/blog/2010/07/09/how-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 07:56:18 +0000</pubDate>
		<dc:creator>simonecampora</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[dbms]]></category>
		<category><![CDATA[named pipes]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Loader]]></category>
		<category><![CDATA[sqlplus]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.simonecampora.com/blog/?p=202</guid>
		<description><![CDATA[
Today I&#8217;m posting another technical hint for those who might want to extract huge dataset and have to cope with limited disk space issues. SQL Loader is a powerful Oracle tool for bulk loading, and so far the fastest on Oracle.
A major issue is surely the disk space that needs to be occupied while temporarly [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img src="http://nadatest.org/images/SunOracle.png" alt="SUN Oracle" width="304" height="207" /></p>
<p style="text-align: justify;">Today I&#8217;m posting another technical hint for those who might want to extract huge dataset and have to cope with limited disk space issues. SQL Loader is a powerful Oracle tool for bulk loading, and so far the fastest on Oracle.<br />
A major issue is surely the disk space that needs to be occupied while temporarly storing the loading data on local disks. This example will help you overcoming this issue by dumping the data direct on zip files and allowing SQL Loader to read directly from zipped files.</p>
<p>1. Prepare SQL select statement: this is the content inside the  select.sql script</p>
<pre class="brush: sql; collapse: false;">
set pagesize 0
set head off
set feed off
set line 200

select
col1      || '|' ||
col2      || '|' ||
coln
from
SCHEMA.TABLENAME
;
exit;
</pre>
<p>2. Extract the dataset (for UNIX systems)</p>
<pre class="brush: bash; collapse: false;">
user@machine&gt; mkfifo to-zip
user@machine&gt; gzip -9 -c &lt; to-zip &gt; dataset.dat.gz
user@machine&gt; sqlplus -s username/password@service @select.sql &gt; to-zip
</pre>
<p>3. Create the SQLLDR control file (control.ctl file)</p>
<pre class="brush: sql; collapse: false;">
LOAD DATA
APPEND
INTO TABLE SCHEMA.TABLENAME
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
(
COL1
,COL2
,COLN
)
</pre>
<p>4. Load the dataset</p>
<pre class="brush: bash; collapse: false;">
user@machine&gt; mkfifo unzip
user@machine&gt; zcat dataset.dat.gz &gt; unzip
user@machine&gt; sqlldr userid=$username/$password@$service control=control.ctl log=results.log bad=results.bad discard=results.dsc data=unzip direct=y errors=0
</pre>
<p>And that&#8217;s it! please remember that a good behavior will be always to truncate the table first (if you need to replace the data) and force the rebuild of the table related indexes at the end of the process.</p>
<p><a href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a> <a href="http://www.addtoany.com/add_to/google_buzz?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="Google Buzz" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/google_buzz.png" width="16" height="16" alt="Google Buzz"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="Digg" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a href="http://www.addtoany.com/add_to/myspace?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="MySpace" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/myspace.png" width="16" height="16" alt="MySpace"/></a> <a href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="Hotmail" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a> <a href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a> <a href="http://www.addtoany.com/add_to/wordpress?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="WordPress" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/wordpress.png" width="16" height="16" alt="WordPress"/></a> <a href="http://www.addtoany.com/add_to/orkut?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="Orkut" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/orkut.png" width="16" height="16" alt="Orkut"/></a> <a href="http://www.addtoany.com/add_to/yahoo_bookmarks?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="Yahoo Bookmarks" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Bookmarks"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2010%2F07%2F09%2Fhow-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix%2F&amp;linkname=How%20to%20efficiently%20extract%20and%20load%20Tables%20in%20Oracle%20with%20sqlplus%2C%20sqlldr">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecampora.com/blog/2010/07/09/how-to-extract-and-load-a-whole-table-in-oracle-using-sqlplus-sqlldr-named-pipes-and-zipped-dumps-on-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GeoMondrian Example</title>
		<link>http://www.simonecampora.com/blog/2009/11/18/geomondrian-example/</link>
		<comments>http://www.simonecampora.com/blog/2009/11/18/geomondrian-example/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 11:12:45 +0000</pubDate>
		<dc:creator>simonecampora</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[GeoMondrian]]></category>
		<category><![CDATA[GeoMondrian Example]]></category>
		<category><![CDATA[Mondrian OLAP]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[SOLAP]]></category>
		<category><![CDATA[spatial database]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.simonecampora.com/blog/?p=153</guid>
		<description><![CDATA[
As soon as I&#8217;ve started digging into OLAP Architectures I realized how complicated things might become whenever looking for extra features. Most of the commercial OLAP solutions are providing &#8220;classic&#8221; OLAP features for data warehousing. It means that only simple numeric, strings and dates would be supported. Spatial Data Warehouses  architectures instead, are still in [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img src="http://www.spatialytics.org/wp-content/themes/republica/images/logo.png" alt="Spartialitics.org" width="300" height="60" /></p>
<p style="text-align: justify;">As soon as I&#8217;ve started digging into OLAP Architectures I realized how complicated things might become whenever looking for extra features. Most of the commercial OLAP solutions are providing &#8220;classic&#8221; OLAP features for data warehousing. It means that only simple numeric, strings and dates would be supported. Spatial Data Warehouses  architectures instead, are still in their infancy and there exists no commercial product that is actually providing such SOLAP functionalities. There exists several academic proposals instead which can provide a good overview on the features that can be supported by SOLAP Servers.</p>
<p style="text-align: justify;">One of these acedemic prototypes is <a href="http://www.spatialytics.org/projects/geomondrian/">Geo Mondrian</a>.</p>
<p style="text-align: justify;">GeoMondrian is a spatially-enabled version of Pentaho Analysis Services (<a onclick="javascript:pageTracker._trackPageview('/outbound/article/mondrian.pentaho.org');" href="http://mondrian.pentaho.org/">Mondrian</a>). It has been released under the <a onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opensource.org');" href="http://www.opensource.org/licenses/eclipse-1.0.php">EPL</a>. GeoMondrian is the first implementation of a true SOLAP server. It provides a consistent integration of spatial objects into the OLAP data cube structure, instead of fetching them from a separate spatial database, web service or GIS file. To make a simple analogy, GeoMondrian brings to the Mondrian OLAP server what PostGIS brings to the PostgreSQL database management system.</p>
<p style="text-align: justify;">Unfortunately the documentation and getting-started guides are missing right now&#8230; That&#8217;s why I&#8217;ve decided to publish a couple of advices to whom may decide to use GeoMondrian for  developing SOLAP applications. Here attached you can find an archive that contains all that you need to setup a sample SOLAP server with geographic data source. It is designed to be working on PostgreSQL+Postigs since it is the only spatial database to be supported right now.</p>
<p style="text-align: justify;">What you have to do in order to be able to use this unofficial build release of GeoMondrian is to load the .SQL script into your postgresql+postgis database and than run the Test application (be sure that the .XML schema definition is in the same parent directory, to have set up properly your JDBC connection and have included the libraries that are present in the &#8220;lib&#8221; folder).</p>
<p style="text-align: justify;">I hope that it will help!</p>
<p style="text-align: center;"><a href="http://www.simonecampora.com/public/files/geomondrian-example.zip"><img class="aligncenter size-full wp-image-156" title="zip-icon1" src="http://www.simonecampora.com/blog/wp-content/uploads/2009/11/zip-icon1.jpg" alt="zip-icon1" width="73" height="85" /></a></p>
<p><a href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a> <a href="http://www.addtoany.com/add_to/google_buzz?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="Google Buzz" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/google_buzz.png" width="16" height="16" alt="Google Buzz"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="Digg" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a href="http://www.addtoany.com/add_to/myspace?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="MySpace" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/myspace.png" width="16" height="16" alt="MySpace"/></a> <a href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="Hotmail" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a> <a href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a> <a href="http://www.addtoany.com/add_to/wordpress?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="WordPress" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/wordpress.png" width="16" height="16" alt="WordPress"/></a> <a href="http://www.addtoany.com/add_to/orkut?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="Orkut" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/orkut.png" width="16" height="16" alt="Orkut"/></a> <a href="http://www.addtoany.com/add_to/yahoo_bookmarks?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="Yahoo Bookmarks" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Bookmarks"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F11%2F18%2Fgeomondrian-example%2F&amp;linkname=GeoMondrian%20Example">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecampora.com/blog/2009/11/18/geomondrian-example/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Supported Spatial Data Formats</title>
		<link>http://www.simonecampora.com/blog/2009/10/15/supported-spatial-data-formats/</link>
		<comments>http://www.simonecampora.com/blog/2009/10/15/supported-spatial-data-formats/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 12:14:17 +0000</pubDate>
		<dc:creator>simonecampora</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[data formats]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[fme]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.simonecampora.com/blog/?p=142</guid>
		<description><![CDATA[
GIS People often have to fight agains data conversions. The constellation of Desktop GIS suites make our life harder and harder while approaching to ETL processes. A relevant issue in ETL processes is the so called &#8220;data formats discovery&#8221;. Finding information about which software is supporting which spatial data type can turn a simple routing [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.safe.com/products/desktop/formats/index.php"><img class="aligncenter size-full wp-image-143" title="crystal_clear_action_db_status" src="http://www.simonecampora.com/blog/wp-content/uploads/2009/10/crystal_clear_action_db_status.png" alt="crystal_clear_action_db_status" width="128" height="128" /></a></p>
<p style="text-align: justify;">GIS People often have to fight agains data conversions. The constellation of Desktop GIS suites make our life harder and harder while approaching to ETL processes. A relevant issue in ETL processes is the so called &#8220;data formats discovery&#8221;. Finding information about which software is supporting which spatial data type can turn a simple routing task into a &#8220;mission impossible&#8221; waist of time.</p>
<p style="text-align: justify;">To overcome this inconvenient we can refer to the support guide of a famous ETL software: FME. FME is a complete spatial ETL solution that enables GIS Professionals to quickly translate, transform, integrate and distribute spatial data. In our case it simplifies our life by means of the &#8220;Supported Formats&#8221; guide.</p>
<p style="text-align: justify;">Visiting this link [<a href="http://www.safe.com/products/desktop/formats/index.php">WWW</a>] you may find a list of supported types from this software (quite a huge list!), however by clicking on each single data types you will be able to access to PDF version data sheets of each data source, complete of description, supported types, versions, and lot more.</p>
<p><a href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a> <a href="http://www.addtoany.com/add_to/google_buzz?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="Google Buzz" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/google_buzz.png" width="16" height="16" alt="Google Buzz"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="Digg" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a href="http://www.addtoany.com/add_to/myspace?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="MySpace" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/myspace.png" width="16" height="16" alt="MySpace"/></a> <a href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="Hotmail" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a> <a href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a> <a href="http://www.addtoany.com/add_to/wordpress?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="WordPress" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/wordpress.png" width="16" height="16" alt="WordPress"/></a> <a href="http://www.addtoany.com/add_to/orkut?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="Orkut" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/orkut.png" width="16" height="16" alt="Orkut"/></a> <a href="http://www.addtoany.com/add_to/yahoo_bookmarks?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="Yahoo Bookmarks" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Bookmarks"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F10%2F15%2Fsupported-spatial-data-formats%2F&amp;linkname=Supported%20Spatial%20Data%20Formats">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecampora.com/blog/2009/10/15/supported-spatial-data-formats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL Custom Types</title>
		<link>http://www.simonecampora.com/blog/2009/05/16/postgresql-custom-types/</link>
		<comments>http://www.simonecampora.com/blog/2009/05/16/postgresql-custom-types/#comments</comments>
		<pubDate>Sat, 16 May 2009 16:50:26 +0000</pubDate>
		<dc:creator>simonecampora</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database custom types]]></category>
		<category><![CDATA[dbms]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://www.simonecampora.com/blog/?p=54</guid>
		<description><![CDATA[
In the last year I&#8217;ve spent six months digging into a PostgreSQL project. PostgreSQL is one of the most interesting and fast developed database management systems. However it is still a little bit behind the major commercial competitors, it is without any doubt, the most advanced OpenSource and Free DBMS. On the great features of [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.simonecampora.com/blog/wp-content/uploads/2009/05/postgresql.png"><img class="aligncenter size-medium wp-image-56" title="postgresql" src="http://www.simonecampora.com/blog/wp-content/uploads/2009/05/postgresql-290x300.png" alt="postgresql" width="135" height="141" /></a></p>
<p style="text-align: justify;">In the last year I&#8217;ve spent six months digging into a PostgreSQL project. PostgreSQL is one of the most interesting and fast developed database management systems. However it is still a little bit behind the major commercial competitors, it is without any doubt, the most advanced OpenSource and Free DBMS. On the great features of PostgreSQL is the documentation of its architecture, that is maintained updated constantly by its vivid and active community. Although this community provides one of the best (the fastest that I&#8217;ve every experienced as a single user) developer on-line support system, at that time (and still now!) I had serious difficulties to find out information about on of the most used and useful coding extensions: custom types. Some of you may had to work with PostgreSQL extensions like PostGIS (the simplest and most effective spatial extension that integrates spatial information into PostgreSQL) and wanted to extend or to provide similar functionalities so easy to use and comfortable. I was mentioning the user-friendly constructors for spatial objects. Custom Types for defining spatial objects are defined in the SQL language like that</p>
<pre class="brush: sql; collapse: false;">POINT('37','-97');</pre>
<p style="text-align: justify;">(for more information, take a look to <a href="http://www.bostongis.com/postgis_quickguide.bqg">this</a> link)</p>
<p style="text-align: justify;">This type of syntax is only possible (as far as I know) if the type is defined using a C function, and for instance compiled into a .so shared object library provided to PostgreSQL. C PostgreSQL custom types are defined by two functions that translate the low level description of the type into SQL usable constructors. Here it follows the code  to define constructors for a Currency type, and attached into <a href="http://www.simonecampora.com/blog/wp-content/uploads/2009/05/fcur.c">this file</a>, there is the source code for other operations like equals, greater and exchange rate calculation (the source of this piece of code is PostgreSQL C Reference Documentation).</p>
<p style="text-align: justify;">
<pre class="brush: cpp;">/*
**  Name: fcur_in()
**
**        Converts an fcur value from external form
**	  to internal form.
*/

PG_FUNCTION_INFO_V1(fcur_in);

Datum fcur_in(PG_FUNCTION_ARGS)
{
    char  * src     = PG_GETARG_CSTRING(0);
    char  * workStr = (char *)palloc( strlen( src ));
    char  * units   = NULL;
    char  * name    = NULL;
    char  * xrate   = NULL;
    fcur  * result  = NULL;
    char  * endPtr  = NULL;

    strcpy( workStr, src );

    units = strtok( workStr, &quot;(&quot; );
    xrate = strtok( NULL, &quot;/)&quot; );
    name  = strtok( NULL, &quot;)&quot; );

    result = (fcur *)palloc( sizeof( fcur ));

    memset( result, 0x00, sizeof( fcur ));

    result-&amp;gt;fcur_units = strtod( units, &amp;amp;endPtr );

    if( xrate )
    {
	result-&amp;gt;fcur_xrate = strtod( xrate, &amp;amp;endPtr );
    }
    else
    {
	result-&amp;gt;fcur_xrate = 1.0;
    }

    if( name )
    {
	strncpy( result-&amp;gt;fcur_name,
		 name,
		 sizeof( result-&amp;gt;fcur_name ));
    }
    else
    {
	strncpy( result-&amp;gt;fcur_name,
		 unknownCurrencyName,
		 sizeof( result-&amp;gt;fcur_name ));
    }

    PG_RETURN_POINTER( result );
}

/*
**  Name: fcur_out()
**
**        Converts an fcur value from internal form
**	  to external form.
*/

PG_FUNCTION_INFO_V1(fcur_out);

Datum fcur_out(PG_FUNCTION_ARGS)
{
    fcur  * src  = (fcur *)PG_GETARG_POINTER( 0 );
    char  * result;
    char    work[16+1+sizeof(src-&amp;gt;fcur_name)+16];

    sprintf( work, &quot;%g(%g/%s)&quot;,
	     src-&amp;gt;fcur_units,
	     src-&amp;gt;fcur_xrate,
	     src-&amp;gt;fcur_name );

    result = (char *)palloc( strlen( work ) + 1 );

    strcpy( result, work );

    PG_RETURN_CSTRING( result );

}
</pre>
<p><a href="http://www.addtoany.com/add_to/google_bookmarks?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="Google Bookmarks" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google Bookmarks"/></a> <a href="http://www.addtoany.com/add_to/google_buzz?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="Google Buzz" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/google_buzz.png" width="16" height="16" alt="Google Buzz"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="Digg" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a href="http://www.addtoany.com/add_to/myspace?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="MySpace" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/myspace.png" width="16" height="16" alt="MySpace"/></a> <a href="http://www.addtoany.com/add_to/hotmail?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="Hotmail" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/live.png" width="16" height="16" alt="Hotmail"/></a> <a href="http://www.addtoany.com/add_to/msdn?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="MSDN" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/msdn.png" width="16" height="16" alt="MSDN"/></a> <a href="http://www.addtoany.com/add_to/wordpress?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="WordPress" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/wordpress.png" width="16" height="16" alt="WordPress"/></a> <a href="http://www.addtoany.com/add_to/orkut?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="Orkut" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/orkut.png" width="16" height="16" alt="Orkut"/></a> <a href="http://www.addtoany.com/add_to/yahoo_bookmarks?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="Yahoo Bookmarks" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/yahoo.png" width="16" height="16" alt="Yahoo Bookmarks"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/technorati_favorites?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types" title="Technorati Favorites" rel="nofollow" target="_blank"><img src="http://www.simonecampora.com/blog/wp-content/plugins/add-to-any/icons/technorati.png" width="16" height="16" alt="Technorati Favorites"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.simonecampora.com%2Fblog%2F2009%2F05%2F16%2Fpostgresql-custom-types%2F&amp;linkname=PostgreSQL%20Custom%20Types">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecampora.com/blog/2009/05/16/postgresql-custom-types/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
