Editing a Context Graph Model in Spectrum Discovery
You can modify entity types and relationship labels. You can also add, modify, and delete properties for entity types and relationship labels.
-
On the Discovery menu bar, click Model.
The Logical Model tab is displayed by default.
- Click the Context Graph Model tab.
-
Select the check box next to the Context Graph model that you want to edit.
Alternatively, you can click the name of the model and skip to step 5.
- Click the Edit model button on the toolbar.
- Perform any of the following activities.
- When you finish editing the model, click Save.
This updates the model and navigates to the Context Graph Model tab.
Add an entity
This procedure describes how to add a standard entity to a Context Graph model.
- To add an entity, drag an icon from the Entities panel to the canvas.
- In the Properties panel, type the name for the entity in the Entity Name box.
-
For each entity property, enter the property name in the Name box, select the data type in the Type box, and click Add.
For more information, see Edit entity properties.
Edit entity properties
Note: You cannot edit properties that are currently populated with data.
- Select the entity.
- If necessary, click the PROPERTIES tab to expand the Properties panel.
-
In the Properties panel, enter the following
details for the selected entity.
Field Description Name Name of the property. For example, Age. Type Data type for the property. For example, integer. This field displays valid data types for a Context Graph entity. Note: Properties with the same name in different entities always share the same data type. Changing the data type for a property will change the data type for that property with the same name in every other entity. If you want to create a property with a different data type, you must assign it a different name. - Click Add.
Note: You can delete a property by clicking the Delete
button next to the property.
Add a relationship
This procedure describes how to add a relationship between a pair of standard entities.
-
To add a relationship between entities or from one entity to itself, do the following:
Note: An entity can have multiple relationships to other entities as well as to itself.
To add a relationship to Do this Add a relationship between entities Drag from one entity to another entity. Add a relationship to itself Drag from an entity to itself. This adds a relationship link pointing from the primary entity to the related entity or from and to the same entity when the relationship is to itself.
- In the Properties panel, type the name for the relationship in the Relation Name box.
- For each relationship property, enter the property name in the Name box, select the data type in the Type box, and click Add.
Rename a relationship
This procedure describes how to rename a relationship in a Context Graph model.
Note: You cannot rename a relationship that is currently populated with data.
To rename a relationship, enter a new Relation Name in the Properties panel.
Note: All relationships with the same name share the same properties.
New name is | Then the relationship properties |
---|---|
Unique | Remain the same as with the previous name but are now independent of all other relationships. |
Shared by other entities | Are replaced by the properties associated with relationships that share its new name. |
Add relationship properties
-
Click a relationship.
This selects all relationships with the same name. Adding or removing a property on one relationship adds or removes the same property for all relationships with the same name.
-
In the Properties panel, under Add Properties, enter the following details for the new property.
Field Description Name Name of the property. For example, Date. Type Data type for the property. For example, DateTime. The list displays valid property types for a Context Graph relationship. Note: Properties with the same name in different relationships always share the same data type. Changing the data type for a property will change the data type for that property with the same name in every other relationship. If you want to create a property with a different data type, you must assign it a different name. - Click Add.
Note: You can delete a property by clicking the Delete button next to the property.
Delete an entity or relationship
Note: You cannot delete an entity or relationship from a model that is currently populated with data.
To delete an entity or relationship from the canvas, select it and click the Delete button on the toolbar or press the Delete key.
Index entity properties
To index an entity property, click the Configure Indexes
tab and select the Index Type for any property in the
table.
Note: Properties with the same name in different entities always share the same
index type. When you change this setting for a property in one entity, the
change will apply for the same property in every other entity.
Index Type | Description |
---|---|
None | Indexing a property decreases search time for data in the corresponding field. However, you normally do not want to index a field that is rarely queried, because indexing many different fields slows performance when writing to a model. |
Exact | The search results must the match the case of all characters within a search string. |
Case Insensitive | The search results do not have to match the case of characters within a search string. This typically results in more matches for a search. |