Building Applications with SQL Server 2008 Lynn Langit http://blogs.msdn.com/SoCalDevGal
What Will We cover? SQL Server Spatial support T-SQL Enhancements Visual Studio integration SQL CLR Reporting Services
What is Spatial Data? Spatial data represents locations Which roads intersect property or each other? How many stores/restaurants/houses/car dealerships are located within a geographical area? Represented by two primary data types Geometry : small areas where curvature of the Earth isn’t so relevant Flat Earth model or X, Y coordinates Geography : large areas where the curvature of the Earth does matter Round Earth model or Latitude and longitude coordinates You query for location information as you would any SQL Server data type Data types dictated by the OpenGIS standard
Representing Spatial Data Stored in proprietary binary format Can be input using simple text ( Parse methods convert text into internal storage format) Represents areas using Points, Line strings, Polygons Multi Points, Multi Line strings, Multi Polygons Geom Collection Areas must be defined in counter-clockwise direction, but Interior areas (“holes”) must be defined in clockwise direction Spatial Reference ID (SRID) identifies ellipsoid used (flat/round, meters/feet) Only instances with like SRID can be directly compared
Geographical Data GEOGRAPHY type has additional requirements Coordinate order is longitude/latitude A single GEOGRAPHY object cannot span more than a logical hemisphere Will throw exceptions if too large
SQL Server Geospatial and Virtual Earth
Geo Spatial Links Practical uses for Geospatial data  Series on use of Geospatial data in SQL Server 2008 OpenGIS standards OGC Methods on Geography Instances OGC Methods on Geometry Instances
Enhancements to T-SQL Table Value Parameters New Date/Time types Time zone awareness New MERGE keyword New shorthand notation
Table Value Parameters TVPs are used to insert/update multiple tables at one time MARS-like capability for writing ADO.NET updated to include support New parameter type: SqlDbType.Structured MSDN documentation
Dates and Time Several new types added datetime2 date time datetimeoffset New functions added CONVERT SYS* Functions DATEDIFF
MERGE MERGE allows for insert, update, delete with one keyword Merge two tables,  source  and  target Target table will be modified based on contents of source table Syntax and use can be complex! Review  BOL  for details
Shorthand Notation Allows you to declare a variable and assign a value in one line of code More like contemporary programming languages, C# or Visual Basic .NET
T-SQL Enhancements
Visual Studio Integration Enhanced project types SQL CLR Database projects Analysis Services OLAP cubes  Data Mining Structures Integration Services Reporting Services
Entity Framework Essentially an OR/M tool Models relational data using entities Can model any relational data source for data access (provider may be required) Application-specific domain You can work at a higher level of abstraction Appropriate amount of information returned Lazy-loaded What is an entity? Structurally like an object Has scalars and relationships Has identity Represent nouns in your application domain Not tied specifically to SQL Server
Architecture
Visual Studio Integration
SQL CLR SQL Server has the ability to execute managed code Stored procedures Functions Aggregates Table value functions User-defined types Triggers Visual Studio can manage both creation and deployment SQL CLR is “off by default” for security reasons Must activate per database to enable Can be remotely debugged With great power comes great responsibility Your code executes in the SQL Server processing stream
Programming SQL CLR Visual Studio provides templates for the various SQL CLR constructs Uses Database project type Simply “add new” like any other item you might add Metadata controls SQL Server behavior Attributes control programmatical type Microsoft.SqlServer.Server.SqlProcedure Microsoft.SqlServer.Server.SqlFunction Microsoft.SqlServer.Server.SqlUserDefinedAggregate Microsoft.SqlServer.Server.SqlTrigger Microsoft.SqlServer.Server.SqlUserDefinedType You write your logic using a .NET-supported language You work with other objects in the  Microsoft.SqlServer.Server  namespace to retrieve and return data Very ADO.NET-like, but not ADO.NET Can be assigned security levels Safe, External, Unsafe
SQL CLR
Reporting Services SQL Server standard for reporting Managed enterprise reporting / Ad-hoc reporting / Embedded reporting / Web-based reporting Reports can be formatted in a variety of ways PDF / Word 2007 / HTML, custom Reports are exposed via a Web Service Can be integrated with SharePoint Dependency on IIS removed (uses http.sys) Strong designer and wizard support in Visual Studio Can also use Report Builder Enhanced configuration and administration tool SSRS available in SQL Server Express 2008 w/Adv Services
Programming Reports Design reports in Visual Studio 2008 SP1 Query for data Assign query results to report Design report style Colors Fonts Deploy report Web Service SharePoint Services Report Viewer control in Visual Studio Wizard available for initial report design
Reporting Services
For More Information blogs.msdn.com/SoCalDevGal www.microsoft.com/sql Pre-order it now
Surprise! Only for attendees of TechDays!

