SQL Server – Spatial fun with Mondial database

Hi Friends,

I often play around with this database and sometimes also use this in my assignments and demos. The MONDIAL database has been compiled from geographical Web data sources like CIA world factbook, Global Statistics, etc and is available in several formats. The SQL one is here;

After you download, extract, and create the database. Here are some interesting queries that we can run and get spatial output:

1_SQL_Server_Spatial_fun_with Mondial_database

In the above query, the city table has Longitue and Latitude column. I have used the static Point method of Geography data type to plot the longitude and latitude – the spatial tab shows spatial results in SQL Server Management Studio. 4326 is the default spatial reference ID.

Download the database and explore it – I am sure you will find the data very interesting to play around with !

 

 

Amit Bansal

About Amit Bansal

Amit Bansal is always brainstorming around SQL Server. Despite working with SQL since 1997, he is amazed that he keeps learning new things every single day. SQL Server is AB's first love, and his wife does not mind that. He tries to share as much and spreads the SQL goodness. Internals and Performance Tuning excites him, and also gives him sleepless nights at times, simply because he is not a genius, but quite a hard worker and does not give up. It has been a long and exciting journey since 1997, you can read here: http://sqlmaestros.com/amit-bansal/ He is on Twitter: https://www.twitter.com/A_Bansal

View all posts by Amit Bansal →

One Comment on “SQL Server – Spatial fun with Mondial database”

Leave a Reply

Your email address will not be published. Required fields are marked *