機械翻訳について

75 DBMS_DEVELOPER

パッケージDBMS_DEVELOPERは、データベース・オブジェクトに関する情報を取得するためのシンプルで開発者が使いやすいメソッドを提供します。

この章のトピックは、次のとおりです:

75.1 DBMS_DEVELOPER概要

パッケージDBMS_DEVELOPERには、データベース・オブジェクトに関する情報を取得するためのサブプログラムが用意されています。

DBMS_DEVELOPERパッケージは、データベース・オブジェクトに関する関連情報を取得するための単純なメソッドを提供します。 このパッケージは、データベース内のオブジェクト、シェイプ、構造などの情報を取得したい開発者ツールや開発者に役立ちます。

DBMS_DEVELOPERには、次の利点があります:

  • パフォーマンス : 情報は数ミリ秒以内に取得されます。

  • シンプルさ : DBMS_DEVELOPERは、XMLから離れて、シンプルで包括的なJSONを利用します。 このパッケージは、非特権ユーザーが読み取り権を持っているすべてのオブジェクトに関する情報を取得するメソッドを提供します。

75.2 DBMS_DEVELOPERセキュリティ

この項では、DBMS_DEVELOPERパッケージに関連するセキュリティ制限を示します。

このファンクションは実行者権限で実行されます。 データベース・オブジェクトのメタデータへのアクセスは、そのオブジェクトで「説明」を実行する権限がある場合にのみ許可されます。 そのような認可がない場合、エラーが発生し、メタデータは取得されません。

必要な権限の概要を次に示します:

  • 表およびビュー: 表またはビューに対するSELECTまたはREAD権限が必要です。
  • 索引: 索引が定義されている表に対するSELECTまたはREAD権限が必要です。
  • シノニム: シノニムに対するSELECTまたはREAD権限が必要です。

自分のスキーマ内のオブジェクトを記述する場合は、追加の権限は必要ありません。 ただし、別のスキーマでオブジェクトを記述する場合は、これらのオブジェクトに対するSELECT権限が少なくとも必要です。

DBAであるか、SELECT ANY TABLEREAD ANY TABLEおよびSELECT ANY VIEWシステム権限を持っている場合、明示的な付与を必要とせずに、データベース内の任意の表、索引またはビューに対してDBMS_DEVELOPER.GET_METADATAをコールできます。

75.3 DBMS_DEVELOPERサブプログラムの要約

この表では、DBMS_DEVELOPERサブプログラムをリストし、簡単に説明します。

次の表に、DBMS_DEVELOPERパッケージのサブプログラムとその簡単な説明を示します。

75.3.1 GET_METADATAファンクション

この項では、GET_METADATAファンクションの構文、入出力形式について説明します。

このファンクションは、オブジェクトに関する情報を取得し、そのオブジェクトの対応するメタデータを含むJSONドキュメントを生成します。

構文

DBMS_DEVELOPER.GET_METADATA (  
name            IN VARCHAR2,  
schema          IN VARCHAR2 DEFAULT NULL,  
object_type     IN VARCHAR2 DEFAULT NULL,  
level           IN VARCHAR2 DEFAULT 'TYPICAL'  
etag            IN RAW      DEFAULT NULL)
RETURN JSON;

表75-1 入力構成フィールド

フィールド

name

オブジェクト名。 オブジェクト名のシノニムも指定できます。 これは大/小文字が区別されるため、データ・ディクショナリに表示されるとおりに指定する必要があります。

schema

スキーマ名。 デフォルトは現行ユーザーです。 これは大/小文字が区別されるため、データ・ディクショナリに表示されるとおりに指定する必要があります。

object_type

取り出すオブジェクトのタイプ。 これはオプションです。object_type.を指定せずに名前解決を実行することもできます

サポートされている値: TABLEINDEXおよびVIEW

level

詳細のレベル。 デフォルトはTYPICALです。

サポートされる値:

  1. BASIC : 基本情報について説明します。
  2. TYPICAL : 指定したオブジェクトの詳細情報が含まれます。
  3. ALL : 最も包括的な情報を提供します。

etag

特定のバージョンのドキュメントの一意の識別子。 このetag値を使用すると、特定のバージョンのドキュメントのコンテンツが別のバージョンのものと同じかどうかがアプリケーションで判断されます。

  1. etagが指定され、現在のetagと一致する場合、このファンクションは空のドキュメントを返します。
  2. データベース内のドキュメントのetagが、指定されたetagと一致しない場合、新しいドキュメントが(新しい埋込みetagとともに)返されます。
GET_METADATAファンクションは、JSONスキーマを返さず、JSONドキュメントを返します。 取得するメタデータのレベルに応じて、GET_METADATAファンクションの適切なパラメータを使用して、必要なメタデータJSONドキュメントを取得できます。

アプリケーションに必要なスキーマを理解するには、「異なるオブジェクト型およびサブオブジェクト型のJSONスキーマ」を参照してください。

この項では、object_typeおよびlevelの異なる値に対するDBMS_DEVELOPER.GET_METADATAの使用例を示します。
  1. BASICに設定され、object_typeTABLEに設定されたlevelのメタデータの取得 :
    SQL> conn hr/hr
    Connected.
    SQL>
    SQL> select DBMS_DEVELOPER.GET_METADATA(object_type => 'TABLE', name => 'REGIONS', level => 'BASIC');

    この問合せを実行すると、次のJSONドキュメントが生成されます:

    {
      "objectType" : "TABLE",
      "objectInfo" :
      {
        "name" : "REGIONS",
        "schema" : "HR",
        "columns" :
        [
          {
            "name" : "REGION_ID",
            "notNull" : true,
            "dataType" :
            {
              "type" : "NUMBER"
            }
          },
          {
            "name" : "REGION_NAME",
            "notNull" : false,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 25,
              "sizeUnits" : "BYTE"
            }
          }
        ]
      },
      "etag" : "9ADC6D08AE0D5C82C0188D53F3ECD5B9"
    }
  2. TYPICALに設定され、object_typeVIEWに設定されたlevelのメタデータの取得 :
    SQL> conn hr/hr
    Connected.
    SQL>
    SQL> select DBMS_DEVELOPER.GET_METADATA(object_type => 'VIEW', name => 'EMP_DETAILS_VIEW', level => 'TYPICAL');

    この問合せを実行すると、次のJSONドキュメントが生成されます:

    {
      "objectType" : "VIEW",
      "objectInfo" :
      {
        "name" : "EMP_DETAILS_VIEW",
        "schema" : "HR",
        "columns" :
        [
          {
            "name" : "EMPLOYEE_ID",
            "notNull" : true,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 6
            }
          },
          {
            "name" : "JOB_ID",
            "notNull" : true,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 10,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "MANAGER_ID",
            "notNull" : false,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 6
            }
          },
          {
            "name" : "DEPARTMENT_ID",
            "notNull" : false,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 4
            }
          },
          {
            "name" : "LOCATION_ID",
            "notNull" : false,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 4
            }
          },
          {
            "name" : "COUNTRY_ID",
            "notNull" : false,
            "dataType" :
            {
              "type" : "CHAR",
              "length" : 2,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "FIRST_NAME",
            "notNull" : false,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 20,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "LAST_NAME",
            "notNull" : true,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 25,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "SALARY",
            "notNull" : false,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 8,
              "scale" : 2
            }
          },
          {
            "name" : "COMMISSION_PCT",
            "notNull" : false,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 2,
              "scale" : 2
            }
          },
          {
            "name" : "DEPARTMENT_NAME",
            "notNull" : true,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 30,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "JOB_TITLE",
            "notNull" : true,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 35,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "CITY",
            "notNull" : true,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 30,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "STATE_PROVINCE",
            "notNull" : false,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 25,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "COUNTRY_NAME",
            "notNull" : false,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 40,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "REGION_NAME",
            "notNull" : false,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 25,
              "sizeUnits" : "BYTE"
            }
          }
        ],
        "readOnly" : true,
        "dualityView" : false,
        "constraints" :
        [
          {
            "name" : "SYS_C008649",
            "constraintType" : "VIEW READONLY",
            "status" : "ENABLE",
            "deferrable" : false,
            "validated" : "NON VALIDATED",
            "sysGeneratedName" : true
          }
        ]
      },
      "etag" : "30CA19323E091D7423842D366B727473"
    }
  3. ALLに設定され、object_typeVIEWに設定されたlevelのメタデータの取得 :
    SQL> conn hr/hr
    Connected.
    SQL>
    SQL> select DBMS_DEVELOPER.GET_METADATA(object_type => 'VIEW', name => 'EMP_DETAILS_VIEW', level => 'ALL');
    {
      "objectType" : "VIEW",
      "objectInfo" :
      {
        "name" : "EMP_DETAILS_VIEW",
        "schema" : "HR",
        "columns" :
        [
          {
            "name" : "EMPLOYEE_ID",
            "notNull" : true,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 6
            }
          },
          {
            "name" : "JOB_ID",
            "notNull" : true,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 10,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "MANAGER_ID",
            "notNull" : false,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 6
            }
          },
          {
            "name" : "DEPARTMENT_ID",
            "notNull" : false,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 4
            }
          },
          {
            "name" : "LOCATION_ID",
            "notNull" : false,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 4
            }
          },
          {
            "name" : "COUNTRY_ID",
            "notNull" : false,
            "dataType" :
            {
              "type" : "CHAR",
              "length" : 2,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "FIRST_NAME",
            "notNull" : false,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 20,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "LAST_NAME",
            "notNull" : true,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 25,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "SALARY",
            "notNull" : false,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 8,
              "scale" : 2
            }
          },
          {
            "name" : "COMMISSION_PCT",
            "notNull" : false,
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 2,
              "scale" : 2
            }
          },
          {
            "name" : "DEPARTMENT_NAME",
            "notNull" : true,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 30,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "JOB_TITLE",
            "notNull" : true,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 35,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "CITY",
            "notNull" : true,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 30,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "STATE_PROVINCE",
            "notNull" : false,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 25,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "COUNTRY_NAME",
            "notNull" : false,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 40,
              "sizeUnits" : "BYTE"
            }
          },
          {
            "name" : "REGION_NAME",
            "notNull" : false,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 25,
              "sizeUnits" : "BYTE"
            }
          }
        ],
        "readOnly" : true,
        "dualityView" : false,
        "constraints" :
        [
          {
            "name" : "SYS_C008649",
            "constraintType" : "VIEW READONLY",
            "status" : "ENABLE",
            "deferrable" : false,
            "validated" : "NON VALIDATED",
            "sysGeneratedName" : true
          }
        ],
        "editioningView" : false,
        "authorizations" :
        [
          {
            "grantee" : "SCOTT",
            "privileges" :
            [
              {
                "name" : "SELECT",
                "grantable" : false
              },
              {
                "name" : "READ",
                "grantable" : false
              }
            ]
          }
        ]
      },
      "etag" : "B90C4AE92788116F695ADC2A1CB2859F"
    }
  4. ALLに設定され、object_typeINDEXに設定されたlevelのメタデータの取得 :
    SQL> conn hr/hr
    Connected.
    SQL>
    SQL> select DBMS_DEVELOPER.GET_METADATA(object_type => 'INDEX', name => 'EMP_EMP_ID_PK', level => 'ALL');

    この問合せを実行すると、次のJSONドキュメントが生成されます:

    {
      "objectType" : "INDEX",
      "objectInfo" :
      {
        "indexType" : "NORMAL",
        "partitioned" : false,
        "columns" :
        [
          {
            "dataType" :
            {
              "type" : "NUMBER",
              "precision" : 6
            },
            "isPk" : true,
            "hiddenColumn" : false,
            "numDistinct" : 107,
            "isUk" : true,
            "highValue" : "C20307",
            "isFk" : false,
            "lowValue" : "C202",
            "density" : 0.00934579439252336,
            "notNull" : true,
            "name" : "EMPLOYEE_ID",
            "avgColLen" : 4
          }
        ],
        "uniqueness" : "UNIQUE",
        "numRows" : 107,
        "toBeDropped" : false,
        "lastAnalyzed" : "2025-01-09T20:36:23",
        "sampleSize" : 107,
        "segmentCreated" : "YES",
        "distinctKeys" : 107,
        "owner" : "HR",
        "visibility" : "VISIBLE",
        "name" : "EMP_EMP_ID_PK",
        "status" : "VALID",
        "compression" : "DISABLED",
        "tableName" : "EMPLOYEES"
      },
      "etag" : "DFCF4C9591CD233EE746E129E875A43B"
    }
    
  5. levelおよびobject_typeが明示的に指定されていないメタデータの取得:
    SQL> conn hr/hr
    Connected.
    SQL>
    SQL> select dbms_developer.get_metadata(name => 'REGIONS');

    object_typeが指定されていない場合でも、名前解決はフードの下で実行されます。 name => 'EMPLOYEES'に対応する名前object_typeは、tableと判断されます。 そのため、JSONドキュメントは、table object_typeのデフォルトのtypical levelで生成されます。 上記の例に対応する出力JSONドキュメントを次に示します :

    {
      "objectType" : "TABLE",
      "objectInfo" :
      {
        "schema" : "HR",
        "columns" :
        [
          {
            "name" : "REGION_ID",
            "notNull" : true,
            "dataType" :
            {
              "type" : "NUMBER"
            },
            "isPk" : true,
            "isUk" : true,
            "isFk" : false
          },
          {
            "name" : "REGION_NAME",
            "notNull" : false,
            "dataType" :
            {
              "type" : "VARCHAR2",
              "length" : 25,
              "sizeUnits" : "BYTE"
            },
            "isPk" : false,
            "isUk" : false,
            "isFk" : false
          }
        ],
        "numRows" : 4,
        "external" : "NO",
        "constraints" :
        [
          {
            "name" : "REGION_ID_NN",
            "constraintType" : "CHECK - NOT NULL",
            "searchCondition" : "\"REGION_ID\" IS NOT NULL",
            "columns" :
            [
              {
                "name" : "REGION_ID"
              }
            ],
            "status" : "ENABLE",
            "deferrable" : false,
            "validated" : "VALIDATED",
            "sysGeneratedName" : false
          },
          {
            "name" : "REG_ID_PK",
            "constraintType" : "PRIMARY KEY",
            "columns" :
            [
              {
                "name" : "REGION_ID"
              }
            ],
            "status" : "ENABLE",
            "deferrable" : false,
            "validated" : "VALIDATED",
            "sysGeneratedName" : false
          }
        ],
        "lastAnalyzed" : "2025-01-09T20:36:38",
        "sampleSize" : 4,
        "indexes" :
        [
          {
            "name" : "REG_ID_PK",
            "indexType" : "NORMAL",
            "uniqueness" : "UNIQUE",
            "status" : "VALID",
            "lastAnalyzed" : "2025-01-09T20:36:39",
            "numRows" : 4,
            "sampleSize" : 4,
            "partitioned" : false,
            "columns" :
            [
              {
                "name" : "REGION_ID"
              }
            ]
          }
        ],
        "avgRowLen" : 14,
        "name" : "REGIONS",
        "temporary" : "NO"
      },
      "etag" : "20731DA3DCF5DA125C127B88BFB645EA"
    }
  6. 指定されたetagが現在のetagと一致した場合にメタデータを取得すると、空のドキュメントが返されます :
    SQL> conn hr/hr
    Connected.
    SQL>
    SQL> select dbms_developer.get_metadata(name => 'REGIONS', etag => '20731DA3DCF5DA125C127B88BFB645EA');
    この問合せを実行すると、空のJSONドキュメントが生成されます :
    {
    }
75.3.1.1 異なるオブジェクト型およびサブオブジェクト型のJSONスキーマ

この項では、様々なオブジェクト・タイプ、サブオブジェクト・タイプおよびレベルで可能な様々なスキーマの概要を示します。

JSONスキーマは、返されるJSONドキュメントを解析するためのアプリケーションによる参照として使用できます。 特定のバージョンのデータベース・プログラムに対してプログラミングする場合は、そのデータベース・バージョンに対してその特定のバージョンのJSONスキーマを使用し、そのスキーマは常に同じになります。 ただし、別のリリースにアップグレードまたはダウングレードする場合は、別のスキーマ・バージョンを使用し、その正しいスキーマを使用する必要があります。 スキーマに変更がある場合は、$idフィールドのバージョン番号が変更されます。 Oracleが将来JSONスキーマを改訂する予定の場合、アプリケーションではこの数値を信頼できます。 既存のバージョンは変更されないため、アプリケーションは完全に機能し、更新の影響を受けません。

75.3.1.1.1 オブジェクト型のJSONスキーマ : TABLE

この項では、すべてのレベルのオブジェクト型TABLEのJSONスキーマについて説明します。

表形式フォームのTABLEオブジェクト・タイプのJSONスキーマ

表75-2 オブジェクト型のJSONスキーマ : TABLE

FIELDS     LEVELS
      BASIC TYPICAL ALL

name

   

schema

   

columns

   

hasBeenAnalyzed

     

lastAnalyzed

     

numRows

     

sampleSize

     

avgRowLen

     

clusterName

     

clusterOwner

     

外部

     

一時

     

索引

     

制約

     

annotations

     

segmentCreated

       

inMemory

       

圧縮

       

dependencies

       

認可

grantee      
権限 name
付与可能

inMemoryPriority

       

inMemoryDistribute

       

inMemoryCompression

       

inMemoryDuplicate

       

iotType

       

ノート:

サブオブジェクトcolumnsおよびconstraintsのフィールドは、levelの選択に応じて異なります。 サブオブジェクトcolumnsに存在するフィールドの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : columns. サブオブジェクトconstraintsに存在するフィールドの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : constraints.

level BASICTABLEオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/BASIC/object_info/table",
    "title": "DBMS_DEVELOPER.GET_METADATA/BASIC/OBJECT_INFO/TABLE",
    "description": "Information for a table object",
    "type": "object",
    "properties": {
        "name": {
            "description": "Table name",
            "type": "string"
        },
        "schema": {
            "description": "Table schema",
            "type": "string"
        },
        "columns": {
            "description": "Table columns",
            "type": "array",
            "items": {
                "$ref": "../column"
            }
        }
    },
    "required": [
        "name",
        "schema",
        "columns"
    ]
}

level TYPICALTABLEオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/TYPICAL/object_info/table",
    "title": "DBMS_DEVELOPER.GET_METADATA/TYPICAL/OBJECT_INFO/TABLE",
    "description": "Information for a table object",
    "type": "object",
    "properties": {
        "name": {
            "description": "Table name",
            "type": "string"
        },
        "schema": {
            "description": "Table schema",
            "type": "string"
        },
        "columns": {
            "description": "Table columns",
            "type": "array",
            "items": {
                "$ref": "../column"
            }
        },
        "hasBeenAnalyzed": {
            "description": "Indicates whether table has been analyzed",
            "type": "boolean",
            "default": false
        },
        "lastAnalyzed": {
            "description": "Last time table was analyzed",
            "type": "string",
            "format": "date-time"
        },
        "numRows": {
            "description": "Number of rows",
            "type": "integer"
        },
        "sampleSize": {
            "description": "Analyzed sample size",
            "type": "integer"
        },
        "avgRowLen": {
            "description": "Average row length",
            "type": "integer"
        },
        "clusterName": {
            "description": "Name of the cluster, if any, to which the table belongs",
            "type": "string"
        },
        "clusterOwner": {
            "description": "Owner of the cluster, if any, to which the table belongs",
            "type": "string"
        },
        "external": {
            "description": "Indicates whether the table is an external table (YES) or not (NO)",
            "type": "string"
        },
        "temporary": {
            "description": "Indicates whether the table is temporary (YES) or not (NO)",
            "type": "string"
        },
        "indexes": {
            "description": "Table indexes",
            "type": "array",
            "items": {
                "$ref": "../index"
            }
        },
        "constraints": {
            "description": "Table constraints",
            "type": "array",
            "items": {
                "$ref": "../constraint"
            }
        },
        "annotations": {
            "description": "Table annotations",
            "type": "array",
            "items": {
                "$ref": "../annotation"
            }
        }
    },
    "required": [
        "name",
        "schema",
        "columns",
        "external",
        "temporary"
    ]
}

level ALLTABLEオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/ALL/object_info/table",
    "title": "DBMS_DEVELOPER.GET_METADATA/ALL/OBJECT_INFO/TABLE",
    "description": "Information for a table object",
    "type": "object",
    "properties": {
         "name": {
            "description": "Table name",
            "type": "string"
        },
        "schema": {
            "description": "Table schema",
            "type": "string"
        },   
        "columns": {
            "description": "Table columns",
            "type": "array",
            "items": {
                "$ref": "../column"
            }
        },
        "hasBeenAnalyzed": {
            "description": "Indicates whether table has been analyzed",
            "type": "boolean",
            "default": false
        },
        "lastAnalyzed": {
            "description": "Last time table was analyzed",
            "type": "string",
            "format": "date-time"
        },
        "numRows": {
            "description": "Number of rows",
            "type": "integer"
        },
        "sampleSize": {
            "description": "Analyzed sample size",
            "type": "integer"
        },
        "avgRowLen": {
            "description": "Average row length",
            "type": "integer"
        },
        "clusterName": {
            "description": "Name of the cluster, if any, to which the table belongs",
            "type": "string"
        },
        "clusterOwner": {
            "description": "Owner of the cluster, if any, to which the table belongs",
            "type": "string"
        },
        "external": {
            "description": "Indicates whether the table is an external table (YES) or not (NO)",
            "type": "string"
        },
        "temporary": {
            "description": "Indicates whether the table is temporary (YES) or not (NO)",
            "type": "string"
        },
        "indexes": {
            "description": "Table indexes",
            "type": "array",
            "items": {
                "$ref": "../index"
            }
        },
        "constraints": {
            "description": "Table constraints",
            "type": "array",
            "items": {
                "$ref": "../constraint"
            }
        },
        "annotations": {
            "description": "Table annotations",
            "type": "array",
            "items": {
                "$ref": "../annotation"
            }
        },
        "segmentCreated": {
            "description": "Indicates whether the table segment is created.",
            "type": "string"
        },  
        "inMemory": {
            "description": "Indicates whether the In-Memory Column Store (IM column store) 
                            is enabled (ENABLED) or disabled (DISABLED) for the table",
            "type": "string"
        }, 
        "compression": {
            "description": "Indicates whether table compression is enabled (ENABLED) or not (DISABLED)",
            "type": "string"
        }, 
        "dependencies": {
            "description": "Indicates whether the table is an external table (YES) or not (NO)",
            "type": "string"
        },
         "authorizations": {
            "description": "Table authorizations",
            "type": "object",
            "properties": {
                "grantee": {
                    "description": "Name of the user to whom access was granted",
                    "type": "string"  
                },
                "privileges": {
                    "description": "All privileges granted to grantee",
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "description": "Privilege on the object,
                                "type": "string"
                            },
                            "grantable": {
                                "description": "Indicates whether the privilege was granted with the GRANT OPTION",
                                "type": "string"
                            }
                        }
                    }
                }
            }      
        }, 
        "inMemoryPriority": {
            "description": "Indicates the priority for In-Memory Column Store (IM column store) population. ",
            "type": "string"
        }, 
        "inMemoryDistribute": {
            "description": "Indicates how the IM column store is distributed in an 
                            Oracle Real Application Clusters (Oracle RAC) environment",
            "type": "string"
        }, 
        "inMemoryCompression": {
            "description": "Indicates the compression level for the IM column store",
            "type": "string"
        }, 
        "inMemoryDuplicate": {
            "description": "Indicates the duplicate setting for the IM column store in an Oracle RAC environment",
            "type": "string"
        }, 
        "iotType": {
            "description": "If the table is an index-organized table, then IOT_TYPE is IOT, 
                            IOT_OVERFLOW, or IOT_MAPPING. If the table is not an index-organized table, 
                            then IOT_TYPE is NULL.",
            "type": "string"
        }
    },
    "required": [
        "name",
        "schema",
        "columns",
        "external",
        "temporary",
        "inMemory",
        "compression",
        "dependencies",
        "segmentCreated"
    ]
}
75.3.1.1.2 オブジェクト型のJSONスキーマ : VIEW

この項では、すべてのレベルのオブジェクト型VIEWのJSONスキーマについて説明します。

表形式フォームのVIEWオブジェクト・タイプのJSONスキーマ

表75-3 VIEWオブジェクト・タイプのJSONスキーマ

フィールド     LEVELS
      BASIC TYPICAL ALL

name

   

schema

   

columns

   

readOnly

     

dualityView

     

制約

     

annotations

     

editioningView

       

認可

grantee

     

権限

name
付与可能

ノート:

サブオブジェクトcolumnsおよびconstraintsのフィールドは、levelの選択に応じて異なります。 サブオブジェクトcolumnsに存在するフィールドの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : columns. サブオブジェクトconstraintsに存在するフィールドの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : constraints.

level BASICVIEWオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/BASIC/object_info/view",
    "title": "DBMS_DEVELOPER.GET_METADATA/BASIC/OBJECT_INFO/VIEW",
    "description": "Information for a View object",
    "type": "object",
    "properties": {
        "name": {
            "description": "View name",
            "type": "string"
        },
        "schema": {
            "description": "View schema",
            "type": "string"
        },
        "columns": {
            "description": "View columns",
            "type": "array",
            "items": {
                "$ref": "../column"
            }
        }
    },
    "required": [
        "name",
        "schema",
        "columns"
    ]
}

level TYPICALVIEWオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/TYPICAL/object_info/view",
    "title": "DBMS_DEVELOPER.GET_METADATA/TYPICAL/OBJECT_INFO/VIEW",
    "description": "Information for a View object",
    "type": "object",
    "properties": {
        "name": {
            "description": "View name",
            "type": "string"
        },
        "schema": {
            "description": "View schema",
            "type": "string"
        },
        "columns": {
            "description": "View columns",
            "type": "array",
            "items": {
                "$ref": "../column"
            }
        },
        "readOnly": {
            "description": "An indicator of whether the view is a Read Only View",
            "type": "boolean",
            "default": true
        },
        "dualityView": {
            "description": "Whether the view is a JSON Duality View or not",
            "type": "boolean",
            "default": false
        },
        "constraints": {
            "description": "View constraints",
            "type": "array",
            "items": {
                "$ref": "../constraint"
            }
        } ,
        "annotations": {
            "description": "View annotations",
            "type": "array",
            "items": {
                "$ref": "../annotation"
            }
        }
 
    },
    "required": [
         "name",
         "schema",
         "readOnly",
         "dualityView",
         "columns"
    ]
}

level ALLVIEWオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/ALL/object_info/view",
    "title": "DBMS_DEVELOPER.GET_METADATA/ALL/OBJECT_INFO/VIEW",
    "description": "Information for a View object",
    "type": "object",
    "properties": {
        "name": {
            "description": "View name",
            "type": "string"
        },
        "schema": {
            "description": "View schema",
            "type": "string"
        }, 
        "columns": {
            "description": "View columns",
            "type": "array",
            "items": {
                "$ref": "../column"
            }
        },
        "readOnly": {
            "description": "An indicator of whether the view is a Read Only View",
            "type": "boolean",
            "default": true
        },  
        "dualityView": {
            "description": "Whether the view is a JSON Duality View or not",
            "type": "boolean",
            "default": false
        },
        "constraints": {
            "description": "View constraints",
            "type": "array",
            "items": {
                "$ref": "../constraint"
            }
        },
        "annotations": {
            "description": "View annotations",
            "type": "array",
            "items": {
                "$ref": "../annotation"
            }
        },
        "editioningView": {
            "description": "An indicator of whether the view is an Editioning view",
            "type": "boolean",
            "default": false
        },
        "authorizations": {
            "description": "View authorizations",
            "type": "object",
            "properties": {
                "grantee": {
                    "description": "Name of the user to whom access was granted",
                    "type": "string"  
                },
                "privileges": {
                    "description": "All privileges granted to grantee",
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "description": "Privilege on the object,
                                "type": "string"
                            },
                            "grantable": {
                                "description": "Indicates whether the privilege was granted with the GRANT OPTION",
                                "type": "string"
                            }
                        }
                    }
                }
            }      
        }
    },
    "required": [
         "name",
         "schema",
         "columns"
    ]
}
75.3.1.1.3 オブジェクト型のJSONスキーマ : INDEX

この項では、すべてのレベルのオブジェクト型INDEXのJSONスキーマについて説明します。

表形式フォームのINDEXオブジェクト・タイプのJSONスキーマ

表75-4 INDEXオブジェクト・タイプのJSONスキーマ

フィールド     LEVELS
      BASIC TYPICAL ALL
name    
indexType    
owner    
tableName    
status    
columns    
一意性      
funcIdxStatus      
hasBeenAnalyzed      
lastAnalyzed      
numRows      
sampleSize      
annotations      
partitioned      
distinctKeys        
圧縮        
segmentCreated        
visibility        
toBeDropped        

ノート:

サブオブジェクトcolumnsのフィールドは、levelの選択に応じて異なります。 サブオブジェクトcolumnsに存在するフィールドの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : columns.

level BASICINDEXオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/BASIC/object_info/index",
    "title": "DBMS_DEVELOPER.GET_METADATA/BASIC/OBJECT_INFO/INDEX",
    "description": "Information for index",
    "type": "object",
    "properties": {
        "name": {
            "description": "Index name",
            "type": "string"
        },
        "indexType": {
            "description": "Index Types i.e. CLUSTER, NORMAL, NORMAL/REV, BITMAP, DOMAIN, LOB, IOT - TOP, FUNCTION-BASED NORMAL, FUNCTION-BASED NORMAL/REV, FUNCTION-BASED BITMAP, FUNCTION-BASED DOMAIN, VECTOR",
            "type": "string"
        },
        "owner": {
            "description": "Owner of the indexed object",
            "type": "string"
        },
        "tableName": {
            "description": "Name of the indexed object",
            "type": "string"
        },
        "status": {
            "description": "Status",
            "type": {
                "enum": [
                    "VALID",
                    "UNUSABLE",
                    "INPROGRS",
                    "N/A"
                ]
            }
        },
        "columns": {
            "description": "Index column(s)",
            "type": "array",
            "items": {
                "$ref": "../column"
            }
        }
    },
    "required": [
        "name",
        "indexType",
        "owner",
        "tableName",
        "status",
        "columns"
    ]
}

level TYPICALINDEXオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/TYPICAL/object_info/index",
    "title": "DBMS_DEVELOPER.GET_METADATA/TYPICAL/OBJECT_INFO/INDEX",
    "description": "Information for index",
    "type": "object",
    "properties": {
         "name": {
            "description": "Index name",
            "type": "string"
        },
        "indexType": {
            "description": "Index Types i.e. CLUSTER, NORMAL, NORMAL/REV, BITMAP, DOMAIN, LOB, IOT - TOP, FUNCTION-BASED NORMAL, FUNCTION-BASED NORMAL/REV, FUNCTION-BASED BITMAP, FUNCTION-BASED DOMAIN, VECTOR",
            "type": "string"
        },
        "owner": {
            "description": "Owner of the indexed object",
            "type": "string"
        },
        "tableName": {
            "description": "Name of the indexed object",
            "type": "string"
        },  
        "status": {
            "description": "Status",
            "type": {
                "enum": [
                    "VALID",
                    "INVALID",
                    "INPROGRS",
                    "N/A"
                ]
            }
        },
        "columns": {
            "description": "Index column(s)",
            "type": "array",
            "items": {
                "$ref": "../column"
            }
        },
        "uniqueness": {
            "description": "Uniqueness",
            "type": "string",
            "enum": [
                "UNIQUE",
                "NONUNIQUE"
            ]
        },
        "funcIdxStatus": {
            "description": "Functional index status",
            "type": "string"
        },
        "hasBeenAnalyzed": {
            "description": "Indicates whether index has been analyzed",
            "type": "boolean",
            "default": false
        },
        "lastAnalyzed": {
            "description": "Last time View was analyzed",
            "type": "string",
            "format": "date-time"
        },
        "numRows": {
            "description": "Number of rows",
            "type": "integer"
        },
        "sampleSize": {
            "description": "Analyzed sample size",
            "type": "integer"
        },
        "partitioned": {
            "description": "Indicates whether the index is partitioned",
            "type": "boolean",
            "default": false
        },
        "annotations": {
            "description": "Index annotations",
            "type": "array",
            "items": {
                "$ref": "annotation"
            }
        },
        "required": [
            "name",
            "indexType",
            "owner",
            "tableName",
            "status",
            "columns"
        ]
    }
}

level ALLINDEXオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/ALL/object_info/index",
    "title": "DBMS_DEVELOPER.GET_METADATA/ALL/OBJECT_INFO/INDEX",
    "description": "Information for index",
    "type": "object",
    "properties": {
         "name": {
            "description": "Index name",
            "type": "string"
        },
        "indexType": {
            "description": "Index Types i.e. CLUSTER, NORMAL, NORMAL/REV, BITMAP, DOMAIN, LOB, 
                            IOT - TOP, FUNCTION-BASED NORMAL, FUNCTION-BASED NORMAL/REV, 
                            FUNCTION-BASED BITMAP, FUNCTION-BASED DOMAIN, VECTOR",
            "type": "string"
        },
        "owner": {
            "description": "Owner of the indexed object",
            "type": "string"
        },
        "tableName": {
            "description": "Name of the indexed object",
            "type": "string"
        },
        "status": {
            "description": "Status",
            "type": {
                 "enum": [
                    "VALID",
                    "INVALID",
                    "INPROGRS",
                    "N/A"
                ]
            }
        },
        "columns": {
            "description": "Index column(s)",
            "type": "array",
            "items": {
                "$ref": "../column"
            }
        },
        "uniqueness": {
            "description": "Uniqueness",
            "type": "string",
            "enum": [
                "UNIQUE",
                "NONUNIQUE"
            ]
        },
        "funcIdxStatus": {
            "description": "Functional index status",
            "type": "string"
        },
        "hasBeenAnalyzed": {
            "description": "Indicates whether index has been analyzed",
            "type": "boolean",
            "default": false
        }, 
        "lastAnalyzed": {
            "description": "Last time View was analyzed",
            "type": "string",
            "format": "date-time"
        },
        "numRows": {
            "description": "Number of rows",
            "type": "integer"
        },
        "sampleSize": {
            "description": "Analyzed sample size",
            "type": "integer"
        },
        "partitioned": {
            "description": "Indicates whether the index is partitioned",
            "type": "boolean",
            "default": false
        },  
        "annotations": {
            "description": "Index annotations",
            "type": "array",
            "items": {
                "$ref": "annotation"
            }
        },
        "distinctKeys": {
            "description": "Number of distinct keys in the index",
            "type": "integer"
        },
        "compression": {
            "description": "Compression property of the index: ENABLED, DISABLED, ADVANCED HIGH, ADVANCED LOW",
            "type": "string",
            "enum": [
                "ENABLED",
                "DISABLED",
                "ADVANCED HIGH",
                "ADVANCED LOW"
            ]
        },
        "segmentCreated": {
            "description": "Whether the index segment has been created",
            "type": "string",
            "enum": [
                "YES",
                "NO",
                "N/A"
            ]
        },
        "visibility": {
            "description": "Whether the index is VISIBLE or INVISIBLE to the optimizer",
            "type": "string",
            "enum": [
                "VISIBLE",
                "INVISIBLE"
            ]
        },
        "toBeDropped": {
            "description": "Whether index is dropped and is in Recycle Bin",
            "type": "boolean"
        }
    },
    "required": [
         "name",
         "indexType",
         "owner",
         "tableName",
         "status",
         "columns",
         "partitioned"
         "compression",
         "segmentCreated",
         "visibility",
         "tobeDropped"
   ]
}
75.3.1.1.4 サブオブジェクト型のJSONスキーマ : columns

レベルのサブオブジェクトcolumnsのJSONスキーマ: basictypicalおよびall

表形式フォームのcolumnsサブオブジェクト・タイプのJSONスキーマ

表75-5 COLUMNSサブオブジェクトのJSONスキーマ

フィールド   レベル
    BASIC TYPICAL ALL
name  
default  
notNull  
dataType type
precision
length
scale
size
sizeUnits
fractionalSecondsPrecision
yearPrecision
dayPrecision
isPk    
isUk    
isFk    
domain name  
type  
display  
order  
annotations  
annotations    
numDistinct      
lowValue      
highValue      
密度      
avgColLen      
hiddenColumn      
virtualColumn        
reservableColumn        
identityColumn        
encryptedColumn        

ノート:

typeフィールドの値に基づいて、特定のフィールドが必須です。 次の表に、各type値の必須フィールドを示します。

level BASICCOLUMNサブオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/BASIC/object_info/column",
    "title": "DBMS_DEVELOPER.GET_METADATA/BASIC/OBJECT_INFO/COLUMN",
    "description": "Information for column",
    "type": "object",
     "properties": {
        "name": {
            "description": "Column name",
            "type": "string"
        },
        "notNull": {
            "description": "Not null",
            "type": "boolean",
            "default": false
        },
        "default": {
            "description": "Default value",
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "number"
                }
            ]
        },
        "dataType": {
            "description": "Datatype",
            "type": "object",
            "properties": {
                "type": {
                    "description": "dataType",
                    "type": "string"
                },
                "precision": {
                    "description": "precision",
                    "type": "integer",
                    "minimum": 1
                },
                "scale": {
                    "description": "scale",
                    "type": "integer",
                    "minimum": 0
                },
                "length": {
                    "description": "length",
                    "type": "integer",
                    "minimum": 0
                }, 
                "size": {
                    "description": "size",
                    "type": "integer",
                    "minimum": 1
                },
                "sizeUnits": {
                    "description": "varchar size units",
                    "type": "string",
                    "enum": [
                        "BYTE",
                        "CHAR"
                    ]
                },
                "fractionalSecondsPrecision": {
                    "description": "fractionalSecondsPrecision",
                    "type": "integer"
                },
                "yearPrecision": {
                    "description": "yearPrecision",
                    "type": "integer"
                },
                "dayPrecision": {
                    "description": "dayPrecision",
                    "type": "integer"
                }
            },
            "anyOf": [
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "NUMBER"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "precision",
                            "scale"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "FLOAT"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "precision"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "VARCHAR2"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length",
                            "sizeUnits"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "RAW"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "size"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "CHAR"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length",
                            "sizeUnits"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "NCHAR"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "UROWID"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "size"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "NVARCHAR2"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "enum": [
                                    "TIME",
                                    "TIME WITH TIMEZONE",
                                    "TIMESTAMP",
                                    "TIMESTAMP WITH TIME ZONE",
                                    "TIMESTAMP WITH LOCAL TIME ZONE"
                                ]
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "fractionalSecondsPrecision"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "INTERVAL YEAR TO MONTH"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "yearPrecision"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "INTERVAL DAY TO SECOND"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "dayPrecision",
                            "fractionalSecondsPrecision"
                        ]
                    }
                }
            ]
        }
    },
    "required": [
        "name",
        "dataType",
        "notNull"
    ] 
}

level TYPICALCOLUMNサブオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/TYPICAL/object_info/column",
    "title": "DBMS_DEVELOPER.GET_METADATA/TYPICAL/OBJECT_INFO/COLUMN",
    "description": "Information for column",
    "type": "object",
    "properties": {
         "name": {
            "description": "Column name",
            "type": "string"
        },
        "default": {
            "description": "Default value",
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "number"
                }
            ]
        },
        "notNull": {
            "description": "Not null",
            "type": "boolean",
            "default": false
        },
        "dataType": {
            "description": "Datatype",
            "type": "object",
            "properties": {
                "type": {
                    "description": "dataType",
                    "type": "string"
                },
                "precision": {
                    "description": "precision",
                    "type": "integer",
                    "minimum": 1
                },
                "scale": {
                    "description": "scale",
                    "type": "integer",
                    "minimum": 0
                },
                "length": {
                    "description": "length",
                    "type": "integer",
                    "minimum": 0
                }, 
                "size": {
                    "description": "size",
                    "type": "integer",
                    "minimum": 1
                },
                "sizeUnits": {
                    "description": "varchar size units",
                    "type": "string",
                    "enum": [
                        "BYTE",
                        "CHAR"
                    ]
                },
                "fractionalSecondsPrecision": {
                    "description": "fractionalSecondsPrecision",
                    "type": "integer"
                },
                "yearPrecision": {
                    "description": "yearPrecision",
                    "type": "integer"
                },
                "dayPrecision": {
                    "description": "dayPrecision",
                    "type": "integer"
                }
            },
            "anyOf": [
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "NUMBER"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "precision",
                            "scale"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "FLOAT"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "precision"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "VARCHAR2"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length",
                            "sizeUnits"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "RAW"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "size"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "CHAR"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length",
                            "sizeUnits"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "NCHAR"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "UROWID"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "size"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "NVARCHAR2"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "enum": [
                                    "TIME",
                                    "TIME WITH TIMEZONE",
                                    "TIMESTAMP",
                                    "TIMESTAMP WITH TIME ZONE",
                                    "TIMESTAMP WITH LOCAL TIME ZONE"
                                ]
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "fractionalSecondsPrecision"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "INTERVAL YEAR TO MONTH"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "yearPrecision"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "INTERVAL DAY TO SECOND"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "dayPrecision",
                            "fractionalSecondsPrecision"
                        ]
                    }
                }
            ]
        },
        "isPk": {
            "description": "Is Primary Key",
            "type": "boolean",
            "default": false
        },
        "isUk": {
            "description": "Is Unique Key",
            "type": "boolean",
            "default": false
        },
        "isFk": {
            "description": "Is Foreign Key",
            "type": "boolean",
            "default": false
        },
        "domain": {
            "description": "Column domain",
            "type": "object",
            "properties": {
                "name": {
                    "description": "Domain name",
                    "type": "string"  
                },
                "type": {
                    "description": "Domain type",
                    "type": "string"  
                },
                "dislplay": {
                    "description": "Domain display",
                    "type": "string"  
                },
                "order": {
                    "description": "Domain order",
                    "type": "string"  
                },
                "annotations": {
                    "description": "Column domain annotations",
                    "type": "array",
                    "items": {
                        "$ref": "annotation"
                    }
                }
            }      
        },
        "annotations": {
            "description": "Column annotations",
            "type": "array",
            "items": {
                "$ref": "annotation"
            }
        }
    },
    "required": [
        "name",
        "isPk",
        "isUk",
        "isFk",    
        "dataType",
        "notNull"
    ]
}

level ALLCOLUMNサブオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/ALL/object_info/column",
    "title": "DBMS_DEVELOPER.GET_METADATA/ALL/OBJECT_INFO/COLUMN",
    "description": "Information for column",
    "type": "object",
    "properties": {
        "name": {
            "description": "Column name",
            "type": "string"
        },
         "default": {
            "description": "Default value",
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "number"
                }
            ]
        },
        "notNull": {
            "description": "Not null",
            "type": "boolean",
            "default": false
        },
        "dataType": {
            "description": "Datatype",
            "type": "object",
            "properties": {
                "type": {
                    "description": "dataType",
                    "type": "string"
                },
                "precision": {
                    "description": "precision",
                    "type": "integer",
                    "minimum": 1
                },
                "scale": {
                    "description": "scale",
                    "type": "integer",
                    "minimum": 0
                },
                "length": {
                    "description": "length",
                    "type": "integer",
                    "minimum": 0
                }, 
                "size": {
                    "description": "size",
                    "type": "integer",
                    "minimum": 1
                },
                "sizeUnits": {
                    "description": "varchar size units",
                    "type": "string",
                    "enum": [
                        "BYTE",
                        "CHAR"
                    ]
                },
                "fractionalSecondsPrecision": {
                    "description": "fractionalSecondsPrecision",
                    "type": "integer"
                },
                "yearPrecision": {
                    "description": "yearPrecision",
                    "type": "integer"
                },
                "dayPrecision": {
                    "description": "dayPrecision",
                    "type": "integer"
                }
            },
            "anyOf": [
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "NUMBER"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "precision",
                            "scale"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "FLOAT"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "precision"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "VARCHAR2"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length",
                            "sizeUnits"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "RAW"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "size"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "CHAR"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length",
                            "sizeUnits"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "NCHAR"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "UROWID"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "size"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "NVARCHAR2"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "length"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "enum": [
                                    "TIME",
                                    "TIME WITH TIMEZONE",
                                    "TIMESTAMP",
                                    "TIMESTAMP WITH TIME ZONE",
                                    "TIMESTAMP WITH LOCAL TIME ZONE"
                                ]
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "fractionalSecondsPrecision"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "INTERVAL YEAR TO MONTH"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "yearPrecision"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "type": {
                                "const": "INTERVAL DAY TO SECOND"
                            }
                        }
                    },
                    "then": {
                        "required": [
                            "dayPrecision",
                            "fractionalSecondsPrecision"
                        ]
                    }
                }
            ]
        },
        "isPk": {
            "description": "Is Primary Key",
            "type": "boolean",
            "default": false
        },
        "isUk": {
            "description": "Is Unique Key",
            "type": "boolean",
            "default": false
        },
        "isFk": {
            "description": "Is Foreign Key",
            "type": "boolean",
            "default": false
        }, 
         "domain": {
            "description": "Column domain",
            "type": "object",
            "properties": {
                "name": {
                    "description": "Domain name",
                    "type": "string"  
                },
                "type": {
                    "description": "Domain type",
                    "type": "string"  
                },
                "dislplay": {
                    "description": "Domain display",
                    "type": "string"  
                },
                "order": {
                    "description": "Domain order",
                    "type": "string"  
                },
                "annotations": {
                    "description": "Column domain annotations",
                    "type": "array",
                    "items": {
                        "$ref": "annotation"
                    }
                } 
            }      
        },
        "annotations": {
            "description": "Column annotations",
            "type": "array",
            "items": {
                "$ref": "annotation"
            }
        },
        "numDistinct": {
            "description": "The number of distinct values in the column",
            "type": "integer"
        },
        "lowValue": {
            "description": "The low value in the column",
            "type": "string"
        },
        "highValue": {
            "description": "The high value in the column",
            "type": "string"
        },
        "density": {
            "description": "The average length of the column in bytes",
            "type": "integer"
        },
        "avgColLen": {
            "description": "The number of distinct values in the column",
            "type": "integer"
        },
        "hiddenColumn": {
            "description": "Indicates whether the column is a hidden column",
            "type": "boolean"
        },
        "virtualColumn": {
            "description": "Indicates whether the column is a virtual column",
            "type": "boolean"
        },
        "reservableColumn": {
            "description": "Indicates whether the column is a reservable column",
            "type": "boolean"
        },
        "identityColumn": {
            "description": "Indicates whether the column is a identity column",
            "type": "boolean"
        },
        "encryptedColumn": {
            "description": "Indicates whether the column is a encrypted column",
            "type": "boolean"
        }
    },
     "required": [
         "name",
         "isPk",
         "isUk",
         "isFk",    
         "dataType",
         "notNull",
         "hiddenColumn",
         "virtualColumn",
         "reservableColumn",
         "identityColumn",
         "encryptedColumn"
    ]
}
75.3.1.1.5 サブオブジェクト型のJSONスキーマ : constraints