More Related Content

PDF
ZWCAD vs AutoCAD
PPTX
ADF Mapping Data Flows Level 300
PPTX
Using FME to support open data initiatives and INSPIRE
PPT
PPTX
Arc2Earth - ESRI NYC Dev Meetup
PDF
Amazon Redshift For Data Analysts
PDF
Read/write Oracle, Sharepoint and SQL Data in Salesforce Without Writing Code
PDF
Deep dive into the native multi model database ArangoDB
ZWCAD vs AutoCAD
ADF Mapping Data Flows Level 300
Using FME to support open data initiatives and INSPIRE
Arc2Earth - ESRI NYC Dev Meetup
Amazon Redshift For Data Analysts
Read/write Oracle, Sharepoint and SQL Data in Salesforce Without Writing Code
Deep dive into the native multi model database ArangoDB

Viewers also liked (20)

PDF
Multidimensional model programming
PPTX
Sql Server Data Tools - Codenamed JUNEAU
PPTX
Sql server ___________session3-normailzation
PPT
Module08
DOC
Css introduction
PPTX
Alasql.js - SQL сервер на JavaScript
PDF
X query language reference
PPT
Module07
PDF
Multi-thematic spatial databases
PDF
Spatialware_2_Sql08
PPT
Module04
PPTX
Alasql - база данных SQL на JavaScript (MoscowJS)
PPT
Module01
PPTX
SQL Server 2008 Spatial Data - Getting Started
PPT
Module03
PPT
Module05
PDF
Transact sql data definition language - ddl- reference
PDF
High Performance Front-End Development
PPT
SQL Server 2008 for .NET Developers
PPT
Module02
Multidimensional model programming
Sql Server Data Tools - Codenamed JUNEAU
Sql server ___________session3-normailzation
Module08
Css introduction
Alasql.js - SQL сервер на JavaScript
X query language reference
Module07
Multi-thematic spatial databases
Spatialware_2_Sql08
Module04
Alasql - база данных SQL на JavaScript (MoscowJS)
Module01
SQL Server 2008 Spatial Data - Getting Started
Module03
Module05
Transact sql data definition language - ddl- reference
High Performance Front-End Development
SQL Server 2008 for .NET Developers
Module02
Ad

Similar to SQL Server 2008 for Developers (20)

PDF
Sql 2008 For Developers
PPT
SQL Server 2008 for Developers
PPT
Tech Days09 Sqldev
PPT
Building Applications for SQL Server 2008
PPT
SQL Server 2008 for Developers
PDF
Sql Server2008
PPT
Sql Server 2008 Features
PPT
What's New for Developers in SQL Server 2008?
PPT
SQL Server 2008 Overview
PDF
SQL Server 2008 Highlights
PPTX
Dev Sql Beyond Relational
PPTX
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
DOCX
Sql server 2008 r2 programmability datasheet
PPTX
Microsoft SQL Server 2012
PPTX
Sql server lesson5
PPT
Introduction to Threading in .Net
PPT
New Features Sql 2008
PDF
SQL-Server Database.pdf
PDF
SQL Server 2008 New Features
DOCX
Sql server 2008 r2 spatial data whitepaper
Sql 2008 For Developers
SQL Server 2008 for Developers
Tech Days09 Sqldev
Building Applications for SQL Server 2008
SQL Server 2008 for Developers
Sql Server2008
Sql Server 2008 Features
What's New for Developers in SQL Server 2008?
SQL Server 2008 Overview
SQL Server 2008 Highlights
Dev Sql Beyond Relational
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
Sql server 2008 r2 programmability datasheet
Microsoft SQL Server 2012
Sql server lesson5
Introduction to Threading in .Net
New Features Sql 2008
SQL-Server Database.pdf
SQL Server 2008 New Features
Sql server 2008 r2 spatial data whitepaper
Ad

