Q&A

SQL Server 2022: Ledger, DDM and T-SQL Enhancements

Data developers are still learning about all the new goodies that arrived with SQL Server 2022, which is chock full of new features and enhancements such as ledger for blockchain security.

Microsoft introduced ledger last August, saying: "We're making the data in SQL verifiable using the same cryptographic patterns seen in blockchain technology, while keeping the flexibility and performance of a traditional database. Ledger is centrally managed, and you can cryptographically attest to other parties that your data can be trusted and hasn't been tampered with."

[Click on image for larger view.] Ledger Table Architecture (source: Microsoft).

While a game-changer for security, SQL Server 2022 also introduced new functionality around Dynamic Data Masking (DDM), T-SQL enhancements and more.

To help developers use all the new stuff in SQL Server 2022, Leonard Lobel, longtime Microsoft MVP and CTO of Sleek Technologies, will helm a session titled "What's New for Developers in SQL Server 2022" in the big, five-day, in-person Visual Studio Live! developer conference to be held in San Diego Aug. 7-11.

We caught up with Lobel to learn more about the 75-minute Aug. 9 presentation, at which attendees will learn:

  • How to secure data using ledger tables
  • How to apply granular permissions to DDM
  • How to leverage new T-SQL enhancements

VisualStudioMagazine: What inspired you to present on the topic of what's new for developers in SQL Server 2022?
Lobel: I have been presenting developer-focused SQL Server sessions and workshops since SQL Server 2008. Every new release is loaded with innovative and useful features, and SQL Server 2022 is no exception. With powerful new capabilities just added in SQL Server 2022, I am very excited to share them with the tech community at large!

As an example, what is one especially significant new feature of SQL Server 2022 of interest to developers?
The special handling to test for NULL using the IS keyword, rather than the usual = for equality, has been a pain point for developers since the very beginning of the product.

"The special handling to test for NULL using the IS keyword, rather than the usual = for equality, has been a pain point for developers since the very beginning of the product."

Leonard Lobel, MVP, CTO at Sleek Technologies Inc.

When NULLs need to be considered, we've always been forced to include this additional IS NULL or IS NOT NULL syntax. This not only clutters T-SQL code, but forces the execution plan to use an index scan. In SQL Server 2022, we have a new IS DISTINCT FROM and IS NOT DISTINCT FROM syntax that not only handles both NULL and non-NULL values, but allows the execution plan to use an index seek (significantly better performance than an index scan).

Inside the Session

What: What's New for Developers in SQL Server 2022

When: Aug. 9, 8 a.m. - 9:15 a.m.

Who: Leonard Lobel,, MVP, CTO at Sleek Technologies Inc.

Why: SQL Server 2022 adds powerful features that you'll learn about in this demo-packed session, started with ledger tables.

Find out more about Visual Studio Live!, taking place Aug. 7-11 in San Diego

How easy is it to incorporate blockchain-based security with ledger?
Very! Distributed blockchain solutions are typically complex and resource intensive, with high latency and low throughput. With SQL Server Ledger, the blockchain technology is centralized within the core SQL Server database engine, so there are no complex setup requirements, and delivers significantly better performance than traditional distributed blockchain scenarios.

How do new T-SQL enhancements help developers using SQL Server 2022?
Well, I've already mentioned IS DISTINCT FROM and IS NOT DISTINCT FROM. But there are a host of other useful T-SQL functions new in SQL Server 2022, including DATE_BUCKET (grouping dates by bucket size), DATETRUNC (truncating date/time portions), GENERATE_SERIES (manufacture a table of series data), LEAST/GREATEST (find the lowest/highest value across a set of columns), plus some helpful enhancements to existing functions STRING_SPLIT (retain ordinal position), FIRST_VALUE/LAST_VALUE (can now ignore NULLs), and SELECT...WINDOW (can now define reusable aliases for repetitive windowing definitions).

[Click on image for larger view.]

What's a major pain point experienced by developers who are just starting to work with SQL Server 2022?
Developers shouldn't experience any difficulties when embracing SQL Server 2022. It uses the same setup experience as previous versions of SQL Server. The new Azure Extension for SQL Server does add some complexity, but is entirely optional unless you want to integrate with Microsoft Defender for Cloud, Purview, and Azure Active Directory.

How do you see SQL Server evolving in the future?
I think we can expect to see more and more cloud integration as hybrid solutions are becoming increasingly common. Also, I think we'll see more and more IQP (intelligent query processing) features to improve existing workloads at scale with no code changes, just as we've been seeing in every release since SQL Server 2017.

Note: Those wishing to attend the conference can save hundreds of dollars by registering early, according to the event's pricing page. The event organizer said: "Register for VSLive! San Diego by the Early Bird Deadline (July 14) to save up to $300 and secure your seat for intensive developer training in sunny Southern California!"

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • What's Next for ASP.NET Core and Blazor

    Since its inception as an intriguing experiment in leveraging WebAssembly to enable dynamic web development with C#, Blazor has evolved into a mature, fully featured framework. Integral to the ASP.NET Core ecosystem, Blazor offers developers a unique combination of server-side rendering and rich client-side interactivity.

  • Nearest Centroid Classification for Numeric Data Using C#

    Here's a complete end-to-end demo of what Dr. James McCaffrey of Microsoft Research says is arguably the simplest possible classification technique.

  • .NET MAUI in VS Code Goes GA

    Visual Studio Code's .NET MAUI workload, which evolves the former Xamarin.Forms mobile-centric framework by adding support for creating desktop applications, has reached general availability.

  • Visual Studio Devs Quick to Sound Off on Automatic Updates: 'Please No'

    A five-year-old Visual Studio feature request for automatic IDE updates is finally getting enacted by Microsoft amid a lot of initial developer pushback, seemingly misplaced.

  • First Official OpenAI Library for .NET Goes Beta

    Although it seems Microsoft and OpenAI have been deeply intertwined partners for a long time, they are only now getting around to releasing an official OpenAI library for .NET developers, joining existing community libraries.

Subscribe on YouTube