Database Reference
In-Depth Information
Furthermore, each dimension includes an attribute that represents the primary key for each
row in the dimension. This attribute is named [DimensionName]DimKey . The
primary key attribute for the Computer dimension is named ComputerDimKey :
SELECT ComputerDimKey, * FROM ComputerDimvw WHERE IsDeleted
= 0
Understanding facts
A fact in the data warehouse is analogous to a relationship in Service Manager. Each rela-
tionship allows for a source instance and a target instance (both are typically represented
by dimensions) to be joined together.
An example of a fact is the relationship between a computer and the operating system run-
ning on the computer. This relationship is exposed in a view named ComputerHost-
sOperatingSystemFactvw .
To create a query that returns data from both the computer and its operating system, you
need to join the two dimensions together using the view that represents the relationship
fact, as shown in the following screenshot:
The join between the source dimension and the fact needs to be established using the di-
mension key attribute. To establish the join between the fact and the target dimension, use
the corresponding target dimension key attribute. Note that you can exclude the deleted
relationships by filtering the DeletedDate attribute by IS NULL :
SELECT
co.PrincipalName,
os.PhysicalMemory
FROM
Search WWH ::




Custom Search