Linking static data

A database schema is a set of objects such as tables, views, procedures, and functions update of which cannot be done without modifying data. Along with database schemas, dbForge Source Control allows linking and version-controlling static table data.

Static data is a set of fixed values that does not often change or cannot be changed by users. This data can be referenced by transactional type data. For example, static data can include reference data, code, lookup tables, configuration data, abbreviations for company departments, geographical locations, etc.

Since static data can influence the database performance and proper functioning, it is a good practice to keep track of what has been changed. This allows developers to access, work, and share database objects with their static data within one tool. Version-controlling static data with Source Control also helps optimize the database development.

Linking static data to version control

1. In Object Explorer, right-click a database containing required tables with static data.

2. On the shortcut menu, point to Source Control and click Link / Unlink static data.

Link static data

3. The Source Control Link Static Data dialog opens. Select the required tables with static data and click Apply.

Link static data dialog

Note

You can link and source-control only tables with properly defined primary keys.

The Refresh dialog opens automatically, showing the stages of the refresh procedure.

Refresh

4. Once the refresh is complete, Source Control Manager opens. Navigate to the Local Changes section and select the linked tables with static data. Then click Commit.

Link DB to Working Folder

All changes can be conveniently checked in the following tabs, as shown on the screenshot above:

Tab Description
All List of all records
Added List of records that will be added
Changed List of records that will be modified
Removed List of records that will be removed
Identical List of records that will remain identical

Note

Source-controlling table data (including the Get Latest, Commit, and Refresh operations) may be time-consuming. Thus, it is highly recommended to source-control small amounts of data. Committing large static data tables with numerous records may slow down the performance of dbForge Source Control or cause a time-out.

It’s better to use dbForge Data Compare for SQL Server to compare and synchronize large amounts of Static Data. To get more information about it, refer to Working with Scripts Folder and Static Data topic.