Microsoft Data Access Technologies
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Microsoft Data Access Technologies

on

  • 5,282 views

Joe Shirey's deck delivered at 2009Q4 Microosft Architect Council events

Joe Shirey's deck delivered at 2009Q4 Microosft Architect Council events

Statistics

Views

Total Views
5,282
Views on SlideShare
5,261
Embed Views
21

Actions

Likes
1
Downloads
122
Comments
1

2 Embeds 21

http://www.slideshare.net 13
http://blogs.msdn.com 8

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…
  • Great !!!!!! Really helpful.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Microsoft Data Access Technologies Presentation Transcript

  • 1. Data Access
    joe.shirey@microsoft.com
    http://www.joeshirey.com
  • 2. Data Access Technologies
    DataSet/DataReader
    nHibernate
    LINQ to SQL
    Entity Framework
    ADO.NET Data Services
  • 3. Layered Architecture
    UI
    UI
    UI
    Domain Model
    Business Logic
    Data Access / Persistence Layer
    Database
  • 4. Client
    Client
    DataSet
    DataReader
    Managed
    Data
    Provider
    IDataReader
    IDbDataAdapter
    IDbConnection
    IDbCommand
    ADO.NET 1.x Architecture
  • 5. DataSet
    CRUD based operations
    Strongly typed datasets
    Can be databound
    Supports offline disconnected operations with change tracking
    Rapid prototyping
    Database support via provider model
    Difficult object model
  • 6. DataReader
    Rapid, forward-only, read-only cursor
    High Performance
    Customized data access layers, CRUD operations
    Database support via provider model
    Map results to custom types
    Third-party tools available for code generation
    Connected scenarios only
  • 7. nHibernate
    Port of the Java Hibernate project
    Available in .NET 1.1, 2.0, 3.0, 3.5
    Support of many databases
    SQL Server, Oracle, DB2, SQLite, PostgreSQL, MySQL, Firebird, …
    XML based mapping and configuration
    LGPL licensed
    No designer, LINQ support
  • 8. ADO.NET 3.5 Technologies
    ADO.NET 3.5
    Language Integrated Query (LINQ)
    LINQ features except for LINQ to Entities
    ADO.NET 3.5 + SP1
    Entity Framework and the Entity Designer
    Entity SQL and LINQ to Entities
    Provider support for SQL 2008 features (extensible)
  • 9. LINQ Architecture
    .NET Language Integrated Query (LINQ)
    LINQ enabled data sources
    LINQ enabled ADO.NET
    LINQ
    To XML
    LINQ
    To Entities
    LINQ
    To SQL
    LINQ
    To DataSet
    LINQ
    To Objects
    XML
    Relational
    Objects
    <book>
    <title/>
    <author/>
    <price/>
    </book>
  • 10. LINQ to SQL
    SQL Server only, no provider model
    Friendly syntax for mapping tables to objects with full CRUD functionality
    High performance data access layer with data binding
    Code gen with schema-based entities
    Limited support for mapping between storage and entity model (table focused)
    Designer support
  • 11. Entity Framework
    More of a true Object/Relational (O/R) Mapping Tool
    Designer Support to create a custom map between data tables and domain model
    Is a Data Access Layer
    Supports code generation with schema-based entity mapping
    Provider model to support multiple databases
  • 12. O/R Mapper Support
  • 13. New in ADO.NET Entity Framework 4.0
    Model-first development
    Automatic pluralization
    Foreign keys in models
    POCO class support
    Lazy loading
    T4 Code Generation
    Template customization
    IObjectSet
    Virtual SaveChanges
    ObjectStateManagercontrol
    Self-tracking entities
    SQL generation improvements
    More LINQ operator support
    LINQ extensibility
    ExecuteStoreQuery
    ExecuteStoreCommand
    SPROC import improvements
    Model defined functions
    WPF designer integration
    Code-Only development (Feature CTP)
  • 14. DemoEntity Framework 4.0
  • 15. Multiple Approaches with EF 4.0
    Start with the database
    “Database is the truth”
    Why? It already exists, or you want low level control over the database
    What? Import model into EDMX and tweak
    Start with an EDMX model
    “EDMXis the truth”
    Why? You want separation from code and database in a declarative format
    What? Create a model and tweak
    Start with .NET classes
    “Code is the truth”
    Why? Primarily focused on code shape, database is an implementation detail
    What? Define classes in code, adjust shape using contextbuilder
  • 16. ADO.NET WCF Data Services
    Formerly called “Astoria”
    RESTful data services based on WCF
    Relies on HTTP GET, POST, PUT, DELETE verbs to implement API
    Very easy to expose any IQueryable data with a fully functional RESTful interface
    Uniform pattern for data access regardless of data source
    Particularly useful for exposing data to JavaScript clients
  • 17. OData: Open Data Protocol
    OData Consumers
    OData Producers
    OData Protocol
    .NET Framework
    Excel/PowerPivot
    Sharepoint
    Visual Studio
    Sharepoint Services
    .NET Framework
    SQL Server Reporting Services
    Silverlight
    Windows Azure Table Storage
    Javascript/AJAX
    Codename “Dallas”
    PHP
    Java
    ODGI
  • 18. Recommendations
    LINQ to SQL
    SQL Server only scenarios
    Simple table to object mappings
    nHibernate
    Pre .NET 3.5 limitations
    .NET 3.5 SP1 complex table/object mappings
    Database support beyond SQL Server
    Entity Framework
    3.5 SP1 with moderate table/object mappings
    4.0 scenarios
    POCO mappings desired
    Offline and change tracking
  • 19. Recommendations
    WCF Data Services
    Access to data primarily not methods
    Wrapping EF for standard data access
    RESTful services that mainly CRUD based
    Protect against future changes
    Support for both web and RIA applications
  • 20. Data Access
    joe.shirey@microsoft.com
    http://www.joeshirey.com