Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,880 --> 00:00:06,860
All right so to kick off this entire section about creating data models I figured it would only be appropriate
2
00:00:06,860 --> 00:00:08,680
to start with a simple question.
3
00:00:08,870 --> 00:00:11,870
What exactly is a data model.
4
00:00:11,870 --> 00:00:18,290
Now consider relationships view that looks like this got three different tables here a product lookup
5
00:00:18,290 --> 00:00:22,010
table and two data tables sales and returns.
6
00:00:22,010 --> 00:00:25,080
This alone is not a data model.
7
00:00:25,130 --> 00:00:31,550
What we're looking at here is a collection of independent tables which share no connections or relationships.
8
00:00:31,580 --> 00:00:37,520
So think of each of these tables as its own little island with no idea that the other two even exist
9
00:00:37,520 --> 00:00:38,570
in the model.
10
00:00:38,570 --> 00:00:44,090
And what that means is that if you were to try to do something like this breaking down of fields from
11
00:00:44,090 --> 00:00:50,870
the sales data like order quantity or IFIELD from the returns table like return quantity and break those
12
00:00:50,870 --> 00:00:57,290
quantities down by field from the product lookup table you're going to get the same grand total in every
13
00:00:57,290 --> 00:00:58,700
single row of the table.
14
00:00:58,850 --> 00:01:05,000
And again that's because both the sales and the returns data tables have no idea that there even is
15
00:01:05,000 --> 00:01:11,090
a product lookup table that exists in the universe let alone how to break down those quantity values
16
00:01:11,450 --> 00:01:13,760
by individual product names.
17
00:01:13,760 --> 00:01:21,520
So if this is not a data model then what is well let's consider that same structure that same relationships
18
00:01:21,520 --> 00:01:22,300
view.
19
00:01:22,300 --> 00:01:26,770
Except now we have relationships connecting the tables together.
20
00:01:26,770 --> 00:01:34,540
This is a data model and again it's a data model because the tables are now connected via relationships
21
00:01:34,900 --> 00:01:41,950
based on a common field or key which in this case is the product key column and without diving into
22
00:01:41,950 --> 00:01:49,330
the specifics just yet what this means is that if we revisit that same analysis looking at order quantity
23
00:01:49,420 --> 00:01:56,650
and return quantity by product names now we see the correct values because now the sales data table
24
00:01:57,040 --> 00:01:59,810
knows that the product lookup table exists.
25
00:01:59,830 --> 00:02:05,260
In fact it's connected to that product table based on the fact that they share a common product key
26
00:02:05,680 --> 00:02:11,040
and the same story holds for the returns data and its relationship to the product lookup.
27
00:02:11,050 --> 00:02:17,740
So as a result we're able to take any field from the product lookup table and filter and segment values
28
00:02:17,950 --> 00:02:19,760
from those two data tables.
29
00:02:19,780 --> 00:02:25,600
Now you'll see that same familiar Grand Total row at the bottom but now we get accurate numbers for
30
00:02:25,600 --> 00:02:27,610
each individual product.
31
00:02:27,610 --> 00:02:34,600
So this is obviously a relatively simple example but it's this core concept of joining and blending
32
00:02:34,600 --> 00:02:41,650
our data together using table relationships and common keys that will be the focal point of this entire
33
00:02:41,650 --> 00:02:43,130
section of the course.
34
00:02:43,330 --> 00:02:49,480
And it's this core concept that's going to enable us to do some really interesting really sophisticated
35
00:02:49,480 --> 00:02:51,070
analyses.
36
00:02:51,070 --> 00:02:54,440
So let's shift gears open up our venture works file.
37
00:02:54,520 --> 00:02:59,050
I want to show you what this looks like in the power be-I environment.
38
00:02:59,150 --> 00:02:59,490
All right.
39
00:02:59,490 --> 00:03:04,020
So once you opened up the Adventure Works report file you're going to want to make sure that you're
40
00:03:04,020 --> 00:03:08,990
using the latest version after the homework assignment from the last section.
41
00:03:09,120 --> 00:03:13,270
So you should see a product category and a product subcategory table.
42
00:03:13,380 --> 00:03:15,100
We're going to go into the report for you.
43
00:03:15,100 --> 00:03:21,270
Now for the first time there is going to be an entire deep dive section covering all of these visualization
44
00:03:21,270 --> 00:03:22,440
and reporting tools.
45
00:03:22,620 --> 00:03:28,290
But for now we're going to use one type of visual in particular called The Matrix which looks like this
46
00:03:29,390 --> 00:03:32,220
and The Matrix acts kind of like a pivot table.
47
00:03:32,260 --> 00:03:39,040
You can analyze values from a numerical field and break those values down by dimensions placed in rows
48
00:03:39,100 --> 00:03:40,150
or columns.
49
00:03:40,150 --> 00:03:45,730
So in this case our values are going to come from or A.W. sales table pacifically the order quantity
50
00:03:45,730 --> 00:03:46,810
field.
51
00:03:46,810 --> 00:03:53,350
So let's click and drag that order quantity to values and you'll see the total quantity from that column
52
00:03:53,770 --> 00:03:55,210
populate here in the matrix.
53
00:03:55,210 --> 00:03:57,820
Eighty four thousand one hundred seventy four.
54
00:03:57,820 --> 00:04:02,830
Now we want to break down this quantity or analyze it in a more detailed way.
55
00:04:02,830 --> 00:04:08,110
Our only option is to use fields that exist within this same sales table.
56
00:04:08,110 --> 00:04:14,560
So product keys for instance can be placed on the rows and now we see those Order quantities broken
57
00:04:14,560 --> 00:04:16,760
down at the product key level.
58
00:04:16,780 --> 00:04:23,440
So that's all well and good but we're extremely limited by the scope of that table and to show you what
59
00:04:23,440 --> 00:04:23,980
I mean.
60
00:04:23,980 --> 00:04:30,640
Let's go ahead and remove that product key Let's go into the product table itself which contains all
61
00:04:30,640 --> 00:04:37,030
sorts of interesting information about those products the price the name the description the color and
62
00:04:37,030 --> 00:04:44,220
let's say we want to break down those quantities by product name when we drag that field into rows.
63
00:04:44,230 --> 00:04:50,500
We get that same grand total over and over and over and over and over again which is the exact same
64
00:04:50,500 --> 00:04:53,140
issue that we saw earlier on the slide.
65
00:04:53,290 --> 00:04:58,810
The sales table has no idea that a product lookup table even exists as a result.
66
00:04:58,810 --> 00:05:04,390
It has no way to break down those quantity values based on any field in the product table.
67
00:05:04,390 --> 00:05:10,750
So this limitation is exactly why we need to build out a data model and exactly why we're going to spend
68
00:05:10,750 --> 00:05:12,840
so much time learning how to do that.
69
00:05:12,850 --> 00:05:14,430
In this section of the course.
70
00:05:14,710 --> 00:05:15,780
So stay tuned.
71
00:05:15,790 --> 00:05:16,340
More to come.
7578
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.