SlideShare a Scribd company logo
1 of 29
Praveen Srivatsa
Director, AsthraSoft Consulting
Microsoft Regional Director, Bangalore
Session Code:
Why beyond relational?
SQL support for non-relational data

  A large part of the world’s data is non-relational. Think
     Emails, Pictures, Videos, Chat transcripts, Office docs etc.
  SQL Server has support for
     XML and CLR since SQL 2005
     FileStream, Spatial and HierarchyID since SQL 2008
  Integrated business scenarios
     Attachments, free text documents, notes, images
     Medical/Scientific data
     Geo spatial, location aware data
SQL Server 2005 and XML data
 Native XML data type
 XML Schema support in database
    Mapping of SQL Server types to XSD types
 XQuery support
    Exposed as methods on XML data type
    XQuery strings are input to these methods
 XML Indexes
 Many improvements to SELECT...FOR XML
 XML input from file system through BULK data provider
 .NET XML APIs available through SQLCLR
 SQLXML functionality ships with database
 SSIS supports XML input through adapter
SQL Server 2008 XML
Enhancements
 Mapping of new date/time data types to XSD
 types
 Support for more XML Schema constructs
   Union and list types
     Many industry-standard XSD schemas use this
   Lax validation of xsd:any wildcards
     Office documents and other XSD schemas use this
 XQuery support for 'let' clause in FLWOR
 expressions
 XML DML supports insert of XML data type
Using XML in SQL Server
Reliability, Scalability, and Security
 SQL Server loads the .NET runtime in-process
 and guarantees reliability/scalability/security
    .NET 2.0 hosting APIs allow host control
      All .NET resources managed and tracked by SQL Server
    .NET 2.0 libraries must be safe to run in SQL Server
      System assemblies divided into 'safe' and 'unsafe'
    User code divided into three classifications
      Safe - in process calls only, code is reliable
      External - some out of process calls, code is reliable
      Unsafe - all out of process, reliability not guaranteed
User-Defined Operations
 CLR Supports User Defined Data
 types, functions, aggregates and table valued
 functions
 Scalar UDFs without data access is where .NET
 excels
 SQL Server 2008 include types exposed using
 SQLCLR
    HierarchyID
    Geography
    Geometry
TVF and UDA with SQL CLR
Filestream storage
 Storing large binary objects in databases is
 suboptimal
    Large objects take buffers in database memory
    Large objects cause database fragmentation
      In file system however, quot;updatequot; is delete and insert
      quot;Before imagequot; in an update is not deleted immediately
 Storing all related data in a database adds
    Transactional consistency
    Integrated, point-in-time backup and restore
    Single storage and query vehicle
SQL Server 2008 Filestream
 A filegroup for filestream storage is declared using
 DDL
    Filestream storage is tied to a database
 The filegroup is mapped to a directory
    Must be NTFS file system
    Caution: Files deleteable from file system if you have
    appropriate permissions
 VARBINARY(MAX) columns can be defined with
 FILESTREAM attribute
    Table must also have UNIQUEIDENTIFIER column
    Filestream storage not available for other large types
 Data is stored in the file system
Programming with Filestreams
 Filestream columns are available with SQL
 methods
    If SQL is used, indistinguishable from
    varbinary(max)
 Filestream can be accessed and modified using
 file IO
    PathName function retrieves a symbolic path name
    Acquire context with
      GET_FILESTREAM_TRANSACTION_CONTEXT
    Use OpenSqlFilestream to get a file handle
FileStream in SQL
Hierarchical Data
 Hierarchical data consists of nodes and edges
 Hierarchical data can be modeled in relational
 as
    Adjacency model - separate column for edge
      Most common, column can either be in same or separate
      table
    Path Enumeration model - column w/hierarchical
    path
    Nested Set model - adds quot;leftquot; and quot;rightquot; columns
    to represent edges, which must be maintained
    separately
SQL Server and Hierarchical Data
 SQL Server 2005 adds Native Hierarchical
 Queries
    Recursive common table expression
    ANSI-standard
 Hierarchical Data can be modeled as XML
    XML data type uses ORDPATH format to store
    elements, attributes and hierarchical constructs
 Variable length to 900 bytes
 Comparable type - can be used as index key
SQL Server and Hierarchical Data
 In SQL 2008, new Built-In Data Type -
 HierarchyID
 SQLCLR based system UDT
    Useable on .NET clients directly as SqlHierarchyId
 An implementation of path enumeration model
    Uses ORDPATH internally for speed
