Skip to content

developerdave/AdventureWorks-Dojo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The AdventureWorks sample databases are for the ficticious AdventureWorks -- a large, multinational manufacturing company. 
"The company manufactures and sells metal and composite bicycles to North American, European and Asian commercial markets. 
While its base operation is located in Bothell, Washington with 290 employees, several regional sales teams are located throughout 
their market base. In 2000, Adventure Works Cycles bought a small manufacturing plant, Importadores Neptuno, located in Mexico. 
Importadores Neptuno manufactures several critical subcomponents for the Adventure Works Cycles product line. These subcomponents 
are shipped to the Bothell location for final product assembly. In 2001, Importadores Neptuno became the sole manufacturer 
and distributor of the touring bicycle product group. Coming off a successful fiscal year, Adventure Works Cycles is looking to 
broaden its market share by targeting their sales to their best customers, extending their product availability through an external 
Web site, and reducing their cost of sales through lower production costs." 

The dojo uses the AdeventureWorksLT database available from http://msftdbprodsamples.codeplex.com/wikipage?title=AWLTDocs&ProjectName=msftdbprodsamples

The AdventureWorksLT database is based on the Adventure Works Cycles scenario, the purpose of the AdventureWorksLT database is to provide
a simple, small database sample focused on a product sales scenario.

AventureWorksLT is simpler in the following ways:
* The schema design is denormalised compared with AdventureWorks. 
* The quantity of data is reduced from 180mb down to 7mb.
* Instead of 5 schemas plus dbo in the database, AdventureWorksLT has one schema plus dbo in the database.
* Instead of 70 tables, AdventureWorksLT has 12 tables.


Sample Queries
/----------------------------------------------------------------------------------------

SELECT * FROM SalesLT.Customer;

SELECT * FROM SalesLT.Customer WHERE FirstName = N'Mary';

SELECT LastName FROM SalesLT.Customer 
WHERE FirstName = N'Mary';

SELECT LastName FROM SalesLT.Customer 
WHERE FirstName = N'Mary' 
ORDER BY LastName;

SELECT C.FirstName, C.MiddleName, C.LastName, C.CompanyName, 
A.AddressLine1, A.AddressLine2, A.City, A.StateProvince, 
A.CountryRegion, A.PostalCode 
FROM SalesLT.Customer AS C
JOIN SalesLT.CustomerAddress AS CA ON C.CustomerID = CA.CustomerID
JOIN SalesLT.Address AS A ON CA.AddressID = A.AddressID
WHERE C.FirstName = N'Mary';

SELECT C.LastName, Sum(SOH.TotalDue) 
FROM SalesLT.Customer AS C
JOIN SalesLT.SalesOrderHeader AS SOH ON C.CustomerID = SOH.CustomerID
WHERE FirstName = N'Walter'
GROUP BY C.LastName;

SELECT * from SalesLT.vGetAllCategories
/----------------------------------------------------------------------------------------

Features
/----------------------------------------------------------------------------------------

Customer Features.

Scenario: view customer list
	Given valid customers exist
	When I view the "customer list" page
	Then I should see a list of customers

Scenario: view customer orders
	Given a customer "David Hodgson" with orders
	When I view the "customer list" page
	And I view "David Hodgson" orders 
	Then I should see a list of orders

Scenario: search customer list
	Given the following customers exist
		|Title	|FirstName	|MiddleName	|LastName	|
		|Mr		|Dave		|Steven		|Green		|
		|Mr		|Dave		|NULL		|Smith		|
		|Ms		|Mary		|NULL		|Alexander	|
	When I type "Dave" into the customer search
	Then I should see the following customers
		|Title	|FirstName	|MiddleName	|LastName	|
		|Mr		|Dave		|Steven		|Green		|
		|Mr		|Dave		|NULL		|Smith		|
		
Scenario: customer login
	Given a customer "David Hodgson" with the username "david.hodgson" and the password "secret"
	When I go to the login page
	And I enter the username "david.hodgson" and the password "secret"
	Then I should be taken to the "my orders" page

About

Base Project Template for C# Coding Dojo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published