This article is a compliment to our Postgres OnLine Magazine May/June 2008 issue Cross Compare of SQL Server, MySQL, and PostgreSQL and our inaugural issue December 2007 PostGIS for geospatial analysis and mapping.
In this comparison we shall focus on the suitability of these for spatial analysis, mapping and general GIS processing. We are only comparing these three databases because these are the ones we use most often and care about. Most of this information is gleened from the help docs and our general understanding of availability of tools.
We shall note that in terms of affordability vs. functionality SQL Server 2008 and PostGIS are the front-runners. While the spatial functionality and speed of MySQL significantly lags that of SQL Server 2008 spatial and PostGIS, we felt it important to include because MySQL has such a large install base. If MySQL spatial capabilities does just enough of what you need and at adequate speed, by all means there is no need to swap it out.
The IBM DB2 and Oracle Spatial offerings are in general more costly and while the free versions of those do offer a great bit of functionality, they are limited to number of processors that can be used, functionality and size of database.
Oracle 11G only provides Locator (and not Oracle Spatial) for their express and Non-Enterprise, for Enterprise - its an additional priced offering on top of the regular enterprise price to upgrade your Locator to Spatial. While Oracle 11G is a bit more generous than its 10G offering, locator spatial functions are significantly less than Oracle Spatial and are missing critical functions such as ST_Intersection and ST_Centroid. Although Oracle locator does provide geodetic support, it has vastly less functionality than their Oracle Spatial offering. See Simon's Oracle Locator vs. Enterprise Spatial licensing limitations and Oracle 11G locator white paper.
IBM charges for geodetic as a separate priced blade on-top of their regular offerings. Their IBM DB2 Express-C does have a freely downloadable DB2 Spatial Extender which by accounts appears to be rich and they do have the unique generosity of allowing up to 2 processors, unlimited size db, but limited to 4G on board memory. See DB2 Express-C and DB2 Spatial Extender White paper for more details.
If you have dreams of database farms and clouds, deployment of custom apps for many clients, the licensing costs of Oracle offerings will probably break the bank at least a little or make your product more pricey than it needs to be. IBM is not too bad and its express may be adequate.
SQL Server while its not free except for its express version, all its spatial is fully-supported in its express (so no major hidden gotchas), its pricing is low enough, install base high, and inertial costs of switching a db platform that you can't discount it on price alone especially if you are a windows-only shop with a wealth of applications built on SQL Server. Its tool set is also very nice for general db management.
Now for this section, we can't really itemize all the functions of each offering. We will just focus on the functions we consider most commonly used in spatial analysis and geoprocessing. For this section we are treating SQL Server 2008 as two products because functionality available for its planar (Geometry) is not the same as functionality available for Geography. In theory you can convert between the 2 types by using the GeomFromWKB and AsBinary functions that each type provides if they have the same SRID, but without Transform function, this is of limited use.
Please also note that these offerings have not officially come out yet. SQL Server 2008 is currently at RC0 and will be released in another 2-3 months. From accounts we have read, the functionality that is in RC0 is pretty much what you can expect in the RTM except that the RTM will have integrated spatial viewing in the SQL Management studio. MySQL just came out with 5.1 RC and will soon be out with 5.1 and won't come out with 6 for probably another year or so. In general though they haven't done much with improving their spatial support so the 5+ is just more stable than the 4.0 and 6.0 will probably have more stability and the query optimizer is improved which will indirectly help spatial queries, but not much intro of new functionality. PostGIS is currently at 1.3.3 and will be coming out with 1.3.4 very shortly. For all intensive purposes there is not much of a difference between 1.3.3 and 1.3.4 aside from bug fixes, ST_DWithin speed improvement and ST_AsGeoJSON. 1.4 will have vast speed improvements for doing cascaded aggregate unions, a bit better curve support.
For more extensive details - for MySQL check out - MySQL 5.1 Spatial Extensions, MySQL 6 Spatial Extensions, PostGIS 1.3.4, PostGIS 1.4 SVN in progress, SQL Server 2008 Web docs, SQL Server 2008 Books Online download. For SQL Server 2008 Books OnLine, if you are running a Windows Installer service lower than 4.5, then you'll get an error "The installation package can not be installed by Windows Installer Service. You must install a windows service pack that contains a newer version of the windows installer service. ". If you get such an error then - download and install the Windows Installer service 4.5 from http://www.microsoft.com/downloads/details.aspx?FamilyID=5a58b56f-60b6-4412-95b9-54d056d6f9f4&DisplayLang=en
Del.icio.us | Reddit | Digg | BlinkList | Furl Spurl | Simpy
This Document is available under the GNU Free Documentation License 1.2 http://www.gnu.org/copyleft/fdl.html & for download at the BostonGIS site http://www.bostongis.com