Working with HierarchyID
 Nodes can be added with serializable transaction
 After computing last child
      UPDATE Org
      SET @last_child = LastChild = EmployeeId.GetDescendant(LastChild,NULL)
      WHERE EmployeeId = @mgrid
      INSERT Org (EmployeeId, EmployeeName)
        VALUES(@last_child, @EmpName)

 Node can be added with error detection
      BEGIN
      INS_EMP:
       SELECT @last_child = MAX(EmployeeId) FROM Org_T1
        WHERE EmployeeId.GetAncestor(1) = @mgrid
       INSERT Org_T1 (EmployeeId, EmployeeName)
        SELECT @mgrid.GetDescendant(@last_child, NULL), @EmpName
       -- On error, return to INS_EMP to recompute @last_child
       IF @@error <> 0 GOTO INS_EMP
      END
Uisng the HierarchyID
Spatial Data
 Spatial data provides answers to location-based
 queries
    Which roads intersect the Microsoft campus?
    Does my land claim overlap yours?
    List all of the Italian restaurants within 5 kilometers
 Spatial data is part of almost every database
    If your database includes an address
SQL Server 2008 and Spatial Data
 SQL Server supports two spatial data types
    GEOMETRY - flat earth model
    GEOGRAPHY - round earth model
 Both types support all of the instanciable OGC
 types
    InstanceOf method can distinguish between them
 Supports two dimension data
    X and Y or Lat and Long members
    Z member - elevation (user-defined semantics)
    M member - measure (user-defined semantics)
GEOGRAPHY Requirements
 GEOGRAPHY type has additional requirements
 Coordinate order is Latitude/Longitude
    This will be changed to Longitude/Latitude before
    RTM
 Exterior polygon rings must have their
 describing coordinates in counter-clockwise
 order (left-hand rule) with interior rings (holes)
 in clockwise-order (right-hand rule)
 A single GEOGRAPHY object cannot span more
 than a logical hemisphere
Sample Query
Which roads intersect Microsoft’s main campus?




SELECT * FROM roads WHERE roads.geom.STIntersects(@ms)=1
Working with Spatial Data
Beyond relational?
Making sense of your data
  SQL Server stores relational and non-relational
  data
     XML and CLR support improves with each release
     Filestream storage stores BLOBs on file system
        Buffer, fragmentation savings
     Spatial data has
        Library of spatial functions
        Three standard input and output formats
  Design all the data for your applications and choose
  the right model to deploy the data.
Related Content
Breakout Sessions (session codes and titles)



Interactive Theater Sessions (session codes and titles)



Hands-on Labs (session codes and titles)



Hands-on Labs (session codes and titles)
Track Resources
Resource 1



Resource 2



Resource 3



Resource 4
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should
 not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
                                                                           IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related Content

What's hot

INTEGRATING RELATED XML DATA INTO MULTIPLE DATA WAREHOUSE SCHEMAS
INTEGRATING RELATED XML DATA INTO MULTIPLE DATA WAREHOUSE SCHEMASINTEGRATING RELATED XML DATA INTO MULTIPLE DATA WAREHOUSE SCHEMAS
INTEGRATING RELATED XML DATA INTO MULTIPLE DATA WAREHOUSE SCHEMAScscpconf
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMSonia Pahuja
 
Relational database- Fundamentals
Relational database- FundamentalsRelational database- Fundamentals
Relational database- FundamentalsMohammed El Hedhly
 
Bank mangement system
Bank mangement systemBank mangement system
Bank mangement systemFaisalGhffar
 
DBMS_intermediate sql
DBMS_intermediate sqlDBMS_intermediate sql
DBMS_intermediate sqlAzizul Mamun
 
