Stored Procedure Query Subjects − They are created when a Procedure is imported from a Relational data source. Using the model query subject, it allows you to create more abstract and business view of data source. Model Query Subjects − They are not directly created from a data source but are based on the query items defined in other query subjects or dimensions. Note − The data source query subject references the data from only one data source at a time, but you can directly edit the SQL that defines the retrieve data to edit the query subject. The following are the query subject types in a Framework Manager −ĭata Source Query Subject − These are based on the Relational metadata defined by the SQL statements and are automatically created for each table and view when you import metadata into model. A query subject can be used to customize the data they retrieve using a Framework Manager. A list appears of all relationships in which one end is a model object and the other end is either another model object or a shortcut to another model object.Ī query subject is defined as a set of query items that have an inherent relationship. If this is a valid Relationship, Framework manager wants to create a shortcut to the relationship. A relationship exists between the original objects.At least one end for the new relationship is a shortcut.The Framework Manager asks whether you want to create a relationship shortcut whenever you create a relationship and both these conditions are true. Relationship shortcuts are also used to resolve ambiguous relationship between query subjects. When you make any change to the source Relationship, they are automatically updated in shortcuts. Creating a Relationship ShortcutĪ Relationship shortcut is defined as the pointer to an existing relationship and to reuse the definition of an existing relationship. To test this Relationship, go to Relationship SQL tab → rows to be returned → Test.Ĭlick on OK button. To create an additional Join, go to the Relationship Expression tab → New Link and Define New Relationship. To edit a Relationship, click a relationship and from Action menu → click Edit Definition.įrom the Relationship Expression tab → Select Query items, Cardinalities and Operators. Once you create a relationship after the metadata import, you can also modify the relationship or Cardinality in the Framework manager. If this is a valid Relationship, the Framework manager wants to create a shortcut to the relationship. Then go to Action Menu → Create Relationship. To create a Relationship, use CTRL key to select one or more query items, subjects or dimensions. You can manually create relationship between objects or can automatically define relationship between objects based on selected criteria. To create a Relationship or to combine logically related objects which are not joined in metadata import. 0 − An Outer join with all objects from both, including the items that don’t match.1 − An inner join with all matching rows from both objects.The first part of this notation represents the type of join for this relationship. In the Framework manager, a relation is represented by Merise notation. You can import many to many relationships, optional relationships, and outer joins from the data source. To view the key information that was imported, right click on the query subject → Edit Definition. The most common ways to define Cardinality is by using the primary and foreign key. Match query item names represent uniquely indexed columns.While using the Relational database as a data source, Cardinality can be defined considering the following rules − Cardinality is used in the following ways − It is defined as the number of related rows for each of the two query subjects. For example: Each patient has many doctors. Many to Many − This relationship occurs when many instances of a query subject relates to multiple instances. For example: Each doctor has many patients. One to Many − This relationship occurs when one instance of query subject relates to multiple instances. For example: Each customer has one customer id. One to One − When an instance of one query subject is related to another instance. There are different relationships which are possible, some of them are − You can create or remove relationships in the metadata model to meet the business requirements. Relationships can be bidirectional and without creating relationship, objects are individual entities with no use in metadata model.Įach object in metadata model is connected using primary or foreign key in the data source. Relationships are used to create queries on multiple objects in a metadata model.