In SqlDBM, objects can be color-coded for grouping and easy identification. Each color is a color label: a named, reusable label with an optional description. This way, a color can carry a meaning, such as "Staging" or "Finance." This can help identify objects that belong to the same logical grouping even though they are on opposite ends of a diagram. Color coding can also work with methodologies such as Data Vault.
Diagram objects can be filtered by color label (and other attributes such as Flags and Tags—see related article titled "Object Flagging" for more info) to aid navigation and search.
Creating and managing color labels
Every color label has a name, an optional description (shown as a tooltip), and a color. The eight original colors appear as default labels named after their hue (e.g., "Blue") and can be renamed and described.
Create and edit labels from the "Color labels" section of the Database Explorer (listed below Flags), or via "+ New color label" in the color label dropdown. Pick from the standard and extended palettes, or use the color picker to customize your own.
Each color can belong to only one label—colors already in use are unavailable in the picker. Changing a label's color repaints every object assigned to it, and deleting a label removes the color from all assigned objects.
Assigning color labels
Color labels can be assigned in the "Format" tab of the properties editor for the following objects:
• Schemas
• Tables
• Notes
• Views
• Object groups (diagram)
(Relationship lines still use plain colors rather than color labels—see the Virtual relationships section below.)
Select any of these objects on the diagram or from the Explorer menu and navigate to the "Format" section of the properties editor.
The color label selector is a searchable dropdown showing each label's swatch, name, and description. Its footer offers "+ New color label" to create one inline and "Manage…" to open the label manager.
Bulk editing color indicator assignment is supported when selecting multiple objects. See the related article on Multi-select for more info.
When you pick a color for an object, you will also see that color appear next to its name in the Explorer panel.
Schemas
Pick a color label for your schemas to point out objects that the schema contains.
For instance, when you color a Schema with orange, all future tables in that schema become orange, too. If you want to force all existing objects in a schema to inherit the schema color, just click the "Override" button in the Schema properties.
Tables and Views
By default tables and views are marked with the same color as their schema.
Notes
You can also select a color label for notes. In the "Note" properties, you can see the format tab with the color label selector, just like for tables and schemas.
A Note's color label is completely independent of Table or Schema color labels, therefore can not be inherited.
Virtual relationships
Virtual relationships are foreign key relationships that do not explicitly declare the foreign key through DDL. The line pattern of virtual relationships uses long spaces instead of a solid line and short spaces for non-virtual.
To help differentiate virtual from non-virtual relationships, virtual relationships are also color-coded by default.
Relationship line styles:
Identifying: Solid line, no color
Non-identifying: Short-spaced short-dash, no color
Virtual identifying: Long-spaced, long-dash, green color
Virtual non-identifying: Long-spaced short-dash, orange color
If you pick another color and create a new virtual relationship using the top bar, that color will be remembered.
Note: relationship line colors are plain colors, not color labels—they have no name or description and do not appear in the color label filter.
Filtering by color label
Once color labels have been assigned, diagrams can be filtered to show only objects with a chosen label. To apply a filter, use the "Objects Filter" option in "Diagram Properties," available in the right-hand panel of any diagram (click on an empty spot on the canvas in case an object was previously selected).
The filter lists only the color labels currently in use, plus a "None" option for objects without a label. Multiple labels can be selected at once and combined using the filter's And/Or logic.
See also