Creating and Working with Relationships
Overview
Relationships allow you to build an efficient and scalable solution. It defines how records are related to each other in the database. SkyPoint Vault supports analytics capabilities to choose tables for machine learning models to run. It has a prebuilt AI capability that assists you to define and work with the different types of relationships. Each table can have a relationship with more than one table. Also, each table can have more than one relationship with another table. There are three types of relationships.
- Many-to-One relationships: Many table records are associated with a single (primary) table record. For example, multiple users can have one subscription plan.
- Many-to-Many relationships: Many table records are associated with many other table rows. For example, many customers can have multiple orders.
- One-to-Many relationships: A single (primary) table record is associated with multiple table records. For example, a single user can have multiple contact numbers.
Prerequisite
- You have created tables in the Datavault to build relationships.
To create a relationship
- In the left pane, go to Vault.
- Select the Datavault and open Table to create relationships.
- In the Relationships tab, click New relationship.
- Choose either the Many-to-One, Many-to-Many, or One-to-Many relationship option to create between two tables. In this example, a single account can have multiple contacts.
- In the right pane, select a Related table for the Current table.
- Enter the Relationship name.
- If necessary, you can describe the new relationship in the Description box.
- Click Create to generate the relationship.
The newly created relationship appears in the Relationships tab.
To create a relationship with the lookup attribute
When you create a new lookup attribute you are creating a relationship between the current table and the related table. For more information, refer to the Attributes section.
- In the Attributes tab, click New Attribute.
The New attributes pop-up window appears.
- Enter Display name and Name.
- In the Choose data type list, select Lookup.
- Select related table from the drop-down list.
- Choose attribute type from the drop-down list.
- Choose Semantic label from the drop-down list.
- In the Description box, you can describe the new lookup attribute.
- If necessary, click More settings to add properties.
- Select Create to save the attribute properties and close the window.
The new relationship created with the lookup attribute appears under the Relationships tab.
To edit and delete relationships
- In the Relationships tab, choose the relationship you want to edit or delete.
Note
If the Relationship is used by an attribute, you will not be able to delete it until that attribute is deleted. Deleting the relationship will remove the relationship table created. All data connecting tables with relationships will be lost.
- Click the horizontal ellipsis in the Actions column of the relationship and do the following:
If you want to | Then |
---|---|
Modify the relationship | Select Edit. |
Delete the relationship | Select Remove. |
- Click Save to apply your changes.