It is obvious that a tool that has the author in focus is used in projects where many programmers are involved. Typically the software development on such a project is based on a central version control system. But mining this system is time-consuming because the version control system is accessed via a network and the evaluation of the history data is computation-intensive due the differential file comparisons. To avoid user frustration, the visualization offers an batch job to load the file's history, evaluate the history data and store all needed data in a local database.

Entity Relationship Model

The database is based on the structure of the evaluated history data in the visualization. So in the database, a file has a history defined by revisions, it has many text lines that build the contents of the revisions and it has a bunch of annotations to relate the text lines with the revisions. They describes where the text lines can be found in the revisions and offers a great way to avoid a redundant storage of identical text lines from revision to revision. The JavaEditor of the JDT-PlugIn is a good example for this: There are only 10367 unique lines of code (or 10298 with the option Ignore all whitespaces) of approximately 1 million lines of code in more than 400 revisions (in May 2007).

The database tables

Since the data in the database is pre-evaluated for the visualization, working with this data is much faster than fetch and evaluate the history data on demand. To illustrate the benefit, visualizing the JavaEditor of the JDT-PlugIn via a fast internet connection and without a database takes about 25 minutes. If the data is pre-evaluated and stored in a MySQL database it shows up within 1 minute.

Database requirements:

  • The tables are based on INT and VARCHAR with the length 255 or 1023. Therefore text lines longer than 1023 characters are evaluated, but not fully stored.
  • For test and development a local MySQL 5.0 database was used.
  • JDBC is used to connect the database. For registration a jar with a proper JDBC driver must be provided by the user. The registration is done in the preferences of the visualization.

The prefernces