• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Sql 2008 For Developers

Sql 2008 For Developers



This slide deck is for Developers who are interestedin learning what is new in SQL 2008

This slide deck is for Developers who are interestedin learning what is new in SQL 2008



Total Views
Views on SlideShare
Embed Views



3 Embeds 18

http://blogs.msdn.com 16
http://www.brijj.com 1
http://www.slideshare.net 1



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Sql 2008 For Developers Sql 2008 For Developers Presentation Transcript

    • MSDN Events Autumn, 2008 Building Applications with SQL Server 2008
    • What Will We Cover? • SQL Server Spatial support • T-SQL Enhancements • Visual Studio integration • SQL CLR • Reporting Services
    • Helpful Experience • SQL Server database development • .NET Framework application development • Visual Studio 2008 • Windows Presentation Foundation • ASP.NET • Microsoft Virtual Earth • OpenGIS
    • Agenda • SQL Server 2008 – New features – Enhancements – Programming • Demos!
    • What is Spatial Data? • Spatial data represents locations – Which properties overlap? – 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 when making calculations • Flat Earth model • X, Y coordinates – Geography: large areas where the curvature of the Earth does matter when making calculations • Round Earth model • Latitude and longitude coordinates
    • What is Spatial Data? • You query for location information as you would any SQL Server data type – Data types dictated by the OpenGIS standard – Calculations easy to perform (“black box”)
    • Representing Spatial Data • Geospatial data in SQL Server – Stored in a proprietary binary format – Can be input using simple text • Parse methods exist to convert the text into the internal storage format – Represents areas using • Points • Linestrings • Polygons • MultiPoints • MultiLinestrings • MultiPolygons • GeomCollections
    • Representing Spatial Data • Polygonal areas must be defined in counter-clockwise direction – Interior areas (“holes”) must be defined in clockwise direction • Inherently support various calculations and methods – 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
    • Demo SQL Server Geospatial and Virtual Earth
    • 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 – Multiple tables can be inserted/updated within a single transaction – MARS-like capability for writing • ADO.NET updated to include support – New parameter type: SqlDbType.Structured
    • 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! – Be sure to review SQL Server Books Online for more 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
    • Demo T-SQL Enhancements
    • Visual Studio Integration • Enhanced project types – Analysis Services – Reporting Services • Entity Framework
    • 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
    • Demo 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 • 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
    • Programming SQL CLR • 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
    • Demo 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 • Reports are exposed via a Web Service – Can be integrated with SharePoint – Dependency on IIS removed (uses http.sys)
    • Programming Reports • Strong designer and wizard support in Visual Studio • Enhanced configuration and administration tool • 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 • Wizard available for initial report design
    • Demo Reporting Services
    • For More Information • Visit MSDN at msdn.microsoft.com
    • Microsoft Press Publications For the latest titles, visit www.microsoft.com/learning/books/devtools
    • Non-Microsoft Publications These books can be found and purchased at all major book stores and online retailers
    • RAMP-UP Are you ready to take your career as a developer to the next level? Looking for a learning experience that is designed for you? Join MSDN Ramp Up and Summit Your Career! MSDN Ramp Up is your online source that provides free training and technical resources to help take your development skills to the next level. • Step-by-Step training plans to build your development skills. • Premium technical content created by expert developers for developers. • Access to valuable online e-learning, e-references, and virtual labs. • 50% discount on select certification exams and 30% discount on Microsoft Press training kits. Join Ramp Up for free today! Go to: http://msdn.microsoft.com/rampup