Entity Framework from a database perspective Mattias Lind, MCT & MVP Data Platform
First session I know it’s really early on a Saturday morning, but the great thing is that we have a full day ahead. If it’s been a Sunday morning, the logo in the bottom, right corner would have been wrong. It’s really awesome to have SQL Saturday today, and I’m looking forward to this. Did you know there’s another SQL Saturday today as well, in Johannesburg, South Africa. Anyway, I’m really happy being here and I hope you are excited about all the good content we have here today. I have already planned for what sessions I’m heading to after this session. So I guess we should get started. Have you been reading this slide? This slide is intentionally not left blank. If you have been reading this far, please giggle a bit. If you hear someone giggle before you, giggle harder. When all of you are laughing I’m changing the slide. If you still not laughing you probably think this slide is silly, and it is!
Without Our sponsors we wouldn’t be here!
Thank you Sponsors!
Mattias Lind A bit about me... @SoQooL mattias.lind@sogeti.se blog.mssqlserver.se Agenda Entity Framework Database Design Demo Sogeti * 2014 MVP * 2011 MCT * 2001 SQL * 1995 IT * 1992 BASIC * 1982 Birth * 1972
Entity Framework ORM for .Net Entities, Attributes, Relationships Currently 6.1.3 EF Core Complete rebuild Still beta (I hope so anyways...) Huge backlog Looks promising https://github.com/aspnet/EntityFramework/wiki/Roadmap Library Package Manager Console Install-Package EntityFramework
Entity Framework Two layers Model Object
Entity Framework The Model Layer Conceptual Logical Model Physical Database Schema Mapping between Logical and Physical
Entity Framework The Object Layer Run queries against the conceptual model. Materialize data as objects. Track changes to the objects. Propagate changes to the data source. Bind objects to controls.
Entity Framework Methodology Database First Model First Code First
Reality check! Developers tend to like Code First DBAs tend to like Database First Architects tend to like Model First
Just a small commercial break! Give the sponsors an applause!
Demo MVC ASP.Net with C# in VS2015 Code First Add data types and procedures
SQL Server Relational Database Management System Latest version 2016 Awesome features In-Memory OLTP
Physical Database Data file Filegroup Log file Rows Pages Extents Transactions Checkpoints
Logical Objects Database Schema Table Index View Function Procedure Trigger
Database Modelling/Design Logical/Physical model Normalization/Generalization/Denormalization Symmetric/Predictable Performance enabling Security enhancing
In-Memory OLTP Introduced in SQL Server 2014 Enterprise Row store, no pages Persisting/Non-persisting Based on FileStream No locking/Versioning Indexes only in RAM Fast, faster, fastest Natively compiled Transparent, (almost) no change in code
Common Sense Need Future Benefits Challenges
Demo MVC ASP.Net with C# in VS2015 Code First Add data types and procedures Remodel the database To disk based tables To In-Memory OLTP with natively stored procedures (If time permits we can do this live!)
Conclusion Entity Framework adds possibilities A full abstraction layer should also consist of supporting database objects Procedures, views and functions are still cool In-Memory OLTP can add extreme performance possibilities Use common sense
Mattias Lind Thank YOU... Stay in touch... @SoQooL mattias.lind@sogeti.se blog.mssqlserver.se or just google -> Mattias SQL Sogeti * 2014 MVP * 2011 MCT * 2001 SQL * 1995 IT * 1992 BASIC * 1982 Birth * 1972 Thank YOU...
Session Evaluations Sponsor Raffles After Party Don't forget… Session Evaluations Sponsor Raffles After Party
Thank you to our sponsors!
Mattias Lind Thank YOU... Stay in touch... @SoQooL mattias.lind@sogeti.se blog.mssqlserver.se or just google -> Mattias SQL Sogeti * 2014 MVP * 2011 MCT * 2001 SQL * 1995 IT * 1992 BASIC * 1982 Birth * 1972 Thank YOU...