SlideShare uma empresa Scribd logo
1 de 21
DBAs vs Developers:
JSON in SQL Server
1
| Bert Wagner | March 24, 2018
Background
• BI developer @ Progressive Insurance for 6+ years
• I ❤ JSON – I use it in APIs, hardware projects, websites
• I also ❤ SQL – relational database structures
3
Overview
• What is JSON?
• Why use JSON?
• When is it appropriate to store JSON in SQL?
• Usage examples:
• ETL and reporting
• Database object maintenance
• Performance parsing
• Performance comparisons
4
Demo code and slides available at bertwagner.com
5
What does JSON look like?
{
“Make” : “Volkswagen”,
“Year” : 2003,
“Model” : {
“Base” : “Golf”,
“Trim” : “GL”
},
“Colors” : [“White”, “Pearl”, “Rust”],
“PurchaseDate” : “2006-10-05T00:00:00.000Z”
}
6
Why use JSON?
Easy Processing
var car = { "Make" : "Volkswagen" };
console.log(car.Make);
// Output: Volkswagen
car.Year = 2003;
console.log(car);
// Output: { "Make" : "Volkswagen", "Year" : 2003" }
Javascript:
7
Why use JSON?
APIs
8
Why use JSON?
Storage Size
<Car>
<Make>Volkswagen</Make>
<Year>2003</Year>
<Model>
<Base>Golf</Base>
<Trim>GL</Trim>
</Model>
<Colors>
<Color>White</Color>
<Color>Pearl</Color>
<Color>Rust</Color>
</Colors>
<PurchaseDate>
2006-10-05 00:00:00.000
</PurcaseDate>
</Car>
{
“Make” : “Volkswagen”,
“Year” : 2003,
“Model” : {
“Base” : “Golf”,
“Trim” : “GL”
},
“Colors” :
[“White”, “Pearl”, Rust”],
“PurchaseDate” :
“2006-10-05T00:00:00.000Z”
}
XML: 225 Characters JSON: 145 Characters
9
Appropriate Usage
Staging Data
• Load data raw
• Validate
• Transform
10
Appropriate Usage
Error Logging
ErrorDate Component Data
2016-03-17 21:23:39 GetInventory { "Make : "Volkswagen", "Year" : 2003}
2016-03-19 12:59:31 Login { "User" : "Bert", "Referrer" : "http://google.com",
"AdditionalDetails" : "Invalid number of login attempts" }
11
Appropriate Usage
Non-Analytical Data
• Sessions
• User preferences
• Non-frequently changing variables
• Admin emails
• Static dropdown menus
12
Inappropriate Usage
High-Performance Requirements
13
Inappropriate Usage
Validation/Integrity Requirements
14
Inappropriate Usage
Being Lazy
Demos
1. ETL and reporting
2. Database object maintenance
3. Performance parsing w/ computed column indexes
4. SQL JSON vs XML vs .NET performance comparisons
15
Performance Results - XML
16
• JSON faster in almost all categories
• If considering entire app performance, maybe faster in
all categories
Performance Results - .NET
17
• Competitive with C# libraries
• Indexes on computed columns are BLAZING!
18
JSON – What’s new in SQL Server 2017?
• Clustered column store indexes support nvarchar(max)
• Compression
• Faster (maybe)
• In memory-optimized tables
• Computed columns
• All JSON functions supported
Recap
19
• Many good (and bad) uses for JSON in SQL exist
• JSON can be fully manipulated in SQL Server 2016
• JSON is preferable to XML for new projects
• JSON performance is comparable to .NET, faster with
computed column indexes
Thank you!
@bertwagner
bertwagner.com
youtube.com/c/bertwagner
bert@bertwagner.com
20
New posts and
videos every
Tuesday!
21
Appendix
Software for keeping screen region on top
• On Top Replica
Blog posts and YouTube videos:
• SQL Server JSON Usage - Parsing
• SQL Server JSON Usage - Creating
• SQL Server JSON Usage - Updating, Adding, Deleting
• Performance Comparisons - .NET
• Performance Comparisons - XML
• Performance Comparisons - .NET and XML Redux
• JSON Computed Column Indexes
• Jovan Popovic’s JSON posts
Microsoft Connect
• Add an option to JSON_MODIFY() to fully delete values from arrays

Mais conteúdo relacionado

Mais procurados

Exciting Features for SQL Devs in SQL 2012
Exciting Features for SQL Devs in SQL 2012Exciting Features for SQL Devs in SQL 2012
Exciting Features for SQL Devs in SQL 2012Brij Mishra
 
London React August - GraphQL at The Financial Times - Viktor Charypar
London React August - GraphQL at The Financial Times - Viktor CharyparLondon React August - GraphQL at The Financial Times - Viktor Charypar
London React August - GraphQL at The Financial Times - Viktor CharyparReact London Community
 
Angular JS and Magento
Angular JS and MagentoAngular JS and Magento
Angular JS and MagentoVinci Rufus
 
Developing webapp using Polymer : is it ready for production? or not?
Developing webapp using Polymer : is it ready for production? or not?Developing webapp using Polymer : is it ready for production? or not?
Developing webapp using Polymer : is it ready for production? or not?Jeongkyu Shin
 
mabl's Machine Learning Implementation on Google Cloud Platform
mabl's Machine Learning Implementation on Google Cloud Platformmabl's Machine Learning Implementation on Google Cloud Platform
mabl's Machine Learning Implementation on Google Cloud PlatformJoseph Lust
 
Introduction to GraphQL - RVA JavaScript 2019
Introduction to GraphQL -  RVA JavaScript 2019Introduction to GraphQL -  RVA JavaScript 2019
Introduction to GraphQL - RVA JavaScript 2019Matt Lavin
 
ChakraCore - JSConf Last Call
ChakraCore - JSConf Last CallChakraCore - JSConf Last Call
ChakraCore - JSConf Last CallGaurav Seth
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET AppsShiju Varghese
 
Automated Bulk Conversion of 250,000+ CAD and Corresponding Raster Files to PDF
Automated Bulk Conversion of 250,000+ CAD and Corresponding Raster Files to PDFAutomated Bulk Conversion of 250,000+ CAD and Corresponding Raster Files to PDF
Automated Bulk Conversion of 250,000+ CAD and Corresponding Raster Files to PDFSafe Software
 
Big Data DC - BenchPress
Big Data DC - BenchPressBig Data DC - BenchPress
Big Data DC - BenchPressDrew Stephens
 
GraphQL With Relay Part Deux
GraphQL With Relay Part DeuxGraphQL With Relay Part Deux
GraphQL With Relay Part DeuxBrad Pillow
 
Flink Forward San Francisco 2018: Ken Krugler - "Building a scalable focused ...
Flink Forward San Francisco 2018: Ken Krugler - "Building a scalable focused ...Flink Forward San Francisco 2018: Ken Krugler - "Building a scalable focused ...
Flink Forward San Francisco 2018: Ken Krugler - "Building a scalable focused ...Flink Forward
 
Balkan - data eng meetup - data fusion
Balkan - data eng meetup - data fusionBalkan - data eng meetup - data fusion
Balkan - data eng meetup - data fusionBalkan Misirli
 
FeedHenry & MongoDB
FeedHenry & MongoDBFeedHenry & MongoDB
FeedHenry & MongoDBCian Clarke
 

Mais procurados (20)

GitLab Product Update Oct 3
GitLab Product Update Oct 3GitLab Product Update Oct 3
GitLab Product Update Oct 3
 
Exciting Features for SQL Devs in SQL 2012
Exciting Features for SQL Devs in SQL 2012Exciting Features for SQL Devs in SQL 2012
Exciting Features for SQL Devs in SQL 2012
 
London React August - GraphQL at The Financial Times - Viktor Charypar
London React August - GraphQL at The Financial Times - Viktor CharyparLondon React August - GraphQL at The Financial Times - Viktor Charypar
London React August - GraphQL at The Financial Times - Viktor Charypar
 
GraphQL & Relay
GraphQL & RelayGraphQL & Relay
GraphQL & Relay
 
Angular JS and Magento
Angular JS and MagentoAngular JS and Magento
Angular JS and Magento
 
Developing webapp using Polymer : is it ready for production? or not?
Developing webapp using Polymer : is it ready for production? or not?Developing webapp using Polymer : is it ready for production? or not?
Developing webapp using Polymer : is it ready for production? or not?
 
Asp.net web forms new shiny things part 1
Asp.net web forms new shiny things   part 1Asp.net web forms new shiny things   part 1
Asp.net web forms new shiny things part 1
 
mabl's Machine Learning Implementation on Google Cloud Platform
mabl's Machine Learning Implementation on Google Cloud Platformmabl's Machine Learning Implementation on Google Cloud Platform
mabl's Machine Learning Implementation on Google Cloud Platform
 
Introduction to GraphQL - RVA JavaScript 2019
Introduction to GraphQL -  RVA JavaScript 2019Introduction to GraphQL -  RVA JavaScript 2019
Introduction to GraphQL - RVA JavaScript 2019
 
ChakraCore - JSConf Last Call
ChakraCore - JSConf Last CallChakraCore - JSConf Last Call
ChakraCore - JSConf Last Call
 
Released WEBridge 4 SAP R 3 on 9/9 of 2014
Released WEBridge 4 SAP R 3 on 9/9 of 2014Released WEBridge 4 SAP R 3 on 9/9 of 2014
Released WEBridge 4 SAP R 3 on 9/9 of 2014
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET Apps
 
Automated Bulk Conversion of 250,000+ CAD and Corresponding Raster Files to PDF
Automated Bulk Conversion of 250,000+ CAD and Corresponding Raster Files to PDFAutomated Bulk Conversion of 250,000+ CAD and Corresponding Raster Files to PDF
Automated Bulk Conversion of 250,000+ CAD and Corresponding Raster Files to PDF
 
GraphQL
GraphQLGraphQL
GraphQL
 
Big Data DC - BenchPress
Big Data DC - BenchPressBig Data DC - BenchPress
Big Data DC - BenchPress
 
GraphQL With Relay Part Deux
GraphQL With Relay Part DeuxGraphQL With Relay Part Deux
GraphQL With Relay Part Deux
 
Flink Forward San Francisco 2018: Ken Krugler - "Building a scalable focused ...
Flink Forward San Francisco 2018: Ken Krugler - "Building a scalable focused ...Flink Forward San Francisco 2018: Ken Krugler - "Building a scalable focused ...
Flink Forward San Francisco 2018: Ken Krugler - "Building a scalable focused ...
 
Balkan - data eng meetup - data fusion
Balkan - data eng meetup - data fusionBalkan - data eng meetup - data fusion
Balkan - data eng meetup - data fusion
 
C# 8 and .NET Core 3
C# 8 and .NET Core 3C# 8 and .NET Core 3
C# 8 and .NET Core 3
 
FeedHenry & MongoDB
FeedHenry & MongoDBFeedHenry & MongoDB
FeedHenry & MongoDB
 

Semelhante a DBAs vs Developers - JSON in SQL Server

NoSQL on ACID - Meet Unstructured Postgres
NoSQL on ACID - Meet Unstructured PostgresNoSQL on ACID - Meet Unstructured Postgres
NoSQL on ACID - Meet Unstructured PostgresEDB
 
How SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GameHow SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GamePARIKSHIT SAVJANI
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?Balajihope
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLEDB
 
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQNode.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQJoshua Miller
 
Using BigDL on Apache Spark to Improve the MLS Real Estate Search Experience ...
Using BigDL on Apache Spark to Improve the MLS Real Estate Search Experience ...Using BigDL on Apache Spark to Improve the MLS Real Estate Search Experience ...
Using BigDL on Apache Spark to Improve the MLS Real Estate Search Experience ...Databricks
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePointTalbott Crowell
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stackAshok Raj
 
ArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQLArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQLArangoDB Database
 
Ken_Wu_Resume_2017N
Ken_Wu_Resume_2017NKen_Wu_Resume_2017N
Ken_Wu_Resume_2017NKen Wu
 
Ken_Wu_Resume_2017N
Ken_Wu_Resume_2017NKen_Wu_Resume_2017N
Ken_Wu_Resume_2017NKen Wu
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftArun Gupta
 
Meanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore ChandraMeanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore ChandraKishore Chandra
 
Node.js and couchbase Full Stack JSON - Munich NoSQL
Node.js and couchbase   Full Stack JSON - Munich NoSQLNode.js and couchbase   Full Stack JSON - Munich NoSQL
Node.js and couchbase Full Stack JSON - Munich NoSQLPhilipp Fehre
 
Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013Ivan Sanders
 
Couchbase overview033113long
Couchbase overview033113longCouchbase overview033113long
Couchbase overview033113longJeff Harris
 

Semelhante a DBAs vs Developers - JSON in SQL Server (20)

NoSQL on ACID - Meet Unstructured Postgres
NoSQL on ACID - Meet Unstructured PostgresNoSQL on ACID - Meet Unstructured Postgres
NoSQL on ACID - Meet Unstructured Postgres
 
How SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GameHow SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the Game
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
Mean stack
Mean stackMean stack
Mean stack
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
 
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQNode.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
Node.CQ - Creating Real-time Data Mashups with Node.JS and Adobe CQ
 
Using BigDL on Apache Spark to Improve the MLS Real Estate Search Experience ...
Using BigDL on Apache Spark to Improve the MLS Real Estate Search Experience ...Using BigDL on Apache Spark to Improve the MLS Real Estate Search Experience ...
Using BigDL on Apache Spark to Improve the MLS Real Estate Search Experience ...
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePoint
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stack
 
ArangoDB
ArangoDBArangoDB
ArangoDB
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
ArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQLArangoDB – A different approach to NoSQL
ArangoDB – A different approach to NoSQL
 
Ken_Wu_Resume_2017N
Ken_Wu_Resume_2017NKen_Wu_Resume_2017N
Ken_Wu_Resume_2017N
 
Ken_Wu_Resume_2017N
Ken_Wu_Resume_2017NKen_Wu_Resume_2017N
Ken_Wu_Resume_2017N
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShift
 
Meanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore ChandraMeanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore Chandra
 
Node.js and couchbase Full Stack JSON - Munich NoSQL
Node.js and couchbase   Full Stack JSON - Munich NoSQLNode.js and couchbase   Full Stack JSON - Munich NoSQL
Node.js and couchbase Full Stack JSON - Munich NoSQL
 
Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013
 
Couchbase overview033113long
Couchbase overview033113longCouchbase overview033113long
Couchbase overview033113long
 

Último

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

DBAs vs Developers - JSON in SQL Server

  • 1. DBAs vs Developers: JSON in SQL Server 1 | Bert Wagner | March 24, 2018
  • 2.
  • 3. Background • BI developer @ Progressive Insurance for 6+ years • I ❤ JSON – I use it in APIs, hardware projects, websites • I also ❤ SQL – relational database structures 3
  • 4. Overview • What is JSON? • Why use JSON? • When is it appropriate to store JSON in SQL? • Usage examples: • ETL and reporting • Database object maintenance • Performance parsing • Performance comparisons 4 Demo code and slides available at bertwagner.com
  • 5. 5 What does JSON look like? { “Make” : “Volkswagen”, “Year” : 2003, “Model” : { “Base” : “Golf”, “Trim” : “GL” }, “Colors” : [“White”, “Pearl”, “Rust”], “PurchaseDate” : “2006-10-05T00:00:00.000Z” }
  • 6. 6 Why use JSON? Easy Processing var car = { "Make" : "Volkswagen" }; console.log(car.Make); // Output: Volkswagen car.Year = 2003; console.log(car); // Output: { "Make" : "Volkswagen", "Year" : 2003" } Javascript:
  • 8. 8 Why use JSON? Storage Size <Car> <Make>Volkswagen</Make> <Year>2003</Year> <Model> <Base>Golf</Base> <Trim>GL</Trim> </Model> <Colors> <Color>White</Color> <Color>Pearl</Color> <Color>Rust</Color> </Colors> <PurchaseDate> 2006-10-05 00:00:00.000 </PurcaseDate> </Car> { “Make” : “Volkswagen”, “Year” : 2003, “Model” : { “Base” : “Golf”, “Trim” : “GL” }, “Colors” : [“White”, “Pearl”, Rust”], “PurchaseDate” : “2006-10-05T00:00:00.000Z” } XML: 225 Characters JSON: 145 Characters
  • 9. 9 Appropriate Usage Staging Data • Load data raw • Validate • Transform
  • 10. 10 Appropriate Usage Error Logging ErrorDate Component Data 2016-03-17 21:23:39 GetInventory { "Make : "Volkswagen", "Year" : 2003} 2016-03-19 12:59:31 Login { "User" : "Bert", "Referrer" : "http://google.com", "AdditionalDetails" : "Invalid number of login attempts" }
  • 11. 11 Appropriate Usage Non-Analytical Data • Sessions • User preferences • Non-frequently changing variables • Admin emails • Static dropdown menus
  • 15. Demos 1. ETL and reporting 2. Database object maintenance 3. Performance parsing w/ computed column indexes 4. SQL JSON vs XML vs .NET performance comparisons 15
  • 16. Performance Results - XML 16 • JSON faster in almost all categories • If considering entire app performance, maybe faster in all categories
  • 17. Performance Results - .NET 17 • Competitive with C# libraries • Indexes on computed columns are BLAZING!
  • 18. 18 JSON – What’s new in SQL Server 2017? • Clustered column store indexes support nvarchar(max) • Compression • Faster (maybe) • In memory-optimized tables • Computed columns • All JSON functions supported
  • 19. Recap 19 • Many good (and bad) uses for JSON in SQL exist • JSON can be fully manipulated in SQL Server 2016 • JSON is preferable to XML for new projects • JSON performance is comparable to .NET, faster with computed column indexes
  • 21. 21 Appendix Software for keeping screen region on top • On Top Replica Blog posts and YouTube videos: • SQL Server JSON Usage - Parsing • SQL Server JSON Usage - Creating • SQL Server JSON Usage - Updating, Adding, Deleting • Performance Comparisons - .NET • Performance Comparisons - XML • Performance Comparisons - .NET and XML Redux • JSON Computed Column Indexes • Jovan Popovic’s JSON posts Microsoft Connect • Add an option to JSON_MODIFY() to fully delete values from arrays

Notas do Editor

  1. What is JSON, where it used, why is it used