Just another tech site

Data Types


I. Data Types:

  • Text dada
  • Spatial data: to represent geographical and 3D object data
  • Structural data (XML)
  • BLOB type: files

 

1.1 Spacial Data

Introduction: used to represent Geometry and Geograpgy

General hierarchy

Types:

  • POINT: (x,y,z).
  • LINESTRING: .
  • POLYGON: .
  • COLLECTIONS: .

References:

1.2. Structural Data

for example XML Data Type

History

SqlServer 2000: you could return XML from SQL Server with the FOR XML clause or parse XML into a result set with the OPENXML function. However, XML was treated as a string

SQL Server 2005 and 2008 provide a native XML data type that can be untyped or typed according to a collection of XML schemas

Example from “Bipin Joshi Blog”

Add a XML column

Storing data

Now that you have created EmployeesAsXml table with XML column, you can learn to store and modify XML data into it.

Option 1: Inserting the data in the XML column

Option 2 : Inserting data via XML variable

References:

[1] http://www.databasejournal.com/features/mssql/article.php/3839786/Explore-XML-Data-Type-in-SQL-Server.htm

[2] http://www.codeguru.com/csharp/csharp/cs_data/xml/article.php/c15329

1.3. Text Data

.

1.4. Binary Large Object (Blob type)

Binary data comes in variety of flavors. Word documents, PDF invoices, Photos, images, raw data are all examples of BLOB data. When storing BLOBs as a part of your .NET application, you have two choices:

  1. Store BLOBs as disk files
  2. Store BLOBs directly inside a SQL Server database

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Tag Cloud

%d bloggers like this: