ALL_FOREIGN_KEYS

The ALL_FOREIGN_KEYS system table exposes foreign keys discovered on all published tables in all the data sources for which the current user has access privileges.

Users can see foreign keys on tables for which they have at least one privilege.

Column

TDV JDBC Data Type

Nullable

Description

FK_ID

INTEGER

 

Identifier of the foreign key. Primary key.

FK_NAME

VARCHAR(255)

 

Name of the foreign key.

ORDINAL_POSITION

SMALLINT

 

Position of the foreign key column in relation to other columns in the same foreign key table.

FK_COLUMN_NAME

VARCHAR(255)

 

Name of the foreign key column.

FK_TABLE_ID

INTEGER

 

Identifier of the table of the foreign key.

FK_TABLE_NAME

VARCHAR(255)

 

Name of the table of the foreign key.

FK_SCHEMA_ID

INTEGER

Yes

Identifier of the schema of the foreign key.

FK_SCHEMA_NAME

VARCHAR(255)

Yes

Name of the schema of the foreign key.

FK_CATALOG_ID

INTEGER

Yes

Identifier of the catalog of the foreign key.

FK_CATALOG_NAME

VARCHAR(255)

Yes

Name of the catalog of the foreign key.

FK_DATASOURCE_ID

INTEGER

 

Identifier of the data source of the foreign key.

FK_DATASOURCE_NAME

VARCHAR(255)

 

Name of the data source of the foreign key.

BD_FK_DATASOURCE_
NAME

VARCHAR(255)

 

BD name of the data source of the foreign key.

PK_NAME

VARCHAR(255)

 

Name of the primary key.

PK_COLUMN_NAME

VARCHAR(255)

 

Name of the column in the table with the primary key.

PK_TABLE_ID

INTEGER

 

Identifier of the table of the primary key.

PK_TABLE_NAME

VARCHAR(255)

 

Name of the table of the primary key.

PK_SCHEMA_ID

INTEGER

Yes

Identifier of the schema of the primary key.

PK_SCHEMA_NAME

VARCHAR(255)

Yes

Name of the schema of the primary key.

PK_CATALOG_ID

INTEGER

Yes

Identifier of the catalog of the primary key.

PK_CATALOG_NAME

VARCHAR(255)

Yes

Name of the catalog of the primary key.

PK_DATASOURCE_ID

INTEGER

 

Identifier of the data source of the primary key.

PK_DATASOURCE_NAME

VARCHAR(255)

 

Name of the data source of the primary key.

BD_PK_DATASOURCE_
NAME

VARCHAR(255)

 

BD name of the data source of the primary key.

OWNER_ID

INTEGER

 

Identifier for the owner/creator of the foreign key.

OWNER

VARCHAR(255)

 

User name of the owner/creator of the foreign key.

PARENT_PATH

VARCHAR(1043)

 

Path to the parent container.

BD_PARENT_PATH

VARCHAR(255)

 

BD path to the parent container.