xml> vs. {JSON} - net-CDE

Werbung
<xml> vs. {JSON}
SQL Server vs. Azure DocumentDB
ein battle zwischen
<xml> und {JSON}
SQL saturday #409
Organizer
13.06.2015
SQLSaturday Rheinland 2015
Bronze Sponsor
13.06.2015
SQLSaturday Rheinland 2015
Silver Sponsor
13.06.2015
SQLSaturday Rheinland 2015
Gold Sponsor
13.06.2015
SQLSaturday Rheinland 2015
You rock!
13.06.2015
SQLSaturday Rheinland 2015
About me
Alexander Karl
SQL + BI Consultant
... and „2012er“ SQL MCSE
13.06.2015
SQLSaturday Rheinland 2015
About me
Sascha Dittmann
Sr. Software Developer
Sr. Solutions Architect
Twitter: @SaschaDittmann
Blog:
http://www.sascha-dittmann.de
13.06.2015
SQLSaturday Rheinland 2015
Agenda








Setup
Tooling
Consistency
CRUD
Indexing
Schema validation <xml> only
Server side code
Complex queries and transformation <xml> only
13.06.2015
SQLSaturday Rheinland 2015
Setup
 SQL Server Setup
erfolgt mittels Wizard oder via cmd-Line
 native xml Unterstützung
„out of the Box“
13.06.2015
SQLSaturday Rheinland 2015
Setup
13.06.2015
SQLSaturday Rheinland 2015
Tooling
 SQL Server Management Studio
>> für queries
>> für „xml-results“
13.06.2015
SQLSaturday Rheinland 2015
Tooling
13.06.2015
SQLSaturday Rheinland 2015
Tooling
13.06.2015
SQLSaturday Rheinland 2015
Tooling
13.06.2015
SQLSaturday Rheinland 2015
Consistency (ACID)
A tomicity
C onsistency
I solation
D urabilty
13.06.2015
SQLSaturday Rheinland 2015
Consistency (BASE)
B asically
A vailable
S oft state
E ventual consistency
13.06.2015
SQLSaturday Rheinland 2015
Select & Ins/Upd/Del
 T-SQL conformer Ins/Upd/Del
 T-SQL XQuery




<column>.query
<column>.value
<column>.exist
<column>.nodes
13.06.2015
( return xml )
( return sql-Type )
( return bit )
SQLSaturday Rheinland 2015
Select & Ins/Upd/Del
 T-SQL Xquery Navigation im <xml>






child
descendant
parent
Attribut
self
descendant-or-self
 .node()
 .text()
13.06.2015
SQLSaturday Rheinland 2015
CRUD Samples
13.06.2015
SQLSaturday Rheinland 2015
Select & Ins/Upd/Del
 LINQ, SQL
 REST API over HTTPS




.NET
Node.js
JavaScript
Python
 …
13.06.2015
SQLSaturday Rheinland 2015
CRUD Samples
13.06.2015
SQLSaturday Rheinland 2015
Indexing
 PRIMARY XML INDEX IX_primaryXml
 CREATE XML INDEX IX_name
ON sch.table ( xmlCol )
USING XML INDEX IX_primaryXml
 FOR PATH;
 FOR VALUE;
 FOR PROPERTY;
13.06.2015
SQLSaturday Rheinland 2015
Indexing
13.06.2015
SQLSaturday Rheinland 2015
Indexing
13.06.2015
SQLSaturday Rheinland 2015
Indexing Policies
13.06.2015
SQLSaturday Rheinland 2015
Schema Validation
 XML SCHEMA COLLECTION schemaName
 (table) xmlColumn
xml ( DOCUMENT schemaName )
13.06.2015
SQLSaturday Rheinland 2015
Schema Validation
13.06.2015
SQLSaturday Rheinland 2015
Schema Validation
13.06.2015
SQLSaturday Rheinland 2015
Schema Validation
 Triggers
 Client-Side Code
13.06.2015
SQLSaturday Rheinland 2015
server side code
13.06.2015
SQLSaturday Rheinland 2015
compl. queries & transformation
 XML
„FLWOR“
for let where order return
 Aggregat functions



13.06.2015
{count($j)}
{sum($j)}
{avg($j)}
SQLSaturday Rheinland 2015
compl. queries & transformation
13.06.2015
SQLSaturday Rheinland 2015
compl. queries
13.06.2015
SQLSaturday Rheinland 2015
Questions
???
13.06.2015
SQLSaturday Rheinland 2015
Save the date!
13.06.2015
SQLSaturday Rheinland 2015
Herunterladen