You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/databases/wide-world-importers/documentation/wwi-data-generation.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,12 +11,14 @@ To generate sample data up to the current date, follow these steps:
11
11
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).
12
12
2. Execute the following statement in the database:
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.
22
24
@@ -30,6 +32,8 @@ To import sample data up to the current date in the OLAP database WideWorldImpor
30
32
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).
31
33
3. Reseed the OLAP database by executing the following statement in the database:
32
34
35
+
```
33
36
EXECUTE [Application].Configuration_ReseedETL
37
+
```
34
38
35
39
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).
Copy file name to clipboardExpand all lines: samples/databases/wide-world-importers/documentation/wwi-olap-installation.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,8 @@ To import a bacpac into a new SQL Database, you can use Management Studio.
44
44
45
45
## Configuration
46
46
47
+
[Applies to SQL Server 2016 (and later) Developer/Evaluation/Enterprise Edition]
48
+
47
49
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.
48
50
49
51
1. In SQL Server Management Studio, connect to the WideWorldImportersDW database and open a new query window.
Copy file name to clipboardExpand all lines: samples/databases/wide-world-importers/documentation/wwi-oltp-htap-sql-features.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,13 @@ WideWorldImporters is designed to showcase many of the key features of SQL Serve
7
7
|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.|
8
8
|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`.|
9
9
|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).|
13
14
|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.|
14
15
|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.|
16
17
|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.|
17
18
|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.|
18
19
|Indexed persisted computed columns|Indexed persisted computed columns used in SupplierTransactions and CustomerTransactions.|
Copy file name to clipboardExpand all lines: samples/databases/wide-world-importers/documentation/wwi-overview.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,10 +38,6 @@ These are additional workflows.
38
38
- 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.
39
39
- 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.
40
40
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
-
45
41
## Fiscal year
46
42
47
43
The company operates with a financial year that starts on November 1st.
Copy file name to clipboardExpand all lines: samples/databases/wide-world-importers/wwi-database-scripts/README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Construct WideWorldImporters OLTP Database
2
2
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).
4
6
5
7
### Contents
6
8
@@ -20,7 +22,7 @@ The scripts in this folder are used to construct the WideWorldImporters database
20
22
1.**Key features:** Core database features
21
23
1.**Workload:** OLTP
22
24
1.**Programming Language:** T-SQL
23
-
1.**Authors:** Greg Low, Jos de Bruijn
25
+
1.**Authors:** Greg Low, Denzil Ribeiro, Jos de Bruijn
24
26
1.**Update history:** 25 May 2016 - initial revision
25
27
26
28
<aname=before-you-begin></a>
@@ -33,7 +35,7 @@ To run this sample, you need the following prerequisites.
33
35
34
36
<!-- Examples -->
35
37
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)
37
39
38
40
39
41
<aname=run-this-sample></a>
@@ -57,8 +59,7 @@ Note that each time the databases are reconstructed from empty, they will contai
57
59
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.
58
60
59
61
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).
62
63
Note that a different outcome is produced each time it is run as it uses many random values.
63
64
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.
64
65
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.
Copy file name to clipboardExpand all lines: samples/databases/wide-world-importers/wwi-dw-database-scripts/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
The scripts in this folder are used to construct the WideWorldImportersDW database from scratch on SQL Server or Azure SQL Database.
4
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).
6
+
5
7
### Contents
6
8
7
9
[About this sample](#about-this-sample)<br/>
@@ -20,7 +22,7 @@ The scripts in this folder are used to construct the WideWorldImportersDW databa
20
22
1.**Key features:** Core database features
21
23
1.**Workload:** OLTP
22
24
1.**Programming Language:** T-SQL
23
-
1.**Authors:** Greg Low, Jos de Bruijn
25
+
1.**Authors:** Greg Low, Denzil Ribeiro, Jos de Bruijn
24
26
1.**Update history:** 25 May 2016 - initial revision
0 commit comments