Microsoft SQL Server Samples
repository·master·Indexed 11 days ago
https://github.com/microsoft/sql-server-samplesA collection of code samples and pre-built databases for Microsoft Azure Data products, including SQL Server, Azure SQL Database, Azure Synapse, and Azure SQL Edge. Features sample databases like Wide World Importers v1.0 and AdventureWorks, as well as demonstrations for In-Memory OLTP, IoT Smart Grid v1.0, ASP.NET session state configuration, and Model Context Protocol (MCP) server deployment using Azure Developer CLI (azd).
What's inside SQL Server Samples
- Sample Database 1 provides a fundamental database schema and dataset designed to simulate a conventional Sales environment. The data is sourced from progress.com with slight modifications and is intended for testing and demonstrating SQL functionalities within a sales context.
Overview of the pymssql macOS sample
masterThis sample demonstrates basic CRUD (Create, Read, Update, Delete) operations using Python and thepymssqlconnector on macOS. Specifically, it performs aSELECTstatement and anINSERTstatement against an AdventureWorks sample database.Overview of WideWorldImporters Sample Database
masterWideWorldImporters is a sample database designed for SQL Server (2016 or higher) and Azure SQL Database. It simulates a wholesale company to showcase database design and the effective use of SQL Server features.
The sample consists of two primary database types:
- WideWorldImporters: An OLTP database used for transactions and real-time analytics.
- WideWorldImportersDW: An OLAP database focused on analytics.
Developers can use the included sample scripts, workload drivers, and Power BI dashboards to explore various SQL Server capabilities.
Overview of SQL Assessment API
masterThe SQL Assessment API is a mechanism to evaluate SQL Server configurations against best practices. It uses a ruleset provided by the SQL Server Team to identify potential issues.
Key Features:
- Extensibility: The API is designed to be highly customizable. You can tune default rules or create your own custom rules.
- Compatibility: Supports SQL Server versions 2012 and higher, as well as Azure SQL Database Managed Instance.
- Customization: Users can modify the
ruleset.jsonto suit their specific environment needs.
For a GUI-based experience instead of scripting, you can use the SQL Assessment Extension for Azure Data Studio (ADS).
Overview of Graph Tables sample
masterThis sample demonstrates how to populate graph tables from existing tables or CSV files. It covers creating node and edge tables, populating them, and querying the resulting graph structure. The sample uses Python and T-SQL.Overview of SQL Server and Java on Windows samples
masterThis sample repository provides tutorials for developing Java applications on Windows using SQL Server. It covers several key workloads:
- CRUD with Java: Basic Create, Read, Update, and Delete operations.
- CRUD with Hibernate ORM: Object-Relational Mapping using Hibernate.
- Performance improvements with Columnstore: Utilizing Columnstore indexes for performance.
Applies to: SQL Server 2016 or higher.
Overview of C# on macOS SQL Server samples
masterThis sample collection provides tutorials for developing C# applications on macOS using SQL Server. It covers several key workloads:
- CRUD with .NET Core: Basic Create, Read, Update, and Delete operations.
- CRUD with Entity Framework Core: Object-relational mapping using EF Core.
- Performance improvements with Columnstore: Utilizing Columnstore indexes for optimized performance.
Overview of Database development framework samples
masterThis collection contains a consistent 'TO DO list' application implemented across various development frameworks. The purpose of these samples is to demonstrate how to integrate these frameworks with Microsoft SQL databases, specifically:
- SQL Server
- Azure SQL Database
- Azure SQL Data Warehouse
Note: As of the current documentation, specific framework samples are listed as 'coming soon'.
Overview of SQL Server In-Memory Database features
masterIn-Memory Database refers to a collection of features within SQL Server designed to leverage in-memory technologies for improved performance. Key features included in this category are:
- Memory-Optimized TempDB Metadata: Reduces contention on system tables by storing TempDB metadata in memory.
- Hybrid Buffer Pool: Optimizes how data is cached in memory.
- In-Memory OLTP: Provides high-performance, transactionally consistent in-memory data storage and processing.
Overview of Application Samples
masterThis repository contains a collection of application samples built on Microsoft SQL databases. These samples demonstrate how to integrate and use various SQL technologies within full-stack applications. Supported database platforms include:
- SQL Server
- Azure SQL Database
- Azure SQL Data Warehouse
Overview of SQL Server and C# on RHEL workloads
masterThis sample provides tutorials for developing C# applications on RHEL that interact with SQL Server. It covers the following workloads:
- CRUD with .NET Core: Basic Create, Read, Update, and Delete operations using .NET Core.
- CRUD with Entity Framework Core: Data access using the Entity Framework Core ORM.
- Performance improvements with Columnstore: Demonstrating how to leverage Columnstore indexes for performance.
Overview of Paygo-SQLArc Azure Policy
masterThe
Paygo-SQLArcAzure Policy (Windows only) is designed to manage SQL Arc server licensing.Logic:
- Non-compliant: SQL Arc servers where
LicenseType = Paid. - Compliant: SQL Arc servers where
LicenseType = LicenseOnly.
Remediation: When a remediation task is triggered, it automatically sets the
LicenseTypetoPAYG.- Non-compliant: SQL Arc servers where