SQL Server 2008 for Developers
Upcoming SlideShare
Loading in...5
×
 

SQL Server 2008 for Developers

on

  • 5,878 views

Slides from my talk on SQL Server 2008 for developers at OC Tech Days November 2008

Slides from my talk on SQL Server 2008 for developers at OC Tech Days November 2008

Statistics

Views

Total Views
5,878
Views on SlideShare
5,781
Embed Views
97

Actions

Likes
4
Downloads
286
Comments
0

3 Embeds 97

http://blogs.msdn.com 81
http://www.slideshare.net 15
http://myexpwithbitsandbytes.blogspot.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

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.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Hello and Welcome to this MSDN session on “Building Applications with SQL Server2008

SQL Server 2008 for Developers SQL Server 2008 for Developers Presentation Transcript

  • 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!