DBAs vs Developers: JSON in SQL Server

Slides:



Advertisements
Similar presentations
By: Jose Chinchilla July 31, Jose Chinchilla MCITP: SQL Server 2008, Database Administrator MCTS: SQL Server 2005/2008, Business Intelligence DBA.
Advertisements

Eric J. Oszakiewski MCTS: SharePoint Application Development SharePoint Configuration.
new database engine component fully integrated into SQL Server 2014 optimized for OLTP workloads accessing memory resident data achive improvements.
PHP Hypertext Preprocessor Information Systems 337 Prof. Harry Plantinga.
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Always Start With The Database Browser
Capacity Planning in SharePoint Capacity Planning Process of evaluating a technology … Deciding … Hardware … Variety of Ways Different Services.
SSIS Over DTS Sagayaraj Putti (139460). 5 September What is DTS?  Data Transformation Services (DTS)  DTS is a set of objects and utilities that.
DBA Developer. Responsibilities  Designing Relational databases  Developing interface layer Environment Microsoft SQL Server,.NET SQL Layer: Stored.
MAHI Research Database Data Validation System Software Prototype Demonstration September 18, 2001
Computer Measurement Group, India Optimal Design Principles for better Performance of Next generation Systems Balachandar Gurusamy,
Module 11: Programming Across Multiple Servers. Overview Introducing Distributed Queries Setting Up a Linked Server Environment Working with Linked Servers.
SQL Server 2014: Overview Phil ssistalk.com.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
What’s new in Kentico CMS 5.0 Michal Neuwirth Product Manager Kentico Software.
A Brief Documentation.  Provides basic information about connection, server, and client.
IN-MEMORY OLTP By Manohar Punna SQL Server Geeks – Regional Mentor, Hyderabad Blogger, Speaker.
GOAL User Interactive Web Interface Update Pages by Club Officers Two Level of Authentication.
Administrator Data Entry Training for Maintenance (Mx) LOSA and Ramp LOSA Database Software 11/26/2016.
IWDS – Local Customization and Swipe Card /22/2004.
 Tracks seats availability in a specific class (CRN)- only for HOKIES.  Has the ability to track a list of classes.  The tracking list grows dynamically.
Central Management Server Managing Your SQL Server Environment 1.
SQL SERVER AUDITING. Jean Joseph DBA/Consultant Contact Info: Blog:
October 15-18, 2013 Charlotte, NC Accelerating Database Performance Using Compression Joseph D’Antoni, Solutions Architect Anexinet.
Execution Plans Detail From Zero to Hero İsmail Adar.
Diving into Query Execution Plans ED POLLACK AUTOTASK CORPORATION DATABASE OPTIMIZATION ENGINEER.
CAESked Computer Aided Engineering Scheduler. Introduction Team Members: Chris Fruin & Jerry Grochowski What CAESked is: Web based class scheduling application.
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
Taking Analysis Services Tabular to Enterprise Levels Stacia Varga Data Inspirations
Advanced Higher Computing Science
Introduction to Mongo DB(NO SQL data Base)
Data Virtualization Demoette… Packaged Query Single Select Option
OVirt Data Warehouse 02/11/11 Yaniv Dary BI Software Engineer, Red Hat.
Building REST API using SQL Server and JSON Functions
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
DBAs vs Developers: JSON in SQL Server 2016
Contained DB? Did it do something wrong?
Twitter & NoSQL Integration with MVC4 Web API
Hustle and Bustle of SQL Pages
Database System Concepts and Architecture
Database Administration for the Non-DBA
Universal SQL Installations Framework (Script review and Demo)
Marcos Freccia Stop everything! Top T-SQL tricks to a developer
Handling Data Using Databases
Master Data Management with SQL Server 2016 Master Data Services
SQL 2014 In-Memory OLTP What, Why, and How
Re-Indexing - The quest of ultimate automation
Built in Fairfield County: Front End Developers Meetup
Thank you Sponsors.
DBAs vs Developers: JSON in SQL Server
Cloud Data Replication with SQL Data Sync
In Memory OLTP Not Just for OLTP.
What’s new with SQL Server
Integrating REST API and SQL Server JSON Functions
Welcome to SQLSaturday #767! Hosted by Lincoln SQL Server User Group
The Ins and Outs of Indexes
Diving into Query Execution Plans
In Memory OLTP Not Just for OLTP.
SQL Server Query Design and Optimization Recommendations
REST Easy - Instant APIs for Your Database
Restaurant IOS application
SSIS Data Integration Data Warehouse Acceleration
SSIS Data Integration Data Warehouse Acceleration
Denis Reznik SQL Server 2017 Hidden Gems.
SSIS Data Integration Data Warehouse Acceleration
Just Enough SSIS Scripting to be Dangerous.
The Ins and Outs of Indexes
XML? What’s this doing in my database? Adam Koehler
SQL Server 2016 High Performance Database Offer.
Presentation transcript:

DBAs vs Developers: JSON in SQL Server | Bert Wagner | September 30, 2017

Background BI developer @ Progressive Insurance for 6+ years I ❤ JSON – I use it in APIs, hardware projects, websites I also ❤ SQL – relational database structures

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

What does JSON look like? { “Make” : “Volkswagen”, “Year” : 2003, “Model” : { “Base” : “Golf”, “Trim” : “GL” }, “Colors” : [“White” , “Rust”], , “Pearl” “PurchaseDate” : “2006-10-05T00:00:00.000Z” } What is JSON, where it used, why is it used

Why use JSON? Easy Processing Javascript: var car = { "Make" : "Volkswagen" }; console.log(car.Make); // Output: Volkswagen car.Year = 2003; console.log(car); // Output: { "Make" : "Volkswagen", "Year" : 2003" }

Why use JSON? APIs

Why use JSON? Storage Size XML: 225 Characters JSON: 145 Characters <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” }

Appropriate Usage Staging Data Load data raw Validate Transform

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" }

Appropriate Usage Non-Analytical Data Sessions User preferences Non-frequently changing variables Admin emails Static dropdown menus

High-Performance Requirements Inappropriate Usage High-Performance Requirements

Validation/Integrity Requirements Inappropriate Usage Validation/Integrity Requirements

Inappropriate Usage Being Lazy

Demos ETL and reporting Database object maintenance Performance parsing w/ computed column indexes SQL JSON vs XML vs .NET performance comparisons

Performance Results - XML JSON faster in almost all categories If considering entire app performance, maybe faster in all categories

Performance Results - .NET Competitive with C# libraries Indexes on computed columns are BLAZING!

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 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! Twitter: @bertwagner Blog: https://bertwagner.com <- new post every Tuesday Vlog: https://bertwagner.com <- new video every Tuesday Email: bert@bertwagner.com

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