Source Control Schema

The following diagram shows the relationships between Code Churn fact table and the related dimensions in the data warehouse.

Schema showing relationship among data elements

The Source Control schema references only one fact table:

  • Code Churn fact table (dbo.Code Churn).

The Source Control schema also references five dimension tables:

  • File dimension table (dbo.File)

  • Changeset dimension table (dbo.Changeset)

  • Team Project dimension table (dbo.Team project) (see Shared Dimensions)

  • Person dimension table (dbo.Person) (see Shared Dimensions)

  • Date dimension table (dbo.Date). (see Shared Dimensions)

Code Churn Fact Table

The Code Churn fact table contains one row for each changeset and includes measures that count the lines added, deleted, and changed. The following table describes the columns in the Code Churn fact table.

Field Description

__ID

Identifying number for the record in the table (used internally).

Lines Added

Number of new lines of code added.

Lines Modified

Number of lines of code changed.

Lines Deleted

Number of lines of code removed.

Net Lines Added

The difference between the number of lines added and the number of lines deleted.

__LastUpdatedTime

Date and time the record was last inserted or updated.

__TrackingID

Identifying number that is used by the warehouse infrastructure to track the record.

Changeset

Foreign key to the Changeset dimension that indicates which changeset the changes are associated with.

Filename

Foreign key to the File dimension table that indicates the file that was modified.

Date

Foreign key to the Date dimension table that indicates the date on which the changeset was submitted.

Checked In By

Foreign key to the Person dimension table that indicates the person who checked in the changeset.

Team Project

Foreign key to the Team Project dimension table for the project in which the file changes were made.

File Dimension Table

The following table describes the columns in the File dimension table.

Field Description

__ID

Identifying number for the record in the table (used internally).

File

Name of the source file.

Parent Path

The full path of the parent node in the [area|iteration|file path] hierarchy. For example, if the data row represents the file “$/a/b/c,” the parent path is “$/a/b.”

File Path

A hierarchy of the directories and files in the version control database.

File Extension

File name extension of the source file.

__Parent_ID

A reference to the key that contains information about this [area|iteration|file path] node in the hierarchy. For example, if the data row represents the file “$/a/b/c,” the parent_ID will contain the key value of the row that contains “$/a/b.”

__LastUpdatedTime

Date and time the record was last inserted or updated.

__DimensionMemberActive

Value describing whether the dimension member has been fully populated (used internally).

Changeset Dimension Table

The following table describes the columns in the Changeset dimension table.

Field Description

__ID

Identifying number for the record in the table (used internally).

Changeset ID

The Changeset ID which included the file changes.

Changeset

The check-in comment associated with the changeset.

__LastUpdatedTime

Date and time the record was last inserted or updated.

__DimensionMemberActive

Whether the dimension member has been fully populated (used internally).

See Also

Concepts

Code Churn Perspective

Other Resources

Relational Schemas