Demo: Adventure Works Racing Community - MSDN

siberiaskeinΔιαχείριση Δεδομένων

20 Νοε 2013 (πριν από 3 χρόνια και 6 μήνες)

226 εμφανίσεις









Demo Script

Adventure Works Racing Community Demo


Lab version:

1.0.0

Last updated:

11/20/2013






Contents

Overview

................................
................................
................................
................................
................................
................................
.......
3

Key Messages

................................
................................
................................
................................
................................
................................
............

3

Demo Diagram

................................
................................
................................
................................
................................
................................
..........

4

Key Technologies
................................
................................
................................
................................
................................
................................
.......

4

Time Estimat
es

................................
................................
................................
................................
................................
................................
..........

5

Setup and Configuration

................................
................................
................................
................................
................................
................
5

Task 1


Running the Configuration Wizard

................................
................................
................................
................................
.........................

5

Demo Flow

................................
................................
................................
................................
................................
................................
....
8

Opening Statement

................................
................................
................................
................................
................................
........................
8

Step
-
by
-
Step Walkthrough

................................
................................
................................
................................
................................
.............
9

Preparing the Environment

................................
................................
................................
................................
................................
.......................

9

Segment #1


FileStream

................................
................................
................................
................................
................................
........................

13

Segm
ent #2


Spatial

................................
................................
................................
................................
................................
...............................

24

Segment #3


Data Mining

................................
................................
................................
................................
................................
......................

30

Summary

................................
................................
................................
................................
................................
................................
.....

34




Overview

This document provides setup documentation, step
-
by
-
step instructions, and a written script for showing the SQL Server 2008 AdventureWorks
Racing Community demo application
functionality and code. This document can also serve as a tutorial or walkthrough of the technologies being
exposed.

This demo is aimed to show
some of the new

capabilities of SQL Server 2008

such as Spatial, FILESTREAM and Data Mining,

integrated
in

a

rich
web application.
This demo is built around the concept that Adventure Works Cycles has decided to launch an online community for bicycle
racing
enthusiast
. This web application allows users to explore video content by clicking a point on a race map c
orresponding to where the video
was shot. The demo relies on spatial data to store the location of the
videos

and to calculate the shortest distance to a certain point;
and
it uses
Filestreams to store the
videos (
binary data) into a file system managed by

SQL server
.

Additionally, targeted ads are shown to the user based on
information in their online community profile. Data Mining is used to
analyze

historical purchases in the Adventure Works Data Warehouse to
determine the demographics most likely to pur
chase certain products.

Key Messages

1.

You will learn how to
use spatial data
,
and the included geo
-
spatial functions to perform calculations on the new data types
.

2.

You will learn how to
store

videos

and other binary data in

SQL Server
using the new
Filestream data type
.

3.

You will learn how
to use
Data Mining
for analyzing
historical data to determine the products
that

the users will likely buy
.

Demo Diagram


Figure
1

Demo diagram


Key Technologies

This demo uses the following

technologies:

1.

Microsoft SQL Server 2008
R2
Spatial data

2.

Microsoft SQL Server
2008 R2
Filestream

3.

Microsoft SQL Server 2008
R2
Data Mining


Time Estimates



Estimated time for setting up and configuring the demo: 15 min



Estimated time to complete the demo: 4
5

min



Setup and Configuration

System Requirements



Microsoft Visual Web Developer 2008 (Express Edition)

or Microsoft Visual Studio 2008



Microsoft SQL

Server 2008
R2



Microsoft SQL
Server Management Studio



Microsoft
Expression Encoder 3
.0

Note:
The application uses

the

Expr
ession Encoder
3 SDK
to upload videos

(encode and generate thumbnails)
.




Microso
f
t Office Excel 2010 or Microso
f
t Office Excel 200
7



Microsoft SQL Server 2008 Data Minin
g Add
-
ins for Microsoft Office 2007

The setup and configuration for this demo involves running
the Configuration Wizard tool

included with the training kit.

After going through the
demo, you can run the
Cleanup.cmd

script to revert any changes made to your

system.


Task 1


Running the Configuration Wizard

The following steps describe how to run the Configuration Wizard tool included with the demo to verify that all the prerequis
ites are properly
installed.

1.

B
rowse to
the
setup

folder in the
Source

folder of this
demo
, and run the
Setup.cmd

script
.
This script will launch the Configuration
Wizard for the demo. The Configuration Wizard is designed to check your computer to ensure that it is properly configured wit
h all of
the dependencies needed to r
un the demo.

2.

Click through the steps in the Configuration Wizard to get to the
Detecting Required Software

step;

a scan of prerequisites will be
performed on your computer. If you do not have the necessary dependencies, install them using the links provide
d by the tool and
rescan your computer.


Figure
1

Dependencies check completed successfully


3.

Once the required software is properly installed click
Next

to configure your computer for this demo. A script will be executed to
c
reate
the
AdventureWorksRacingCommunity

database, other to enable the upload video functionality in the solution (only if Expression
Encoder
3
.0 is installed)

and another
to create the server alias ('
SQLServerTrainingKitAlias') used
in this demo to establi
sh a connection
with the database
.

Note:
To avoid security issues while restoring the
AdventureWorksRacingCommunity

database in SQL Server you should preferable
locate the setup files outside the
User
s
folder
,

since

the account running SQL Server service may
not be allowed to
write the .mdf and
.log files

there
.



Watch Out



Windows Server 2003

Users

If you receive an error when the
Configuration Wizard
is restoring the
AdventureWorksRacingCommunity

database, swi
tching the SQL
Server service to run using the
LocalService

account can
solve your problem
.

To do this, click
Start
, point to
Administrative Tools
, and
then click
Services
. Locate the
SQL Server

service and double
-
click it to open the
Properties

sheet. Go
to the
Log On

tab, and click the
Browse

button.

Type
LOCAL SERVICE

in the textbox, click
Check Names
, and then click
O
K
. Finally, click
OK

in the
Properties

window to
accept the changes.

After this, right
-
click the service and click
Restart
.



Figure
2

Configuration Wizard tasks



Demo Flow

The following diagram illustrates the high
-
level flow for this demo and the steps involved:


Figure
2

Demo flow


Opening Statement

SQL Server 2008 is more
th
an

a bit
-
bucket for storing data
. I
t

inspires developers to create
applications that are even more engaging

by using
Spatial and FILESTREAM features. SQL Server 2008 Data Mining empowers developers to leverage their data as an asset to build
new business
models

more effectively
.

These exciting new features

enable applications to provide a richer user experience.

This demo is built around the concept that Adventure Works Cycles has decided to launch an online community for bicycle racin
g enthusias
ts
.
This
web application allows users to upload videos and click a point on a race map corresponding to where the video was shot. Addi
tionally,
targeted ads are shown to the user based on information in t
heir online community profile.
Data Mining is used to
analyze

historical purchases
in the Adventure Works Data Warehouse to determine the demographics most likely to purchase certain products.

In this demo, you will specifically learn these things:

1.

You will learn how to use spatial data, and the included geo
-
spatial

functions to perform calculations on the new data types.

2.

You will learn how to store videos
and other binary data in

SQL Server using the new Filestream data type.

3.

You will learn how
to use
Data Mining for
analyzing

historical data to determine the produc
ts that the users will likely buy
.



Step
-
by
-
Step Walkthrough

This demo is composed of the following segments:

1.

Storing files with the FILESTREAM data type

2.

Using Spatial data

3.

Taking advantage of Data Mining


Prepar
ing the

Environment

Action

Script

Screens
hot

1.

Set Font Size to large 120 dpi



Right
-
click desktop



Select Personalize



Select Adjust Font Size (DPI)



Select Larger Scale…

2.

Screen Size to 1024x768

3.

T
urn off Communicator, Outlook,
Messenger, etc.

4.

In
Microsoft Visual Web Developer
2008
,
o
pen

AdventureWorksRacingCommunity

solution. To do this,

browse to the
code

folder in the
Source

folder of
this demo and double
-
click the
AdventureWorksRacingCommunity
.
sln

file
.



Open
BLL
\
Media
\
Hosting
\
SqlServerFile
streamHost.cs



Set breakpoint at start of
transa
ction (
below the
commented line “
// Breakpoint:
Start of transaction

)



Set breakpoint at
SQLCommand

statement (
below the
commented line “
// Breakpoint:


This should be done before the
demo begi
ns to prepare your
environment.


SQLCommand statement

)



Set breakpoint at obtaining the
file handle
(
below the
commented line “
// B
reakpoint:
Obtaining file handle

)



Set breakpoin
t at Transaction
commit
(
below the commented
line “
// Breakpoint: Transaction
commit

)



Set breakpoint at loo
p through
writing to
the
d
ata
b
ase

(
below
the commented line “
//
Breakpoint: Writing to database

file handle

)




Disable all Breakpoints for now
.
Point to
Debug

|

Disable All
Breakpoints
.

5.

Open
the presentation
AdventureWorksRacingCommunity.
pptx

located under the
u
nit

Adventure Works Racing
Community
”.

6.

(Segment 3)

Restore the Data Mining
Structure in the SQL Server Analysis
Service Instance.

To do this:



C
onnect to Analysis Services in
Management Studio




R
ight click on
Databases

and click
Restore
.



The

AdventureWorksRacingDM.abf

b
ackup file

is located
inside
t
he

BI

folder at the
Source

of this
demo
.



Name the database
AdventureWorksRacingDM
,

and
click

OK
.



7.

(Segment 3)

Configure the Analysis
Services connection in the Excel Data
Mining Add
-
In. To do this:



Open
Microsoft Excel
(having
previously installed the Data
Mining Add
-
In)



Click the
Data Mining

ribbon.



In the
Connection

section, click
<
No Connection
>
.



Click
New
.



Fill the following fields, and click


OK
:



Server name:

localhost



Catalog name
:
A
dventureWorksRacingDM



Segment #1


FileStream

Action

Script

Screenshot

1.

Launch
the
web application from
Visual Studio in debug mode. Right
-
click the
Web

project in
Solution
Explorer
, select
Debug

and click
Start
new instance
.



Let u
s run the AdventureWorks
Racing Community Application.
Currently, it has
data from a
race
called “Le Tour de Microsoft”

loaded
into the database.


2.

Click
a
ny location

in the
map
and
allow
a short video to play

about
the
“Le Tour de Microsoft” race
.



These videos are being stored in SQL
Server using the new FILESTREAM
data type.



The map is using SQL Server 2008
Spatial features. We will see this in
more depth soon.



As you can see, the blue
pinpoints on
the map represent the location
where the videos were taken.


3.

Click on a location on the map close
to one of the pinpoints.



The video that is played by default is
the nearest shot from the spot we
have clicked in the map.



Be
low
we have some

thumbnails
with their previews also
listed and
sorted by their distance from the
click.


4.

Click the
Sign In

button
.

5.

Enter the following credentials and
click the
Sign In

button



User Name:
demo



Password:
demo



Let u
s sign in, so we can navigate
through

additional features of the
application.


6.

Click

the

Upload a Video

tab
.

7.

Browse to a video on the file

system
(Samples
Videos in Windows Vista
are
located in
C:
\
Users
\
Public
\
Videos
\
Sample
Videos
)
.

Note
:

Wait a couple of seconds for the
video to be available
.

8.

Click
the
area on the map where the
video was taken
.

9.

Enter sample Title, Description, and
Tags
.



The
U
pload
V
ideo
s

page is where
users can contribute with content.



SQL Server will store
the location of
that video using Spatial
, and the
video

bits using FileStream
.




SQL Server 2008 provides the
capability of storing large binary data
objects, such as videos, music, Office
documents and so on in the NTFS file
system rather than in a databas
e file.



You should consider using
FILESTREAM when:



Objects that are being sto
red are,
on

average, larger than 1 MB.


10.

Click Upload
.



Fast read access is important.



You are developing applications
that

use a middle tier for
application logic.



Now let

u
s take a deeper look a
t
the

FileStream

data type
.

11.

Switch to

Ad
ventureWorksRacingCommunity

PowerPoint

deck

previously opened
during the
Preparation

phase
.

12.

Launch the FileStream slide

(number
4)
.

This slide contains animations.



SQL Server maps a database over a
set of
operating
-
system files. Data
and log information are never mixed
in the same file, and individual files
are used only by one database.
Filegroups are named collections of
files and are used to help with data
placement and administrative tasks
such as backu
p and restore
operations.



As you can see in this slide, the data
is being stored in SQL Server
FileStream FILEGROUP, which is a
user
-
defined filegroup.



A
User
-
defined filegroup

is
specified
by using the FILEGROUP keyword in
a CREATE DATABASE or ALTER
DATAB
ASE statement


13.

Click
right arrow

in PowerPoint
to
advance to the next animation, and
show
the
video upload

process.



Videos are uploaded to the server via
HTTP
,

and
persisted using

high
-
performance Win32 streaming API’s
to write the data to SQL Server.

We

will be taking a deeper look at that
code in a minute.


14.

Switch to
SQL Server Management
Studio
.

15.

Expand Object Explorer to show
Databases

|
AdventureWorksRacingCommunity

| Tables |
dbo.Videos
|
Columns
.



Now
we wi
ll

take a look at SQL
Server Management Studio.



Let u
s see the structure of the Videos
table.




T
he

BinaryFileKey

column

is the
ROWGUID uniqueidentifier that must
be present in every table that uses
FileStream
.



The

video bits are stored in

the

BinaryFile

field
. It’s a
column of
varbinary(max)

type with the
FILESTREAM

attribute.




Finally, the
Location

column
use
d to
store the geo
-
location

is
of
GEOGRAPHY

type
.

16.

Switch to Visual Studio
.

17.

Point to

Debug

and
cli
ck
Enable all
Breakpoi
nts
.



We are now going to
upload another
video and take a deeper look at the
code.


18.

Switch to Internet Explorer
.

19.

Click
Upload a Video
.

20.

Browse to a video on the
file system
.

21.

Click area on the map where the
video was taken
.

22.

Type a sample Title, Description and
Tags
.

23.

Click
Upload
.



This is a multi
-
tier architecture that
uses
Expression Media Encoder

to
optimize the uploaded video for
Silverlight Streaming.


Note
:

You may receive a
timeout
error

i
f you
stay

“too long”
within a
breakpoint
.


24.

Switch to Visual Studio

Note
:

Take into account that it will take
about a minute for Visual Studio to
catch you in the debugger because it
forks the process for uploading the
video.
It will be faster if you select a
smaller file.




Visual Studio will catch the first
breakpoint on the st
art of the
transaction.



One of the powerful things of using
FileStream is that
SQL Server ensures
data
-
level consistency between the
relational data in the database and
the unstructured data that is
physically stored on the file system.
A FILESTREAM column

behaves
exactly the same as a BLOB column,
which means full integration of
maintenance operations such as
backup and restore, complete
integration with the SQL Server
security model, and full
-
transaction
support.


25.

Click
F5

to advance to next
breakpoint
.

26.

Copy the first part of the SELECT
statement

(without the where
clause) stored in
the
FileStreamQueryCommandText

variable
:

C#

SELECT BinaryFile.PathName(),
GET_FILESTREAM_TRANSACTION_CONTEX
T() FROM dbo.Videos




This should advance to the
breakpoint showing
the SELECT
Statement



SQL Server is using the User Defined
Types to implement the new
FileStream

and
Spatial

data types
.



Let

u
s switch to
Management Studio

to see what this statement returns.


27.

Switch to
Management Studio
.

28.

Select
New Query
.

29.

Ensure that it
i
s using
AdventureWorksRacingCommunity

database
.

30.

Paste SELECT statement from above
into query window
.

31.

Click
Execute
.

32.

Double click first column header to


You can see that
SQL Server
generates a virtual path that

to
obtain a file handle
to

use with the
Win32 streaming API’s.



You cannot access this kind of f
iles
by using
C:
\
PATH_TO_FILE

as if they
were
stored
in
the traditional way
.


expand column width
.

33.

Switch to Visual Studio.

34.

Click
F5

to advance to breakpoint for
obtaining a handle.



T
his handle is used fo
r obtaining
standard System.IO file operations


35.

Click
F5

to advance to breakpoint for
looping and writing data to database
.

36.

Click
F5

to advance to breakpoint for
committing the transaction
.



T
he
uploaded
file is split into
chunks

whose size can be
configured,

and
it
is
stored

in
to the database in the
exact same way as
writing

to the file
system.



Those entire

file operations are
transaction
-
safe
, being this

one of
the key benefits
of

having all data
managed by SQL Server.



37.

Click
right arrow

in Pow
erPoint
to
advance to the next animation, and
show
the
video
streaming process.



A

Custom
HTTP handler

is accessing
the FileStream data using the high
-
performance Win32 stream API’s.
This module is being accessed by a
Silverlight client via HTTP.


38.

Switch to
Visual Studio

and open the
SqlFileStreamMediaHandler.cs

file
located inside the
StreamMediaHandler
project.



We have
built

an HTTP handler in C#
that reads data from FileStream. This
handler will be in charge of
receiving

a
l
l the

requests
made
to
media
, and
retrieving the current bits
.


39.

Switch to S
QL
S
erver
M
anagement
S
tudio.

40.

Open
the
Scratch.sql

script located
in
side the
scripts

folder at the
Source

folder of this demo.

41.

Highlight
the
SELECT statement
inside the

Get information about
loaded
videos
” section
.

42.

Execute the query.

43.

Copy
the
VideoUrl
of

one

random

row
.



Now that
we have

seen how videos
are s
treamed
,

let

u
s see it in action.



E
xecute
the
query
that gets
information about
the
videos stored
in the database.



The

VideoUrl field represents

the
path to our local
Visual Studio
Development Web
Server, which

will
be caught by our Handler above.


44.

Open I
nternet
E
xplorer
.

45.

Paste
VideoUrl

from query above
into location
.



The handler processes the request
for the current file through
FILESTREAM, and

plays the video
directly in Windows Media Player.





We have

seen a real world example

of how to implement FILESTREAM.
By using
FILESTREAM
you will take
advantage
of the great
manageability and transaction
consistency of the
SQL Server engine,

in
addition to the high perfor
mance
of Win32 streaming API’s.



Now that we have seen FileStream
let

u
s

take a closer look at Spatial.



Segment #2


Spatial

Action

Script

Screenshot

1.

Switch to PowerPoint
.

2.

Launch
the
Spatial

slide by pressing
S
HIFT
+F5

(
s
lide
5).

3.

Click
right arrow

in PowerPoint
to
advance to the next animation, and
show

the

race map image
.



W
e wanted to show the separation
of SQL Server and Virtual Earth in
addition to removing the Internet
dependencies in the demo.



We implemented Spatial for
this
app
lication

by storing the
background image

of the
racecourse

as a JPG
using
FileStream.



SQL Server 2008 supports the
geometry and geography data types
for storing spatial data. These types
support methods and properties that
allow

the creation, compa
rison,

analysis,
and retrieval

of spatial data.

4.

Click
right arrow

in PowerPoint
to
advance to the next animation, and
show
the racecourse polygon.



SQL Server has two spatial data
types:
Geometry

and Geography.
Both are implemented as common
language run
time (CLR) data types in
SQL Server.



Geometric

represents data in a
Euclidean (flat) coordinate
system,

while
geography

represents data in a
round
-
earth coordinate system. The
SQL Server
geography

data type
stores ellipsoidal (round
-
earth) data,
such as GP
S latitude and longitude
coordinates.



T
he race route is stored as a polygon
using the
GEOGRAPHY

spatial type.
T
he code at the bottom of the slide
show
s

that
it is

just a collection of
points.


5.

Click
right arrow

in PowerPoint
to
advance to the next animation, and
show the map center point.


6.

Click
right arrow

in PowerPoint to
advance to the next animation, and
show the ground scale of the map.



I
n order to
make the mapping
possible between

the
pixel of a click
in the map and

th
e

Spatial location
points,
we need to know the map
center point and ground scale.



7.

Click
right arrow

in PowerPoint
to
advance to the next animation, and

show the Videos table
.

8.

Click
right arrow

in PowerPoint
to
advance to the next animation, and

show
the

Location

column
.



The Video table has a GEOGRAPHY
column
used for

storing the Point
geo
-
location of the video.


9.

Click
right arrow

in PowerPoint
to
advance to the next animation, and
show the

Binary File

column
.



All
b
inary data is stored as
FileStream.



Now
let u
s

take a look at what can
be done with Spatial queries.


10.

Switch to S
QL
S
erver
M
anagement
S
tudio
.

11.

Open
Scratch.sql
.

12.

Highlight
the statement inside the

Sample Spatial query

section at
bottom of
the
file
.

13.

Execute

the query

by pressing
F5
.



T
he
results of the query show Videos
sorted from map center point.



All geometry instances have
several

properties that can be retrieved
through
functions

provided by

SQL
Server
.



In the application, we use the
STDistance function to get the
shortest distance be
tween
the video
location
a
nd the selected spot in the
map
.



Let

u
s look
other ways in which
we
used th
ese functions

in our
app
lication
.


14.

Switch to Visual Studio
.

15.

Open
Web/Map.aspx.cs
.

16.

Highlight at the top of the file

following using statement.

C#

using
Microsoft.SqlServer.Types;

17.

Set breakpoint at line

74
:

C#



The Microsoft.SqlServer.Types using
statement
allows us to
use

.Net
objects
that

match the
SQLGEOGRAPHY

types
.


string commandText =

Select

...

18.

Switch to web app
lication in the
browser
.

19.

Click on map
or refresh the page (
F5
)
which will get Visual Studio to catch
the
previously inserted
breakpoint
.



We will click on the map just to catch
the breakpoint
.


20.

Show that we have a local version of
the SqlGeography type
.

21.

Press
F10

to step through code
.

22.

Press
F5

to
return to the web
application
.

23.

Disable breakpoints
.



Let u
s see
Spatial functions being
used in C#

looking at the code
.



There are two data types for spatial
Geometry and Geography. In the
demo we use the Geometry data
type. For example some useful
Geometry

functions are:



STDifference
, which

returns the

points from one geometry
instance that do not lie in
another instance.



STDistance
, which returns the
shortest distance between two
point



STIntersects
, which returns true

if two geometry instances
intersect.



STLength
,
which returns the total

length of the elements in a
geometry instance.



STWithin

returns true if a
geometry in
stance is completely
within another one. The opposite
of
STContains
.



Spatial has enabled a new user
interface feature
s for applications
that use maps, locations, and so on
.



Segment #3


Data Mining

Action

Script

Screenshot

1.

Switch to
the
web app
lication

in the
browser.



Have you noticed the ads

at the
bottom of the screen
?



AdventureWorks hopes the site will
generate new customers and
increase
its
sales to existing
customers by using target
e
d
advertising.


2.

Click on
Account

(make sure you are
still signed in)
.



W
e have a bunch of great
demographic
data;

therefore,

we can
use
the
results of data mining to
target the advertising.


3.

Open the

Data Mining Excel file

AdventureWorksRacingDM1.xlsx

located
inside the
BI

folder at the

Source

folder of this demo
.

Note
:

For this segment you will need
SQL Server Standard (or above)
supporting

Analysis Services.

4.

Create a new connection
.

5.

Scroll
from
left to right through the
data
.



To make this spreadsheet w
e pulled
in data from AdventureWorks data
warehouse. We have rolled up the
most expensive item that each
customer has bought from
the store

along with demographic information
for
those customers
.


6.

Click
on
Data Mining

Ribbon
.



W
e are using the SQL Server
2008
Data Mi
ning Add
-
ins
. These take
advantage of SQL Server 2008
Analysis Services

features like
automatic sampling.

You can
download the add
-
in for free from
Microsoft’s Download Center.


7.

Click on Advanced
-
> Add Model to
Structure
.

Note
:

See the
S
tep
6

and
S
tep 7

of
Preparing

the
Environment
section

to
see

how to create the Data Mining
Structure in Analysis Services
, and
configure the new connection in Excel
.

8.

Select vTargetCommunityAds
Structure
,

and click

Next
.

9.

Select NaiveBayes
Algorithm
, and
click
Next
.

10.

Set EnglishProductSub
c
ategoryName
to Predict only
.



W
e have already created a Mining
Structure, which

includes all of the
fields in the dataset within

the table
in Excel.



We are going to use Naïve Bayes a
s
the

prediction
algorithm
.



With Data
Mining,

you can d
iscover
patterns and uncover business data
to reveal the hidden trends about
your products, customer, market,
and employees, and better analyze
tho
se components that are critical to
your organization's success.



A
fter
analyzing

the data for a
while,

we determined that Sub
c
ategory

11.

Set EnglishProductCategoryName to
Do not use
.

12.

Set Model to
Do not use
, and click

Next
.

13.

Click
Finish
.

was the right level of fidelity.


14.

Select

the

Dependency Network tab
.

15.

Select the
EnglishProductSubCategoryName

attribute
.

16.

Select one of the other attributes
.



A
ll of the attributes are pointing
towards
EnglishProductSubCategoryName
and they are all used
for

determin
ing

the influence on that value.


17.

Select
Attribute
Discrimination

tab
.

18.

Shrink Mining Legend as small as
possi
ble on right of screen
.

19.

Drop down through the Value 1 list
selecting a few different values
.



T
he attributes that show up with
large blue bars in the Value 1 column
are predictors of
someone’s

like
hood

to purchase that product if
they match the given demographic.



Developers can then implement logic
within the web application to target
ads at customers matching
the
demographic
.





SQL Server 2008 is more
than

a bit
-
bucket for storing dat
a.

Inspire
developers to create
applications
that are
even
more
engaging
by
taking advantage of
Spatial and
FILESTREAM features.



SQL Server 2008 Data Mining
empowers developers to leverage
their data as an asset to build new
business models.




Summary

In

this demo, you saw how to the new SQL Server 2008 capabilities can be integrated in a rich application. You have learnt how t
o store large
binary objects using Filestream, you learnt how to use the new spatial data and perform calculations with it. Finall
y, you saw how data mining
can be used to provide information that might be of interest for the users

based on their demographic information
.