More from llangit (20)

PPTX
3 App Compat Win7
PPTX
2 Win7 For Devs Ux Touch Sensors
PPTX
1 Win7 For Devs Fund Search
PPTX
3 Kodu
PPTX
5 Digigirlz Xna
PPTX
4 Making Movies
PPTX
2 Digi Girlz Small Basic
PPTX
1 Digi Girlz So Cal Databases Kims Final
PPT
SQL Server 2008 Data Mining
PPT
SQL Server 2008 Data Mining
PPT
Windows Azure for .NET Developers
PPT
Introduction To Sql Services
PPT
Making of GirlGamer
PPT
Kodu
PPT
DigiGirlz_SoCal_Databases
PPT
DigiGirlzSmallBasic
PPT
Bi2008 Plus Cloud Preview
PPT
The Role Of An Architect
PPT
Parallel Programming and F#
PPT
BI in SQL Server 2008 for Architects
3 App Compat Win7
2 Win7 For Devs Ux Touch Sensors
1 Win7 For Devs Fund Search
3 Kodu
5 Digigirlz Xna
4 Making Movies
2 Digi Girlz Small Basic
1 Digi Girlz So Cal Databases Kims Final
SQL Server 2008 Data Mining
SQL Server 2008 Data Mining
Windows Azure for .NET Developers
Introduction To Sql Services
Making of GirlGamer
Kodu
DigiGirlz_SoCal_Databases
DigiGirlzSmallBasic
Bi2008 Plus Cloud Preview
The Role Of An Architect
Parallel Programming and F#
BI in SQL Server 2008 for Architects

Recently uploaded (20)

PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PPTX
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx
PPTX
Microsoft User Copilot Training Slide Deck
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
PDF
LMS bot: enhanced learning management systems for improved student learning e...
PPTX
Internet of Everything -Basic concepts details
PPTX
Module 1 Introduction to Web Programming .pptx
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
SaaS reusability assessment using machine learning techniques
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
Data Virtualization in Action: Scaling APIs and Apps with FME
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx
Microsoft User Copilot Training Slide Deck
Lung cancer patients survival prediction using outlier detection and optimize...
giants, standing on the shoulders of - by Daniel Stenberg
sbt 2.0: go big (Scala Days 2025 edition)
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
LMS bot: enhanced learning management systems for improved student learning e...
Internet of Everything -Basic concepts details
Module 1 Introduction to Web Programming .pptx
MuleSoft-Compete-Deck for midddleware integrations
SaaS reusability assessment using machine learning techniques
NewMind AI Weekly Chronicles – August ’25 Week IV
Rapid Prototyping: A lecture on prototyping techniques for interface design
Convolutional neural network based encoder-decoder for efficient real-time ob...
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
Custom Battery Pack Design Considerations for Performance and Safety

