Table Constraints and Concept Relationships

When you import tables, optionally, you can import database constraints, that is, relationships between tables.

In the TIBCO BusinessEvents project the table relationships become relationships between concepts (see Concept Relationships in TIBCO BusinessEvents Architect’s Guide.) Database constraints are interpreted as contained or referenced concept relationships .

Note: The properties are always displayed as Concept Reference irrespective of containment or reference relationship. However, the actual relationship is stored in the REL_TYPE metadata property (which is a concept property level metadata property).

Tables Imported with Containment Relationships

After importing from tables, concept A contains concept B, if the following is true:

  • Table A’s primary key is table B’s foreign key.
  • And table A’s primary key is table B’s primary key in full or in part.

For example, cars contain tires:

  • Table A is Car: Primary key is carID
  • Table B is Tire: Primary key is (carID, tireID). Foreign key is carID.

After importing the Car and Tire tables to database concepts of the same names, the Car concept contains the Tire concept. Car has a ContainedConcept property called Tire, which points to Tire. (The REL_TYPE metadata property shows the type of relationship, as explained in the note.)

Tables Imported with Reference Relationships

After importing from tables, concept A references concept B if the following is true:

  • Table A’s foreign key is Table B’s primary key.
  • And table A’s primary key is not part of Table B’s primary key.

For example, orders reference sales representatives:

  • Table A is Order: Foreign key is repID.
  • Table B is SalesRep: Primary key is repID.

After importing the tables to database concepts of the same names, the Order concept references the SalesRep concept. Order has a ConceptReference property called SalesRep which points to SalesRep.

Note: The data types of the database source are imported to supported data types in TIBCO BusinessEvents. For example, an Oracle CLOB field is imported as a string property. You cannot use queryUsingConceptProps by specifying a value in the property that maps to a CLOB column.

You can also allow users to import tables selectively. For further information, see Importing Selected Database Tables.

Note: While importing from the IBM I/Series databases, you need to quote various strings internally. To do that, set the following property in the BE_HOME/studio/eclipse/configuration/studio.tra file:
be.dbconcepts.dbimport.use.quotes=true