---
title: "Bridge Tables"
canonical: "https://docs.vaultspeed.com/space/VPD/3013607428/Bridge%20Tables"
format: markdown
---
Navigate to the **Bridges** tab.

Here, you find the graphical interface for creating and editing bridge objects.

> Macro (toc)

## Screen overview

At the top left, you have the main toolbar with options for:

- **Hubs**
  - This contains all hubs and hub business views that can be dragged & dropped to the canvas using the 4-way arrow on every line.
- **Adjacent Hubs **(only available when a hub is selected on the canvas)
  - It contains all adjacent hubs and/or business views on hubs for the selected hub/business view and which link object connects them.
- **Bridges**
  - The overview of the bridges you created, where you can modify them if needed.
- **Shortest Path Options **(only available when the shortest path generation is chosen)
  - A list with all shortest paths that VaultSpeed has generated for the chosen options

Below the main toolbar, you have the list of all Hubs that you can drag & drop to the canvas.

On the right side, you have the graphical bridge canvas.

## Creating a Bridge

### Using ‘Adjacent Hubs’

When creating a bridge, you can start by dragging & dropping a Hub/Business View to the Canvas.  After this, some warnings are shown (which is normal while creating the bridge). 

![image](media://0a7559d3-b893-4271-b568-ca3ba5f805cd)

 The **Adjacent Hub** Tab is available now.

It contains all Adjacent Hubs for the selected Hub and which link object connects them.  Each adjacent hub can be dragged onto the canvas.  If it is dropped to the canvas, the hub already on the canvas will be connected with the new adjacent hub and link.  Hubs can have multiple links to the same adjacent hub.

![image](media://0385bf50-c963-4afb-9949-3374eaecfadc)

 

By adding an adjacent hub to the canvas, VaultSpeed automatically defines the starting and ending hub, which means the warnings no longer exist.

![image](media://027fcaee-9e66-47db-bf13-79693b5895be)

 New Adjacent Hubs (related to the Hub that was last put on the canvas) will now be shown in the overview and can be dragged & dropped to the canvas.

You could also do a single left-click on one of the hubs on the canvas to show the adjacent hubs for that object.

![image](media://2068cbda-3822-468f-924b-a2ea53c3e0a0)

 

If the configuration you now have is the bridge you want, you can go to the Bridges tab.

This will show some new buttons at the top right of the screen to 

- add a new bridge
- remove an existing bridge
- modify an existing bridge

To create a new bridge based on the configuration you have on your canvas right now, click the ‘+ New Bridge’ button.  In the popup window, give your bridge a name, and select if you want to generate a bridge hash key and whether you want to generate VaultSpeed Studio code for this bridge.

> ℹ️ The full name of your bridge will be determined based on the name you put in here, and the settings from the parameters BRIDGE_TABLE_PREFIX and BRIDGE_TABLE_SUFFIX

> ℹ️ If you select to Generate VaultSpeed Studio code for your bridge object, VaultSpeed won’t generate our default SQL code for this bridge, but it will be available as a base object for you to use in VaultSpeed Studio where you can create custom logic for it.

![image](media://8f639d5b-aab5-4ba3-bda7-7edb0e169bf5)

 

### Using ‘Shortest Path Options’

With the Shortest Path Options**, **VaultSpeed will find all paths between certain hubs, allowing you to choose the path you want to use for your bridge object.

To do this, drag & drop 2 Hubs to an empty Canvas.  Then right-click on the canvas and select the option ' Draw shortest path relation'.

![image](media://70db1b94-6ddb-42d8-bfd1-660bb1e7c217)

Now, you can draw a line from one Hub to another. Click on hold on one of the Hubs (where you want to start your path from) and start dragging to the ‘ending’ hub.  The shorted path bridge options are shown once you let go of your mouse on the other hub. 

On this Screen, you can define the maximum number of paths that VaultSpeed needs to propose between the 2 Hubs (max. Generation Options) and options to ignore certain intermediate hubs.  This means that VaultSpeed will only generate paths that do not go through the hubs you ignore.

![image](media://e05db215-a5d0-4039-a6b2-d0bb3f75e4d2)

After clicking ‘Generate’, a status message will appear. This status message indicates whether or not more paths between both hubs were found. Click ‘OK’ to continue.

![image](media://cd2da0cc-0278-4ea7-b586-52f0b502d9ec)

If multiple paths exist between your two hubs, the screen will automatically go to the Shortest Path Options tab.

![image](media://d67bd42e-d2b0-4e4d-a374-953517dc7706)

In the screenshot above, you can see three paths found, which are shown as options on the left.

You can hover over the individual options to get a tooltip with the patch.  You can also preview this on the canvas by dragging and dropping one of the options onto the canvas.  E.g., if we drag option one from our case onto the canvas, we see the full path: 

![image](media://943ddc76-d541-4233-8542-df0cbeb2f45c)

If we want to preview another option, we can clear the screen by using the right-click and ‘Clear everything’ option, and then you can drag another option onto the canvas.  Eg, option 2 for our example looks like the below screenshot:

![image](media://586f4a6d-e0f2-4892-be90-d837122dd9d2)


After choosing one of the options, you can modify your option a bit further by adding objects to it using the adjacent hub functionality.

Or you can save what’s on the canvas as a new bridge.  This happens the same way as described above: going to the ‘Bridges’ tab, clicking the ‘+ New Bridge’ button, and filling in the options.

## Editing Bridges 

To **Edit** a bridge object, click the bridges tab and drag and drop the bridge you want to edit.

Now, you can use the ‘Save Bridge’ and ‘Delete Bridge' buttons at the top right to change or remove the bridge's name.

![image](media://e43cdfee-bfef-4599-a2d6-b3ece998836f)


You can also drag the bridge back onto the canvas to edit it further using the adjacent hubs or shortest path described above.  When you are done modifying your bridge, click the ‘Edit Bridge’ button and save it with the same name to update the current bridge.

## Canvas Options

You can set several options while creating/editing bridges on the canvas.  This is mainly done by right-clicking on the canvas or a specific object on the canvas.

- **Clear Everything**
  - Always available.
  - This will clear everything on the canvas and start you with a fresh new canvas.
- **Enable/Disable Physics**
  - Always available
  - This will enable or disable the auto-placement of the objects on the canvas.  Disabling this will stop the objects from moving around on the canvas
- **Remove selected**
  - only available with a right-click on an object
  - This will remove this object and the related links from the canvas
- **Draw the Shortest Path Relation**
  - always available
  - This will allow you to draw a shortest path relation between 2 objects, on which VaultSpeed will try to generate the path between those two objects.  See also the ‘Using Shortest Path’ section above.
- **Change the view to Objects/Attributes or Icons**
  - only available when there are objects on the canvas
  - this will change the view from the default icon to the actual objects and their attributes.

![image](media://c8330051-bd07-4579-8916-3bafe469b95e)

- **Vertical/Horizontal Layout**
  - Only available when in Objects/Attributes view
  - This will automatically layout the objects on the screen in a vertical or horizontal layout
- **Exclude/Include business keys**
  - only available when right-clicking on a hub object
  - This will exclude/include the business keys for this hub in the bridge
- **Set Pre/suffix**
  - only available when right-clicking on a hub object
  - It will add the pre and suffix to the Hash key and Business key (if included) attributes
  - It will add the pre and suffix to the foreign key relationships from the bridge to the hubs.
- **Merge selected**
  - Only available when highlighting two objects (by holding ctrl/command while selecting both and right-clicking) that have the same name. Those could be merged.
  
- **Include business keys for all hubs**
  - always available
  - include the business keys from all hubs into the bridge
- **Exclude business keys for all hubs**
  - always available
  - Exclude the business keys from all hubs from the bridge

> ℹ️ Hubs from which the Business keys are **not included** in the bridge will be shown in **gray**.  The ones where the business keys **are included **will be shown in the default **color.**

![image](media://2903f050-f343-4578-8ec0-cdfaf5fdeef1)