SQL Server 2008 for Developers

  • 1. Building Applications with SQL Server 2008 Lynn Langit http://blogs.msdn.com/SoCalDevGal
  • 2. What Will We cover? SQL Server Spatial support T-SQL Enhancements Visual Studio integration SQL CLR Reporting Services
  • 3. What is Spatial Data? Spatial data represents locations Which roads intersect property or each other? How many stores/restaurants/houses/car dealerships are located within a geographical area? Represented by two primary data types Geometry : small areas where curvature of the Earth isn’t so relevant Flat Earth model or X, Y coordinates Geography : large areas where the curvature of the Earth does matter Round Earth model or Latitude and longitude coordinates You query for location information as you would any SQL Server data type Data types dictated by the OpenGIS standard
  • 4. Representing Spatial Data Stored in proprietary binary format Can be input using simple text ( Parse methods convert text into internal storage format) Represents areas using Points, Line strings, Polygons Multi Points, Multi Line strings, Multi Polygons Geom Collection Areas must be defined in counter-clockwise direction, but Interior areas (“holes”) must be defined in clockwise direction Spatial Reference ID (SRID) identifies ellipsoid used (flat/round, meters/feet) Only instances with like SRID can be directly compared
  • 5. Geographical Data GEOGRAPHY type has additional requirements Coordinate order is longitude/latitude A single GEOGRAPHY object cannot span more than a logical hemisphere Will throw exceptions if too large
  • 6. SQL Server Geospatial and Virtual Earth
  • 7. Geo Spatial Links Practical uses for Geospatial data Series on use of Geospatial data in SQL Server 2008 OpenGIS standards OGC Methods on Geography Instances OGC Methods on Geometry Instances
  • 8. Enhancements to T-SQL Table Value Parameters New Date/Time types Time zone awareness New MERGE keyword New shorthand notation
  • 9. Table Value Parameters TVPs are used to insert/update multiple tables at one time MARS-like capability for writing ADO.NET updated to include support New parameter type: SqlDbType.Structured MSDN documentation
  • 10. Dates and Time Several new types added datetime2 date time datetimeoffset New functions added CONVERT SYS* Functions DATEDIFF
  • 11. MERGE MERGE allows for insert, update, delete with one keyword Merge two tables, source and target Target table will be modified based on contents of source table Syntax and use can be complex! Review BOL for details
  • 12. Shorthand Notation Allows you to declare a variable and assign a value in one line of code More like contemporary programming languages, C# or Visual Basic .NET
  • 14. Visual Studio Integration Enhanced project types SQL CLR Database projects Analysis Services OLAP cubes Data Mining Structures Integration Services Reporting Services
  • 15. Entity Framework Essentially an OR/M tool Models relational data using entities Can model any relational data source for data access (provider may be required) Application-specific domain You can work at a higher level of abstraction Appropriate amount of information returned Lazy-loaded What is an entity? Structurally like an object Has scalars and relationships Has identity Represent nouns in your application domain Not tied specifically to SQL Server
  • 18. SQL CLR SQL Server has the ability to execute managed code Stored procedures Functions Aggregates Table value functions User-defined types Triggers Visual Studio can manage both creation and deployment SQL CLR is “off by default” for security reasons Must activate per database to enable Can be remotely debugged With great power comes great responsibility Your code executes in the SQL Server processing stream
  • 19. Programming SQL CLR Visual Studio provides templates for the various SQL CLR constructs Uses Database project type Simply “add new” like any other item you might add Metadata controls SQL Server behavior Attributes control programmatical type Microsoft.SqlServer.Server.SqlProcedure Microsoft.SqlServer.Server.SqlFunction Microsoft.SqlServer.Server.SqlUserDefinedAggregate Microsoft.SqlServer.Server.SqlTrigger Microsoft.SqlServer.Server.SqlUserDefinedType You write your logic using a .NET-supported language You work with other objects in the Microsoft.SqlServer.Server namespace to retrieve and return data Very ADO.NET-like, but not ADO.NET Can be assigned security levels Safe, External, Unsafe
  • 21. Reporting Services SQL Server standard for reporting Managed enterprise reporting / Ad-hoc reporting / Embedded reporting / Web-based reporting Reports can be formatted in a variety of ways PDF / Word 2007 / HTML, custom Reports are exposed via a Web Service Can be integrated with SharePoint Dependency on IIS removed (uses http.sys) Strong designer and wizard support in Visual Studio Can also use Report Builder Enhanced configuration and administration tool SSRS available in SQL Server Express 2008 w/Adv Services
  • 22. Programming Reports Design reports in Visual Studio 2008 SP1 Query for data Assign query results to report Design report style Colors Fonts Deploy report Web Service SharePoint Services Report Viewer control in Visual Studio Wizard available for initial report design
  • 24. For More Information blogs.msdn.com/SoCalDevGal www.microsoft.com/sql Pre-order it now
  • 25. Surprise! Only for attendees of TechDays!

Editor's Notes

  • #2: Hello and Welcome to this MSDN session on “Building Applications with SQL Server2008