Skip to content

Commit fecf9b1

Browse files
committed
Merge branch 'master' into jodebrui
2 parents ba4d514 + b683034 commit fecf9b1

File tree

9 files changed

+28
-17
lines changed

9 files changed

+28
-17
lines changed

samples/databases/wide-world-importers/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ The sample includes the databases that can be explored, as well as sample applic
1010

1111
**Documentation**: [root.md](http://go.microsoft.com/fwlink/?LinkID=800631)
1212

13+
**Feedback on the sample**: send to [[email protected]](mailto:[email protected])
14+
1315
### Contents
1416

1517
[About this sample](#about-this-sample)<br/>
@@ -28,7 +30,7 @@ The sample includes the databases that can be explored, as well as sample applic
2830
1. **Key features:** Core database features
2931
1. **Workload:** OLTP, OLAP, IoT
3032
1. **Programming Language:** T-SQL, C#
31-
1. **Authors:** Greg Low, Jos de Bruijn
33+
1. **Authors:** Greg Low, Denzil Ribeiro, Jos de Bruijn
3234
1. **Update history:** 25 May 2016 - initial revision
3335

3436
<a name=before-you-begin></a>

samples/databases/wide-world-importers/documentation/root.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Note that the sample is meant to be representative of a typical database. It doe
1010
**Source code for the sample**:
1111
[wide-world-importers](https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/wide-world-importers).
1212

13+
**Feedback**: please send to
14+
15+
1316
The documentation for the sample is organized as follows:
1417

1518
## Overview

samples/databases/wide-world-importers/documentation/wwi-data-generation.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ To generate sample data up to the current date, follow these steps:
1111
1. If you have not yet done so, install a clean version of the WideWorldImporters database. For installation instructions, [WideWorldImporters Installation and Configuration](wwi-oltp-htap-installation.md).
1212
2. Execute the following statement in the database:
1313

14-
EXEC WideWorldImporters.DataLoadSimulation.PopulateDataToCurrentDate
14+
```
15+
EXEC DataLoadSimulation.PopulateDataToCurrentDate
1516
@AverageNumberOfCustomerOrdersPerDay = 60,
1617
@SaturdayPercentageOfNormalWorkDay = 50,
1718
@SundayPercentageOfNormalWorkDay = 0,
1819
@IsSilentMode = 1,
1920
@AreDatesPrinted = 1;
21+
```
2022

2123
This statement adds sample sales and purchase data in the database, up to the current date. It outputs the progress of the data generation day-by-day. It will take rougly 10 minutes for every year that needs data. Note that there are some differences in the data generated between runs, since there is a random factor in the data generation.
2224

@@ -30,6 +32,8 @@ To import sample data up to the current date in the OLAP database WideWorldImpor
3032
2. If you have not yet done so, install a clean version of the WideWorldImportersDW database. For installation instructions, [WideWorldImporters Installation and Configuration](wwi-olap-installation.md).
3133
3. Reseed the OLAP database by executing the following statement in the database:
3234

35+
```
3336
EXECUTE [Application].Configuration_ReseedETL
37+
```
3438

3539
4. Run the SSIS package **Daily ETL.ispac** to import the data into the OLAP database. For instructions on how to run the ETL job, see [WideWorldImporters ETL Workflow](wwi-etl.md).

samples/databases/wide-world-importers/documentation/wwi-olap-installation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ To import a bacpac into a new SQL Database, you can use Management Studio.
4444

4545
## Configuration
4646

47+
[Applies to SQL Server 2016 (and later) Developer/Evaluation/Enterprise Edition]
48+
4749
The sample database can make use of PolyBase to query files in Hadoop or Azure blob storage. However, that feature is not installed by default with SQL Server - you need to select it during SQL Server setup. Therefore, a post-installation step is required.
4850

4951
1. In SQL Server Management Studio, connect to the WideWorldImportersDW database and open a new query window.

samples/databases/wide-world-importers/documentation/wwi-oltp-htap-sql-features.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ WideWorldImporters is designed to showcase many of the key features of SQL Serve
77
|Temporal tables|There are many temporal tables, including all look-up style reference tables and main entities such as StockItems, Customers, and Suppliers. Using temporal tables allows to conveniently keep track of the history of these entities.|
88
|AJAX calls for JSON|The application frequently uses AJAX calls to query these tables: Persons, Customers, Suppliers, and StockItems. The calls return JSON payloads (i.e. the data that is returned is formatted as JSON data). See, for example, the stored procedure `Website.SearchForCustomers`.|
99
|JSON property/value bags|A number of tables have columns that hold JSON data to extend the relational data in the table. For example, `Application.SystemParameters` has a column for application settings and `Application.People` has a column to record user preferences. These tables use an `nvarchar(max)` column to record the JSON data, along with a CHECK constraint using the built-in function `ISJSON` to ensure the column values are valid JSON.|
10-
|Row-level security (RLS)|Row Level Security (RLS) is used to limit access to the Customers table, based on role membership. Each sales territory has a role and a user. To see this in action, a script to demonstrate it has been provided.|
11-
|Real-time Operational Analytics|(Full version of the database) The core transactional tables `Sales.InvoiceLines` and `Sales.OrderLines` both have a non-clustered columnstore index to support efficient execution of analytical queries in the transactional database with minimal impact on the operational workload. Running transactions and analytics in the same database is also referred to as [Hybrid Transactional/Analytical Processing (HTAP)](https://wikipedia.org/wiki/Hybrid_Transactional/Analytical_Processing_(HTAP)).|
12-
|In-Memory OLTP|(Full version of the database) The table types are all memory-optimized, such that table-valued parameters (TVPs) all benefit from memory-optimization.<br/><br/>The two monitoring tables, `Warehouse.VehicleTemperatures` and `Warehouse.ColdRoomTemperatures`, are memory-optimized. This allows the ColdRoomTemperatures table to be populated at higher speed than a traditional disk-based table. The VehicleTemperatures table holds the JSON payload and lends itself to extension towards IoT scenarios. The VehicleTemperatures table further lends itself to scenarios involving EventHubs, Stream Analytics, and Power BI.<br/><br/>The stored procedure `Website.RecordColdRoomTemperatures` is natively compiled to further improve the performance of recording cold room temperatures.|
10+
|Row-level security (RLS)|Row Level Security (RLS) is used to limit access to the Customers table, based on role membership. Each sales territory has a role and a user. To see this in action, use the corresponding script in sample-script.zip, which is part of the [release of the sample](http://go.microsoft.com/fwlink/?LinkID=800630).|
11+
|Real-time Operational Analytics|(Full version of the database) The core transactional tables `Sales.InvoiceLines` and `Sales.OrderLines` both have a non-clustered columnstore index to support efficient execution of analytical queries in the transactional database with minimal impact on the operational workload. Running transactions and analytics in the same database is also referred to as [Hybrid Transactional/Analytical Processing (HTAP)](https://wikipedia.org/wiki/Hybrid_Transactional/Analytical_Processing_(HTAP)). To see this in action, use the corresponding script in sample-script.zip, which is part of the [release of the sample](http://go.microsoft.com/fwlink/?LinkID=800630).|
12+
|PolyBase|To see this PolyBase in action, using an external table with a public data set hosted in Azure blog storage, use the corresponding script in sample-script.zip, which is part of the [release of the sample](http://go.microsoft.com/fwlink/?LinkID=800630).|
13+
|In-Memory OLTP|(Full version of the database) The table types are all memory-optimized, such that table-valued parameters (TVPs) all benefit from memory-optimization.<br/><br/>The two monitoring tables, `Warehouse.VehicleTemperatures` and `Warehouse.ColdRoomTemperatures`, are memory-optimized. This allows the ColdRoomTemperatures table to be populated at higher speed than a traditional disk-based table. The VehicleTemperatures table holds the JSON payload and lends itself to extension towards IoT scenarios. The VehicleTemperatures table further lends itself to scenarios involving EventHubs, Stream Analytics, and Power BI.<br/><br/>The stored procedure `Website.RecordColdRoomTemperatures` is natively compiled to further improve the performance of recording cold room temperatures.<br/><br/>To see an example of In-Memory OLTP in action, see the vehicle-locations workload driver in workload-drivers.zip, which is part of the [release of the sample](http://go.microsoft.com/fwlink/?LinkID=800630).|
1314
|Clustered columnstore index|(Full version of the database) The table `Warehouse.StockItemTransactions` uses a clustered columnstore index. The number of rows in this table is expected to grow large, and the clustered columnstore index significantly reduces the on-disk size of the table, and improves query performance. The modification on this table are insert-only - there is no update/delete on this table in the online workload - and clustered columnstore index performs well for insert workloads.|
1415
|Dynamic Data Masking|In the database schema, Data Masking has been applied to the bank details held for Suppliers, in the table `Purchasing.Suppliers`. Non-admin staff will not have access to this information.|
15-
|Always Encrypted|The AccountNumber field uses AlwaysEncrypted. Unfortunately, at present, it cannot also use data masking.<br/><br/>A demo for Always Encrypted is included in the downloadable samples.zip. The demo creates an encryption key, a table using encryption for sensitive data, and a small sample application that inserts data into the table.|
16+
|Always Encrypted|A demo for Always Encrypted is included in the downloadable samples.zip, which is part of the [release of the sample](http://go.microsoft.com/fwlink/?LinkID=800630).. The demo creates an encryption key, a table using encryption for sensitive data, and a small sample application that inserts data into the table.|
1617
|Stretch database|The `Warehouse.ColdRoomTemperatures` table has been implemented as a temporal table, and is memory-optimized in the Full version of the sample database. The archive table is disk-based and can be stretched to Azure.|
1718
|Full-text indexes|Full-text indexes improve searches for People, Customers, and StockItems. The indexes are applied to queries only if you have full-text indexing installed on your SQL Server instance. A non-persistent computed column is used to create the data that is full-text indexed in the StockItems table.<br/><br/>`CONCAT` is used for concatenating the fields to create SearchData that is full-text indexed.<br/>To enable the use of full-text indexes in the sample execute the following statement in the database:<br/><br/> `EXECUTE [Application].[Configuration_ConfigureFullTextIndexing]`<br/><br/>The procedure creates a default fulltext catalog if one doesn’t already exist, then replaces the search views with full-text versions of those views).<br/><br/>Note that using full-text indexes in SQL Server requires selecting the Full-Text option during installation. Azure SQL Database does not require and specific configuration to enable full-text indexes.|
1819
|Indexed persisted computed columns|Indexed persisted computed columns used in SupplierTransactions and CustomerTransactions.|

samples/databases/wide-world-importers/documentation/wwi-overview.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ These are additional workflows.
3838
- Cold room temperatures. Perishable goods are stored in refrigerated rooms. Sensor data from these rooms is ingested into the database for monitoring and analytics purposes.
3939
- Vehicle location tracking. Vehicles that transport goods for WWI include sensors that track the location. This location is again ingested into the database for monitoring and further analytics.
4040

41-
## Version of the application
42-
43-
World Wide Importers has migrated from their previous system to this new SQL Server WWI database system starting January 1, 2013. They migrated to the latest version of SQL Server and started leveraging Azure SQL Database in 2016 to benefit from all the new capabilities.
44-
4541
## Fiscal year
4642

4743
The company operates with a financial year that starts on November 1st.

samples/databases/wide-world-importers/wwi-database-scripts/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Construct WideWorldImporters OLTP Database
22

3-
The scripts in this folder are used to construct the WideWorldImporters database from scratch on SQL Server or Azure SQL Database.
3+
The scripts in this folder are used to construct the WideWorldImporters database from scratch on SQL Server or Azure SQL Database. It is possible to vary the data size (see step 6 in the instructions below).
4+
5+
A pre-created version of the database is available for download as part of the latest release of the sample: [wide-world-importers-release](http://go.microsoft.com/fwlink/?LinkID=800630).
46

57
### Contents
68

@@ -20,7 +22,7 @@ The scripts in this folder are used to construct the WideWorldImporters database
2022
1. **Key features:** Core database features
2123
1. **Workload:** OLTP
2224
1. **Programming Language:** T-SQL
23-
1. **Authors:** Greg Low, Jos de Bruijn
25+
1. **Authors:** Greg Low, Denzil Ribeiro, Jos de Bruijn
2426
1. **Update history:** 25 May 2016 - initial revision
2527

2628
<a name=before-you-begin></a>
@@ -33,7 +35,7 @@ To run this sample, you need the following prerequisites.
3335

3436
<!-- Examples -->
3537
1. SQL Server 2016 (or higher) or an Azure SQL Database.
36-
2. SQL Server Management Studio, preferably 2016 April Preview or later (version >= 13.0.14000.36)
38+
2. SQL Server Management Studio, 2016 June release or later (version >= 13.0.15000.23)
3739

3840

3941
<a name=run-this-sample></a>
@@ -57,8 +59,7 @@ Note that each time the databases are reconstructed from empty, they will contai
5759
5. Execute the script **5-wwi-load-seed-data.sql**. This script populates the seed data required for the database. It will typically take a few minutes to execute.
5860

5961
6. Execute the script **6-wwi-data-simulation.sql**. This script runs data simulation to populate the transaction tables. It can take 20-30 minutes to execute.
60-
61-
The statements in this script remove the temporal nature of the tables, and implements a series of triggers. They then emulate typical activities that would occur during each day. Finally, they remove the triggers and re-establishes the temporal tables. You can see the progress of the simulation in the Messages tab in SSMS as the query executes. (IsSilentMode = 1 produces just date output if AreDatesPrinted = 1. When 0, it produces much more detailed output about each task being undertaken).
62+
<br/><br/>The statements in this script remove the temporal nature of the tables, and implements a series of triggers. They then emulate typical activities that would occur during each day. Finally, they remove the triggers and re-establishes the temporal tables. You can see the progress of the simulation in the Messages tab in SSMS as the query executes. (IsSilentMode = 1 produces just date output if AreDatesPrinted = 1. When 0, it produces much more detailed output about each task being undertaken).
6263
Note that a different outcome is produced each time it is run as it uses many random values.
6364
StartDate and EndDate cover the period for generation. Other code populates the 2012 period when expanding the columnstore tables so do not populate back into 2012 or earlier with this procedure. The EndDate must also be at or before the current date as temporal tables do not allow future dates.
6465
You can configure the amount of data produced by modifying the number of orders per day. The default is 60 orders and produces a reasonable OLTP database size of around 93MB compressed. You are also able to configure how busy Saturday and Sunday are compared to normal Monday to Friday working days, as a percentage. The suggested values are 50% for Saturday and 0% for Sunday.

samples/databases/wide-world-importers/wwi-dw-database-scripts/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The scripts in this folder are used to construct the WideWorldImportersDW database from scratch on SQL Server or Azure SQL Database.
44

5+
A pre-created version of the database is available for download as part of the latest release of the sample: [wide-world-importers-release](http://go.microsoft.com/fwlink/?LinkID=800630).
6+
57
### Contents
68

79
[About this sample](#about-this-sample)<br/>
@@ -20,7 +22,7 @@ The scripts in this folder are used to construct the WideWorldImportersDW databa
2022
1. **Key features:** Core database features
2123
1. **Workload:** OLTP
2224
1. **Programming Language:** T-SQL
23-
1. **Authors:** Greg Low, Jos de Bruijn
25+
1. **Authors:** Greg Low, Denzil Ribeiro, Jos de Bruijn
2426
1. **Update history:** 25 May 2016 - initial revision
2527

2628
<a name=before-you-begin></a>

samples/databases/wide-world-importers/wwi-integration-etl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This SSIS project performs ETL from the transactional database WideWorldImporter
2121
1. **Key features:** Core database features
2222
1. **Workload:** ETL
2323
1. **Programming Language:**
24-
1. **Authors:** Greg Low, Jos de Bruijn
24+
1. **Authors:** Greg Low, Denzil Ribeiro, Jos de Bruijn
2525
1. **Update history:** 25 May 2016 - initial revision
2626

2727
<a name=before-you-begin></a>

0 commit comments

Comments
 (0)