都内で働くSEの技術的なひとりごと / Technical soliloquy of System Engineer working in Tokyo

都内でサラリーマンやってます。SQL Server を中心とした (2023年からは Azure も。) マイクロソフト系(たまに、OSS系などマイクロソフト以外の技術も...)の技術的なことについて書いています。日々の仕事の中で、気になったことを技術要素関係なく気まぐれに選んでいるので記事内容は開発言語、インフラ等ばらばらです。なお、当ブログで発信、発言は私個人のものであり、所属する組織、企業、団体等とは何のかかわりもございません。ブログの内容もきちんと検証して使用してください。英語の勉強のため、英語の

新しいサンプルデータベース 『 WideWorldImporters 』 の中身を見てみる

 SQL Server のサンプルデータベースといえば、AdventureWorks です。今回、SQL Server 2016 の機能に合わせて WideWorldImporters というサンプルデータベースがリリースされました。
blogs.technet.microsoft.com

Wide World Importers is the new sample for SQL Server. It illustrates how the rich SQL Server feature set can be used in a realistic database. It does not attempt to use every single SQL Server feature, as that would not be realistic. It also showcases the key SQL Server 2016 capabilities and performance enhancements.

 下記の通り、一通りの SQL Server 2016 の機能を見ることができます。

WideWorldImporters is the main database for transaction processing (OLTP – OnLine Transaction Processing) and operational analytics (HTAP – Hybrid Transactional/Analytics Processing). Here are some examples of the use of SQL Server capabilities with this database:

  • Real-time operational analytics of sales data is enabled through the use of nonclustered columnstore indexes.
  • Archive tables can be stretched to Azure for long-term retention, reducing storage cost and improving manageability.
  • Query Store is used to keep track of query performance.
  • Temporal tables are used to conveniently keep track of the history of reference data, as well as some of the main entities.
  • JSON is used to enable AJAX calls to some of the key tables, and also to extend the relational schema to record such things as application settings and user preferences.
  • Advanced security features like Always Encrypted, Row-Level Security and Dynamic Data Masking are used to secure data.
  • In-Memory OLTP is used to optimize the performance of table-valued parameters (TVPs) and to optimize ingestion of sensor data.
  • Clustered columnstore indexes are used to reduce the storage footprint of large tables with insert-only workload.
  • Partitioning is used to improve the manageability of large tables.
  • For more detail, see WideWorldImporters use of SQL Server features and capabilities.

 ダウンロードは下記の通りです。
https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0github.com
 
 ドキュメントに関しては下記の通りです。
Wide World Importers Documentation

 それでは、早速中身を見てみましょう。AdventureWorks と比較するとテーブル数は少なくなっています。Temporal tables がたくさんあります。
f:id:koogucc11:20160626105155p:plain

 カラムストアインデックスも定義されています。SQL Server 2016 の機能まだ全然見れていないのですが、通常のインデックスとカラムストアインデックスって一つのテーブルに混在できるようになったんですね。
f:id:koogucc11:20160626105205p:plain

 クエリストアも使用可能になっています。
f:id:koogucc11:20160626105836p:plain

 もちろん、ImMemory も。
f:id:koogucc11:20160626105907p:plain
 
 WideWorldImporters を使って最新の機能を勉強しましょう。

勉強しないといけないですね。

Microsoft SQL Server 2016: A Beginner's Guide, Sixth Edition (Beginner's Guides)

Microsoft SQL Server 2016: A Beginner's Guide, Sixth Edition (Beginner's Guides)