レベルのサブオブジェクトconstraintsのJSONスキーマ: typicalおよびall

表形式フォームのconstraintsサブオブジェクト・タイプのJSONスキーマ

表75-6 サブオブジェクト型のJSONスキーマ : CONSTRAINTS

フィールド        
    BASIC TYPICAL ALL
name    
constraintType    
searchCondition    
columns name  
referencedConstraintName    
referencedTable    
action    
referencedOwner    
referencedColumns    
status    
遅延可能    
検証済み    
sysGeneratedName    

ノート:

constraintTypeREFERENTIAL INTEGRITYに設定されている場合、スキーマには次のフィールドが必要です: referencedConstraintName referencedOwnerreferencedTableおよびreferencedColumns

level TYPICALCONSTRAINTサブオブジェクト型のJSONスキーマ

ノート:

制約スキーマは、BASIC levelには使用できません。
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/TYPICAL/object_info/constraint",
    "title": "DBMS_DEVELOPER.GET_METADATA/TYPICAL/OBJECT_INFO/CONSTRAINT",
    "description": "Information for constraint",
    "type": "object",
    "properties": {
        "name": {
            "description": "Constraint name",
            "type": "string"
        },
        "constarintType": {
            "description": "Type of constraint definition: CHECK, CHECK - NOT NULL, PRIMARY KEY, UNIQUE, REFERENTIAL INTEGRITY, VIEW CHECK, VIEW READONLY",
            "type": "string"
        },
        "searchCondition": {
            "description": "Text of search condition for a check constraint",
            "type": "string"
        },
        "columns": {
            "description": "Table columns",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "description": "Name associated with column or attribute of object column specified in the constraint definition",
                        "type": "string"
                    }
                }
            }
        },
        "referencedConstraintName": {
            "description": "Name of unique constraint definition for refernced table",
            "type": "string"
        },
        "referencedTable": {
            "description": "Name of table used in referential constraint",
            "type": "string"
        },
        "action": {
            "description": "On delete rule",
            "type": {
                "enum": [
                    "RESTRICT",
                    "CASCADE",
                    "SET NULL",
                    "SET DEFAULT"
                ]
            }
        }, 
        "referencedOwner": {
            "description": "Owner of table used in referential constraint",
            "type": "string"
        },
        "referencedColumns": {
            "description": "Refernced table columns",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "description": "Refernced table column name",
                        "type": "string"
                    }
                }
            }
        },
        "status": {
            "description": "Constraint status",
            "type": {
                "enum": [
                    "ENABLED",
                    "DISABLED"
                ]
            }
        },
        "deferrable": {
            "description": "Deferrable",
            "type": "boolean",
            "default": false
        },
        "validated": {
            "description": "Validated",
            "type": {
                "enum": [
                    "VALIDATED",
                    "NONVALIDATED"
                ]
            }
        },
        "sysGeneratedName": {
            "description": "System Generated constraint",
            "type": "boolean"
        }
    },
    "required": [
        "name",
        "constarintType",
        "status",
        "deferrable",
        "validated",
        "sysGeneratedName"
    ],
    "if": {
        "properties": {
            "constarintType": {
                "const": "REFERENTIAL INTEGRITY"
             }
         }
    },
    "then": {
        "required": [
            "referencedConstraintName",
             "referencedOwner",
             "referencedTable",
             "referencedColumns"
         ]
    }
}

level ALLCONSTRAINTサブオブジェクト型のJSONスキーマ

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/ALL/object_info/constraint",
    "title": "DBMS_DEVELOPER.GET_METADATA/ALL/OBJECT_INFO/CONSTRAINT",
    "description": "Information for constraint",
    "type": "object",
     "properties": {
        "name": {
            "description": "Constraint name",
            "type": "string"
        },
        "constraintType": {
            "description": "Type of constraint definition",
            "type": "string"
        },
        "searchCondition": {
            "description": "Text of search condition for a check constraint",
            "type": "string"
        },
        "columns": {
            "description": "Table columns",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "description": "Name associated with column or attribute of object column specified in the constraint definition",
                        "type": "string"
                    },
                    "position": {
                        "description": "Original position of column or attribute in definition",
                        "type": "integer"
                    }
                }
            }
        },
        "referencedConstraintName": {
            "description": "Name of unique constraint definition for refernced table",
            "type": "string"
        },
        "referencedTable": {
            "description": "Name of table used in referential constraint",
            "type": "string"
        },
        "action": {
            "description": "On delete rule",
            "type": {
                "enum": [
                     "RESTRICT",
                     "CASCADE",
                     "SET NULL",
                     "SET DEFAULT"
                ]
            }
        },
        "referencedOwner": {
            "description": "Owner of table used in referential constraint",
            "type": "string"
        },
        "referencedColumns": {
            "description": "Refernced table columns",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "description": "Refernced table column name",
                        "type": "string"
                    },
                    "position": {
                        "description": "Original position of column or attribute in definition",
                        "type": "integer"
                    }
                }
            }
        },
        "status": {
            "description": "Constraint status",
            "type": {
                "enum": [
                    "ENABLED",
                    "DISABLED"
                ]
            }
        },
        "deferrable": {
            "description": "Deferrable",
            "type": "boolean",
            "default": false
        },
        "validated": {
            "description": "Validated",
            "type": {
                "enum": [
                    "VALIDATED",
                    "NONVALIDATED"
                ]
            }
        },
        "sysGeneratedName": {
            "description": "System Generated constraint",
            "type": "boolean"
        }
    },
    "required": [
         "name",
         "constarintType"
    ],
    "if": {
         "properties": {
              "constarintType": {
                    "const": "REFERENTIAL INTEGRITY"
               }
          }
    },
    "then": {
         "required": [
              "referencedConstraintName",
              "referencedOwner",
              "referencedTable",
              "referencedColumns"
         ]
    }
}