Question

I wanted to use some queries using the TFS SDK in .net, It would make things easier if I had access to the database schema.

I found this which says there is no such documentation but it is from 2007. Is there any sort of documentation for TFS 2013 now or is there still none?

Was it helpful?

Solution

TFS database schema is not documented for the reason that you are not supposed to use it directly. The reason being that database schema changes between versions of TFS and whatsoever you would have created might/would stop working after an upgrade or update. Please use TFS API instead.

Having said that, there are some blogs and guides that use database directly. Have a look at Grant Holiday's blog who has posted about using some queries to get some statistics e.g.

http://blogs.msdn.com/b/granth/archive/2009/10/23/tfs2010-sql-queries-for-tfs-statistics.aspx

Also, ALM Rangers reporting guide contains an appendix about Work Item Store Database schema

https://vsarreportguide.codeplex.com/downloads/get/764892

DISCLAIMER: As I said, the data model can and will change over time so be mindful of that.

OTHER TIPS

Please check Work item field and database schema reference. It includes two important components

  1. Relational warehouse database
  2. Analysis Services cube

To understand warehouse schema, you'd better have a basic understanding of star schema, fact and dimensions. There are also several view to help you not touch table directly. TFS data warehouse is very powerful, from which you can generate all kinds of report including project progress, bug trend, test report, etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top