Home > SQL Azure > Creating SQL Azure Database Objects and View Spatial Data

Creating SQL Azure Database Objects and View Spatial Data

In this post I will be showing you how to create SQL Azure Database, Tables  and input data to a table.

Create SQL Azure Database

Step 1: Go to Administration page and Click create database icon.

Createdatabase1Step 2: Input Database name, Edition and Collation. Finally click submit button

Createdatabase2You will see the below screen after database creation.

Createdatabase3This is the query performance screen. It contains query execution details.

queryperformanceDatabase creation is over now.

Create a Table

Step 1: Go to design page and click New Table.

tablecreation1Image given below is the default view of Table design. You can add or delete columns here.

tablecreation2Step 2: Once the table design is completed, you have to save the changes by clicking Save button in the menu. You can also give your table name in the table name text box

tablecreation3You can create indexes and create key relationship in this page

tablecreation4Input data to the table. you can also see an additional tab “Spatial Data” for geographical data.

tabledataClick Add row to enter some values for the table. This page only allow you to input non spatial column. Don’t forget to save the data. Save button is in the menu.

tabledata2Update Geography column with the following queries in query execution page.

update tblFields set FieldLocation = geography::Point(29.9507768, -95.1846539, 4326) where FieldID = 1
update tblFields set FieldLocation = geography::Point(37.664654, -120.1857423, 4326) where FieldID = 2
update tblFields set FieldLocation = geography::Point(46.9102903, -103.0229563, 4326) where FieldID = 3

tabledata2Now, go to Data tab and refresh the data using refresh button and then navigate to spatial data page to see the geographical data output. There are some settings available on the right hand side of this page to set up geodata visualization.


Categories: SQL Azure Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: