Download - SQL Modeling Services M
![Page 1: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/1.jpg)
SQL Modeling ServicesM
![Page 2: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/2.jpg)
FBCS, CEngSenior ArchitectBlack Marble LTD
Robert Hogg
![Page 3: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/3.jpg)
THE “OSLO” BACK STORY
![Page 4: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/4.jpg)
“Oslo” 2007: Multi-year, Multi-product vision
![Page 5: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/5.jpg)
“Oslo” 2008: Modeling Platform
![Page 6: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/6.jpg)
“Oslo” 2009: SQL Server Modeling
![Page 7: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/7.jpg)
A LAP AROUND MODELING
![Page 8: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/8.jpg)
What is a Model?A DESCRIPTION OF A GIVEN DOMAIN
MODEL-ASSISTEDModels used to understand or manipulate code Examples: Static Structure, Sequence, …
DRAWINGSModels used to communicate with othersExamples: Dataflow, Use Case, …
MODEL-DRIVENModels executed by runtimes directlyExamples: HTML, CSS, XAML, BPEL, …
![Page 9: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/9.jpg)
Model-driven Platform
COM (+)midl.exe
[Transaction]
DECLARATIVE CONTENT
TIME
.NET 1.0[YourAttributeHere]
app.config
Web Serviceswsdl:definitions
xsd:schema
.NET 3.0wf:StateMachine
wpf:ContentControl
![Page 10: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/10.jpg)
Model-driven Applications
Textual domain specific language (CAML) Visual designer (SharePoint Designer)
Application definition stored in database
Textual domain specific language (X++) Visual designer (MorphX)
Application definition stored in database
![Page 11: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/11.jpg)
Why is this happening?TRANSPARENCYBetter understanding of your application
FLEXIBLITYFaster changes to your application
PRODUCTIVITY“More essence, less ceremony”
![Page 12: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/12.jpg)
SQLServer
SQLAzure
Visual Studio “Quadrant”
SQL Server Modeling Services
Entity Framework
ADO.NET “M”/EDM
Data Services
…
Data and Modeling
![Page 13: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/13.jpg)
What is "SMS"?THE PLATFORM FOR MODEL-DRIVEN APPLICATIONS
SQL Server Modeling Services Model store
“Quadrant”Modelling tool
“M”Modelling language
![Page 14: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/14.jpg)
Key "SMS" Concepts
MODELS
TEXTUAL DSLs
VISUAL DSLs RUNTIMES
![Page 15: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/15.jpg)
“QUADRANT”
CompositionGeneric Viewers
Dataflow
EDITORFRAMEWORK
[Your Visual DSL]
[Your Textual DSL]
MSchemaMGrammar
MGraph
LANGUAGEFRAMEWORK
[Your Models]Base Models“M” Runtime
REPOSITORYSQL SERVER
[Your Models]Base Models“M” Runtime
REPOSITORYSQL SERVER
"SMS" Architecture
RUNTIMES[Your Runtime]
“Dublin”ASP.NET
WFWCF
SQL/EDMWindowsOther ISV Runtimes
ADO .NET
XML, Custom Formats, …[Your Models].Net Models
Repository Models
REPOSITORYSQL SERVER
OTHER TOOLS
(VSTS, EXCEL, …)
XML, Custom Formats, …
![Page 16: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/16.jpg)
ONE TRUTH
![Page 17: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/17.jpg)
SQL SERVER MODELING SERVICES
![Page 18: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/18.jpg)
Repository Capabilities• Repository features are built on SQL Server– Repository install also turns on useful features, e.g.
replication and mirroring
system catalog, Change Data Capture,replication, SSIS, mirroring, security, etc.
SQL ServerFeatures
Repository catalog, secure views, auditing,versioning, claims-based security, glob/loc, etc.
RepositoryFeatures
![Page 19: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/19.jpg)
QUADRANT
![Page 20: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/20.jpg)
What is "Quadrant"?• Graphical tool used for managing instance
models– Targeted at architects and business analysts
• Loads model definitions from repository database– Allows management of instances– Changes are saved to database immediately
![Page 21: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/21.jpg)
Quadrant Modelling Tool
![Page 22: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/22.jpg)
REPOSITORY
SHELL AND SURFACESERVICES COMPOSITIONENGINE
NestingSizingLayoutSnapping
"Quadrant" Architecture
Core ServicesUndo/RedoCommandsDrag/DropSelectionActivationError HandlingGeneral ServicesSearchValidationAnnotationsRelationship Highlighting
DATAFLOW ENGINECaching,Virtualization,Change tracking, andNotification
Target Data
View StateConfiguration
![Page 23: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/23.jpg)
THE MODELLING LANGUAGE
![Page 24: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/24.jpg)
Why “M”?• Interacting with Oslo content needs to be
simple and natural• Textural based modelling language
![Page 25: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/25.jpg)
What Is “M”?• “M” is a language for defining domain models and
textual domain-specific languages (DSLs)• M domain models define schema and query over
structured data– Values, Constraints, and Views– Natural projection to SQL
• M DSLs define projections from Unicode text to structured data– Rule-based transformation– Grammar-driven text editor integration
![Page 26: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/26.jpg)
codename “m”: a language for data
“M”
EDMXSpecification
T-SQLSpecification
Grammar Specification
![Page 27: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/27.jpg)
The "M" LanguageDSL
"M"
Domain-specific grammars
Abstract data model
Domain-specific data models
language PointLanguage { syntax Main = h:Integer "," v:Integer => Point { X { h }, Y { v }};}
type Point { X : Integer; Y : Integer;}
Point { X { 100 }, Y { 200 } }
Point.mDomain Model
DSLY
DomainY.mgDomain Grammar
DSLX DomainX.mDomain Model
DomainY.mDomain Model
DomainX.mgDomain Grammar
PointLanguage.mgDomain Grammar
MSchema
MGrammar
MGraph
![Page 28: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/28.jpg)
“M” Language Example// Module: Used to scope model definitionsmodule Test.TimeReport{ // Type: Defines employee data structure type Employee { Id : Integer32 FirstName : Text where value.Count <= 100; LastName : Text where value.Count <= 100; } // Extent: Contains zero or more employees Employees : Employee*;}
MSchema is used to model data structures, storage, views and constraints
![Page 29: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/29.jpg)
Using “M” to Model a Database
• Once they’re in the database, it’s just SQL• “TSQL can be used to create repository structure or standard
database structure– Repository TSQL is more complex
// Module: Used to scope model definitionsmodule Test.TimeReport{ // Type: Defines employee data structure type Employee { FirstName : Text where value.Count <=
100; LastName : Text where value.Count <= 100; }
// Extent: Contains zero or more employees
Employees : Employee*;}
create table[Test.TimeReport].[Employees]( [FirstName] nvarchar(100)
not null, [LastName] nvarchar(100)
not null,);go
Compile
![Page 30: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/30.jpg)
“M” Code
“M” Command-Line Tools
Modeling Services Database
System_Runtim
eMicr
osoft.U
ml2
System.Identity
BDL
Your Models
![Page 31: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/31.jpg)
What “M” Is Not• An object-oriented language– No polymorphism, virtual dispatch– “Is-a” determined based on structural subtyping, not
stipulation• A data access technology– M domain models compile down to T-SQL– Tool chain supports course-grained loading/unloading of
schemas and values – not an OLTP solution• A replacement for T-SQL– Far less expansive feature set– Tool chain supports linking/invoking T-SQL
![Page 32: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/32.jpg)
INTELLIPAD
![Page 33: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/33.jpg)
IntelliPad Editing Tool• Simple text based code editor• Supports “M” languages• Provides instant feedback of code compilation– Great for learning “M” languages
• Visual Studio can also be used for “M”– Most likely scenario in real projects
![Page 34: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/34.jpg)
IntelliPad Editing Tool
Modelling data in IntelliPadTSQL code is created instantly
![Page 35: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/35.jpg)
M: Visual Studio
![Page 36: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/36.jpg)
DEMO
![Page 37: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/37.jpg)
SUMMARY
![Page 38: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/38.jpg)
Bitshttp://msdn.com/dataSDK DownloadSDK Contains
Repository database“M” modelling language (MSchema, MGrammer)IntelliPad editorN
CommunityBoggersGuides.net
Use “Oslo” todayUse “M” to model a database!
MGrammar Language for creating textual DSLsSpecification will be released under OSP
![Page 39: SQL Modeling Services M](https://reader035.vdocuments.us/reader035/viewer/2022081420/56815f82550346895dce86da/html5/thumbnails/39.jpg)
Coming up…P/X001How to Get Full Access to a Database Backup in 3 Minutes or LessIderaP/L001End-to-end database development has arrivedRed GateP/L002Weird, Deformed, and Grotesque –Horrors Stories from the World of ITQuestP/L005Expert Query Analysis with SQL SentrySQLSentryP/T007Attunity Change Data Capture for SSISAttunity
#SQLBITS