OVERVIEW OF NEW SQL,COMPARING SQL,NOSQL AND NEWSQL,B.Vinithamani,II-M.sc(Comp...
OVERVIEW OF NEW SQL,COMPARING SQL,NOSQL AND NEWSQL,B.Vinithamani,II-M.sc(Comp...OVERVIEW OF NEW SQL,COMPARING SQL,NOSQL AND NEWSQL,B.Vinithamani,II-M.sc(Comp...
OVERVIEW OF NEW SQL,COMPARING SQL,NOSQL AND NEWSQL,B.Vinithamani,II-M.sc(Comp...vinithabalasubramani1
 
Dbms Interview Question And Answer
Dbms Interview Question And AnswerDbms Interview Question And Answer
Dbms Interview Question And AnswerJagan Mohan Bishoyi
 
Enhanced xml validation using srml01
Enhanced xml validation using srml01Enhanced xml validation using srml01
Enhanced xml validation using srml01IJwest
 
Database management system chapter5
Database management system chapter5Database management system chapter5
Database management system chapter5Pranab Dasgupta
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseAdvance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseSonali Parab
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answersLakshmiSarvani6
 
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtapOverview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtapVikas Jagtap
 
SQL interview questions by jeetendra mandal - part 4
SQL interview questions by jeetendra mandal - part 4SQL interview questions by jeetendra mandal - part 4
SQL interview questions by jeetendra mandal - part 4jeetendra mandal
 
Ado.net &amp; data persistence frameworks
Ado.net &amp; data persistence frameworksAdo.net &amp; data persistence frameworks
Ado.net &amp; data persistence frameworksLuis Goldster
 

What's hot (20)

INTEGRATING RELATED XML DATA INTO MULTIPLE DATA WAREHOUSE SCHEMAS
INTEGRATING RELATED XML DATA INTO MULTIPLE DATA WAREHOUSE SCHEMASINTEGRATING RELATED XML DATA INTO MULTIPLE DATA WAREHOUSE SCHEMAS
INTEGRATING RELATED XML DATA INTO MULTIPLE DATA WAREHOUSE SCHEMAS
 
The Smartpath Information Systems | BASIC RDBMS CONCEPTS
The Smartpath Information Systems | BASIC RDBMS CONCEPTSThe Smartpath Information Systems | BASIC RDBMS CONCEPTS
The Smartpath Information Systems | BASIC RDBMS CONCEPTS
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
 
[PHPUGPH] PHP Roadshow - MySQL
[PHPUGPH] PHP Roadshow - MySQL[PHPUGPH] PHP Roadshow - MySQL
[PHPUGPH] PHP Roadshow - MySQL
 
Relational database- Fundamentals
Relational database- FundamentalsRelational database- Fundamentals
Relational database- Fundamentals
 
DBMS_Ch1
 DBMS_Ch1 DBMS_Ch1
DBMS_Ch1
 
Sql wksht-7
Sql wksht-7Sql wksht-7
Sql wksht-7
 
Bank mangement system
Bank mangement systemBank mangement system
Bank mangement system
 
Sql 2009
Sql 2009Sql 2009
Sql 2009
 
DBMS_intermediate sql
DBMS_intermediate sqlDBMS_intermediate sql
DBMS_intermediate sql
 
OVERVIEW OF NEW SQL,COMPARING SQL,NOSQL AND NEWSQL,B.Vinithamani,II-M.sc(Comp...
OVERVIEW OF NEW SQL,COMPARING SQL,NOSQL AND NEWSQL,B.Vinithamani,II-M.sc(Comp...OVERVIEW OF NEW SQL,COMPARING SQL,NOSQL AND NEWSQL,B.Vinithamani,II-M.sc(Comp...
OVERVIEW OF NEW SQL,COMPARING SQL,NOSQL AND NEWSQL,B.Vinithamani,II-M.sc(Comp...
 
Dbms Interview Question And Answer
Dbms Interview Question And AnswerDbms Interview Question And Answer
Dbms Interview Question And Answer
 
Enhanced xml validation using srml01
Enhanced xml validation using srml01Enhanced xml validation using srml01
Enhanced xml validation using srml01
 
Database management system chapter5
Database management system chapter5Database management system chapter5
Database management system chapter5
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseAdvance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In Database
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answers
 
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtapOverview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
 
SQL interview questions by jeetendra mandal - part 4
SQL interview questions by jeetendra mandal - part 4SQL interview questions by jeetendra mandal - part 4
SQL interview questions by jeetendra mandal - part 4
 
PPL, OQL & oodbms
PPL, OQL & oodbmsPPL, OQL & oodbms
PPL, OQL & oodbms
 
Ado.net &amp; data persistence frameworks
Ado.net &amp; data persistence frameworksAdo.net &amp; data persistence frameworks
Ado.net &amp; data persistence frameworks
 

Similar to Why Beyond Relational SQL Support Non-Relational Data

Tech Days09 Sqldev
Tech Days09 SqldevTech Days09 Sqldev
Tech Days09 Sqldevllangit
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developersllangit
 
SQL Server 2008 for .NET Developers
SQL Server 2008 for .NET DevelopersSQL Server 2008 for .NET Developers
SQL Server 2008 for .NET Developersllangit
 
Sql Summit Clr, Service Broker And Xml
Sql Summit   Clr, Service Broker And XmlSql Summit   Clr, Service Broker And Xml
Sql Summit Clr, Service Broker And XmlDavid Truxall
 
ASP.NET 3.5 SP1
ASP.NET 3.5 SP1ASP.NET 3.5 SP1
ASP.NET 3.5 SP1Dave Allen
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developersukdpe
 
Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000ukdpe
 
Introduction to Oracle Database
Introduction to Oracle DatabaseIntroduction to Oracle Database
Introduction to Oracle Databasepuja_dhar
 
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangaloreOracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangaloreTIB Academy
 
Reports with SQL Server Reporting Services
Reports with SQL Server Reporting ServicesReports with SQL Server Reporting Services
Reports with SQL Server Reporting ServicesPeter Gfader
 
14 22 size sql book(1)
14 22 size sql book(1)14 22 size sql book(1)
14 22 size sql book(1)bhganesh
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architectureAjeet Singh
 
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)Michael Rys
 
The Power of Relationships in Your Big Data
The Power of Relationships in Your Big DataThe Power of Relationships in Your Big Data
The Power of Relationships in Your Big DataPaulo Fagundes
 
Oracle NoSQL Database release 3.0 overview
Oracle NoSQL Database release 3.0 overviewOracle NoSQL Database release 3.0 overview
Oracle NoSQL Database release 3.0 overviewDave Segleau
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresSteven Johnson
 
Novidades do SQL Server 2016
Novidades do SQL Server 2016Novidades do SQL Server 2016
Novidades do SQL Server 2016Marcos Freccia
 

Similar to Why Beyond Relational SQL Support Non-Relational Data (20)

Tech Days09 Sqldev
Tech Days09 SqldevTech Days09 Sqldev
Tech Days09 Sqldev
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
 
SQL Server 2008 for .NET Developers
SQL Server 2008 for .NET DevelopersSQL Server 2008 for .NET Developers
SQL Server 2008 for .NET Developers
 
Sql Summit Clr, Service Broker And Xml
Sql Summit   Clr, Service Broker And XmlSql Summit   Clr, Service Broker And Xml
Sql Summit Clr, Service Broker And Xml
 
ASP.NET 3.5 SP1
ASP.NET 3.5 SP1ASP.NET 3.5 SP1
ASP.NET 3.5 SP1
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
 
Ikenstudiolive
IkenstudioliveIkenstudiolive
Ikenstudiolive
 
Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000Saying goodbye to SQL Server 2000
Saying goodbye to SQL Server 2000
 
Introduction to Oracle Database
Introduction to Oracle DatabaseIntroduction to Oracle Database
Introduction to Oracle Database
 
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangaloreOracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
 
Reports with SQL Server Reporting Services
Reports with SQL Server Reporting ServicesReports with SQL Server Reporting Services
Reports with SQL Server Reporting Services
 
14 22 size sql book(1)
14 22 size sql book(1)14 22 size sql book(1)
14 22 size sql book(1)
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architecture
 
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
 
The Power of Relationships in Your Big Data
The Power of Relationships in Your Big DataThe Power of Relationships in Your Big Data
The Power of Relationships in Your Big Data
 
Oracle NoSQL Database release 3.0 overview
Oracle NoSQL Database release 3.0 overviewOracle NoSQL Database release 3.0 overview
Oracle NoSQL Database release 3.0 overview
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome Measures
 
Ax
AxAx
Ax
 
Novidades do SQL Server 2016
Novidades do SQL Server 2016Novidades do SQL Server 2016
Novidades do SQL Server 2016
 
Ebook5
Ebook5Ebook5
Ebook5
 

More from rsnarayanan

Kevin Ms Web Platform
Kevin Ms Web PlatformKevin Ms Web Platform
Kevin Ms Web Platformrsnarayanan
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnetrsnarayanan
 
Harish Aspnet Dynamic Data
Harish Aspnet Dynamic DataHarish Aspnet Dynamic Data
Harish Aspnet Dynamic Datarsnarayanan
 
Harish Aspnet Deployment
Harish Aspnet DeploymentHarish Aspnet Deployment
Harish Aspnet Deploymentrsnarayanan
 
Whats New In Sl3
Whats New In Sl3Whats New In Sl3
Whats New In Sl3rsnarayanan
 
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...rsnarayanan
 
Advanced Silverlight
Advanced SilverlightAdvanced Silverlight
Advanced Silverlightrsnarayanan
 
Occasionally Connected Systems
Occasionally Connected SystemsOccasionally Connected Systems
Occasionally Connected Systemsrsnarayanan
 
Developing Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And ServicesDeveloping Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And Servicesrsnarayanan
 
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...rsnarayanan
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Libraryrsnarayanan
 
Ms Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My SqlMs Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My Sqlrsnarayanan
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developersrsnarayanan
 
What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1rsnarayanan
 
Ux For Developers
Ux For DevelopersUx For Developers
Ux For Developersrsnarayanan
 
A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8rsnarayanan
 

More from rsnarayanan (20)

Walther Aspnet4
Walther Aspnet4Walther Aspnet4
Walther Aspnet4
 
Walther Ajax4
Walther Ajax4Walther Ajax4
Walther Ajax4
 
Kevin Ms Web Platform
Kevin Ms Web PlatformKevin Ms Web Platform
Kevin Ms Web Platform
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnet
 
Walther Mvc
Walther MvcWalther Mvc
Walther Mvc
 
Harish Aspnet Dynamic Data
Harish Aspnet Dynamic DataHarish Aspnet Dynamic Data
Harish Aspnet Dynamic Data
 
Harish Aspnet Deployment
Harish Aspnet DeploymentHarish Aspnet Deployment
Harish Aspnet Deployment
 
Whats New In Sl3
Whats New In Sl3Whats New In Sl3
Whats New In Sl3
 
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
 
Advanced Silverlight
Advanced SilverlightAdvanced Silverlight
Advanced Silverlight
 
Netcf Gc
Netcf GcNetcf Gc
Netcf Gc
 
Occasionally Connected Systems
Occasionally Connected SystemsOccasionally Connected Systems
Occasionally Connected Systems
 
Developing Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And ServicesDeveloping Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And Services
 
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Library
 
Ms Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My SqlMs Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My Sql
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developers
 
What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1
 
Ux For Developers
Ux For DevelopersUx For Developers
Ux For Developers
 
A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8
 

Recently uploaded

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Why Beyond Relational SQL Support Non-Relational Data

  • 1.
  • 2. Praveen Srivatsa Director, AsthraSoft Consulting Microsoft Regional Director, Bangalore Session Code:
  • 3. Why beyond relational? SQL support for non-relational data A large part of the world’s data is non-relational. Think Emails, Pictures, Videos, Chat transcripts, Office docs etc. SQL Server has support for XML and CLR since SQL 2005 FileStream, Spatial and HierarchyID since SQL 2008 Integrated business scenarios Attachments, free text documents, notes, images Medical/Scientific data Geo spatial, location aware data
  • 4. SQL Server 2005 and XML data Native XML data type XML Schema support in database Mapping of SQL Server types to XSD types XQuery support Exposed as methods on XML data type XQuery strings are input to these methods XML Indexes Many improvements to SELECT...FOR XML XML input from file system through BULK data provider .NET XML APIs available through SQLCLR SQLXML functionality ships with database SSIS supports XML input through adapter
  • 5. SQL Server 2008 XML Enhancements Mapping of new date/time data types to XSD types Support for more XML Schema constructs Union and list types Many industry-standard XSD schemas use this Lax validation of xsd:any wildcards Office documents and other XSD schemas use this XQuery support for 'let' clause in FLWOR expressions XML DML supports insert of XML data type
  • 6. Using XML in SQL Server
  • 7. Reliability, Scalability, and Security SQL Server loads the .NET runtime in-process and guarantees reliability/scalability/security .NET 2.0 hosting APIs allow host control All .NET resources managed and tracked by SQL Server .NET 2.0 libraries must be safe to run in SQL Server System assemblies divided into 'safe' and 'unsafe' User code divided into three classifications Safe - in process calls only, code is reliable External - some out of process calls, code is reliable Unsafe - all out of process, reliability not guaranteed
  • 8. User-Defined Operations CLR Supports User Defined Data types, functions, aggregates and table valued functions Scalar UDFs without data access is where .NET excels SQL Server 2008 include types exposed using SQLCLR HierarchyID Geography Geometry
  • 9. TVF and UDA with SQL CLR
  • 10. Filestream storage Storing large binary objects in databases is suboptimal Large objects take buffers in database memory Large objects cause database fragmentation In file system however, quot;updatequot; is delete and insert quot;Before imagequot; in an update is not deleted immediately Storing all related data in a database adds Transactional consistency Integrated, point-in-time backup and restore Single storage and query vehicle
  • 11. SQL Server 2008 Filestream A filegroup for filestream storage is declared using DDL Filestream storage is tied to a database The filegroup is mapped to a directory Must be NTFS file system Caution: Files deleteable from file system if you have appropriate permissions VARBINARY(MAX) columns can be defined with FILESTREAM attribute Table must also have UNIQUEIDENTIFIER column Filestream storage not available for other large types Data is stored in the file system
  • 12. Programming with Filestreams Filestream columns are available with SQL methods If SQL is used, indistinguishable from varbinary(max) Filestream can be accessed and modified using file IO PathName function retrieves a symbolic path name Acquire context with GET_FILESTREAM_TRANSACTION_CONTEXT Use OpenSqlFilestream to get a file handle
  • 14. Hierarchical Data Hierarchical data consists of nodes and edges Hierarchical data can be modeled in relational as Adjacency model - separate column for edge Most common, column can either be in same or separate table Path Enumeration model - column w/hierarchical path Nested Set model - adds quot;leftquot; and quot;rightquot; columns to represent edges, which must be maintained separately
  • 15. SQL Server and Hierarchical Data SQL Server 2005 adds Native Hierarchical Queries Recursive common table expression ANSI-standard Hierarchical Data can be modeled as XML XML data type uses ORDPATH format to store elements, attributes and hierarchical constructs Variable length to 900 bytes Comparable type - can be used as index key
  • 16. SQL Server and Hierarchical Data In SQL 2008, new Built-In Data Type - HierarchyID SQLCLR based system UDT Useable on .NET clients directly as SqlHierarchyId An implementation of path enumeration model Uses ORDPATH internally for speed
  • 17. Working with HierarchyID Nodes can be added with serializable transaction After computing last child UPDATE Org SET @last_child = LastChild = EmployeeId.GetDescendant(LastChild,NULL) WHERE EmployeeId = @mgrid INSERT Org (EmployeeId, EmployeeName) VALUES(@last_child, @EmpName) Node can be added with error detection BEGIN INS_EMP: SELECT @last_child = MAX(EmployeeId) FROM Org_T1 WHERE EmployeeId.GetAncestor(1) = @mgrid INSERT Org_T1 (EmployeeId, EmployeeName) SELECT @mgrid.GetDescendant(@last_child, NULL), @EmpName -- On error, return to INS_EMP to recompute @last_child IF @@error <> 0 GOTO INS_EMP END
  • 19. Spatial Data Spatial data provides answers to location-based queries Which roads intersect the Microsoft campus? Does my land claim overlap yours? List all of the Italian restaurants within 5 kilometers Spatial data is part of almost every database If your database includes an address
  • 20. SQL Server 2008 and Spatial Data SQL Server supports two spatial data types GEOMETRY - flat earth model GEOGRAPHY - round earth model Both types support all of the instanciable OGC types InstanceOf method can distinguish between them Supports two dimension data X and Y or Lat and Long members Z member - elevation (user-defined semantics) M member - measure (user-defined semantics)
  • 21. GEOGRAPHY Requirements GEOGRAPHY type has additional requirements Coordinate order is Latitude/Longitude This will be changed to Longitude/Latitude before RTM Exterior polygon rings must have their describing coordinates in counter-clockwise order (left-hand rule) with interior rings (holes) in clockwise-order (right-hand rule) A single GEOGRAPHY object cannot span more than a logical hemisphere
  • 22. Sample Query Which roads intersect Microsoft’s main campus? SELECT * FROM roads WHERE roads.geom.STIntersects(@ms)=1
  • 24. Beyond relational? Making sense of your data SQL Server stores relational and non-relational data XML and CLR support improves with each release Filestream storage stores BLOBs on file system Buffer, fragmentation savings Spatial data has Library of spatial functions Three standard input and output formats Design all the data for your applications and choose the right model to deploy the data.
  • 25.
  • 26.
  • 27. Related Content Breakout Sessions (session codes and titles) Interactive Theater Sessions (session codes and titles) Hands-on Labs (session codes and titles) Hands-on Labs (session codes and titles)
  • 28. Track Resources Resource 1 Resource 2 Resource 3 Resource 4
  • 29. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.