Sql 2008 For Developers

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Sql 2008 For Developers - Presentation Transcript

    1. MSDN Events Autumn, 2008 Building Applications with SQL Server 2008
    2. What Will We Cover? • SQL Server Spatial support • T-SQL Enhancements • Visual Studio integration • SQL CLR • Reporting Services
    3. Helpful Experience • SQL Server database development • .NET Framework application development • Visual Studio 2008 • Windows Presentation Foundation • ASP.NET • Microsoft Virtual Earth • OpenGIS
    4. Agenda • SQL Server 2008 – New features – Enhancements – Programming • Demos!
    5. 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
    6. 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”)
    7. 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
    8. 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
    9. 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
    10. Demo SQL Server Geospatial and Virtual Earth
    11. Enhancements to T-SQL • Table Value Parameters • New Date/Time types • Time zone awareness • New MERGE keyword • New shorthand notation
    12. 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
    13. Dates and Time • Several new types added – datetime2 – date – time – datetimeoffset • New functions added – CONVERT – SYS* Functions – DATEDIFF
    14. 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
    15. 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
    16. Demo T-SQL Enhancements
    17. Visual Studio Integration • Enhanced project types – Analysis Services – Reporting Services • Entity Framework
    18. 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
    19. Demo Visual Studio Integration
    20. 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
    21. 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
    22. 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
    23. Demo SQL CLR
    24. 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)
    25. 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
    26. Demo Reporting Services
    27. For More Information • Visit MSDN at msdn.microsoft.com
    28. Microsoft Press Publications For the latest titles, visit www.microsoft.com/learning/books/devtools
    29. Non-Microsoft Publications These books can be found and purchased at all major book stores and online retailers
    30. 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

    + mithundmithund, 2 years ago

    custom

    1302 views, 0 favs, 2 embeds more stats

    This slide deck is for Developers who are intereste more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1302
      • 1288 on SlideShare
      • 14 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 77
    Most viewed embeds
    • 13 views on http://blogs.msdn.com
    • 1 views on http://www.brijj.com

    more

    All embeds
    • 13 views on http://blogs.msdn.com
    • 1 views on http://www.brijj.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories