1 PACKAGE DBMS_XMLSTORAGE_MANAGE authid CURRENT_USER AS
2
3 procedure renameCollectionTable (owner_name varchar2 default user,
4 tab_name varchar2,
5 col_name varchar2 default NULL,
6 xpath varchar2,
7 collection_table_name varchar2,
8 namespaces IN VARCHAR2 default NULL);
9
10
11 -- Renames a collection table from the system generated name
12 -- to the given table name.
13 -- This function is called AFTER registering the xml schema.
14 -- NOTE: Since there is no direct schema annotation for this purpose
15 -- this post registration
16 -- function has to be used. Because all other functions are used before
17 -- registration this
18 -- function breaks the consistency. In addition, this is the only case
19 -- where we encourage the
20 -- user/dba to change a table/type name after registration.
21 -- Since one goal of the schema annotation is to enable more readable
22 -- query execution plans
23 -- we recommend to derive the name of a collection table by its
24 -- corresponding collection type name.
25 -- Since we have an annotation for collection type we should use this one
26 -- when creating the collection
27 -- table. This might make the renameCollectionTable obsolete.
28
29
30 procedure scopeXMLReferences;
31 -- Will scope all XML references. Scoped REF types require
32 -- less storage space and allow more
33 -- efficient access than unscoped REF types.
34 -- Note: This procedure does not need to be exposed
35 -- to customer if called automatically from
36 -- schema registration code.
37 -- In this case we will either move the procedure into a prvt package
38 -- or call the body of scopeXMLReferences from schema registration code
39 -- directly so that the
40 -- procedure would not be published at all.
41
42 procedure indexXMLReferences( owner_name VARCHAR2 default user,
43 table_name VARCHAR2,
44 column_name VARCHAR2 default NULL,
45 index_name VARCHAR2);
46 -- This procedure creates unique indexes on the ref columns
47 -- of the given XML type tables or XML type column of a given table.
48 -- In case of an XML type table the column name does not
49 -- have to be specified.
50 -- The index_name will be used to name the index- since multiple ref
51 -- columns could be affected the table name gets a iterator concatenated
52 -- at the end.
53 -- For instance if two ref columns are getting indexed they will be named
54 -- index_name_1 and index_name_2.
55 -- The procdure indexXMLReferences will not recursively index refs in child
56 -- tables of the table that this procedure is called on.
57 -- If this is desired we recommend to call the
58 -- procedure from within a loop over the
59 -- DBA|ALL|USER_ XML_OUT_OF_LINE_TABLES or
60 -- DBA|ALL|USER_ XML_NESTED_TABLES view.
61 -- The index_name could then be created from the current
62 -- value of a view's column.
63 -- Indexed refs lead to higher performance when joins between the
64 -- child table and base table
65 -- occur in the query plan. If the selectivity of the child table
66 -- is higher than the join of one
67 -- row in the child table with the base table leads to a full table
68 -- scan of the base table if no indexes are present.
69 -- This is the exact motivation for indexing the refs in the base table.
70 -- If the base table has a higher selectivity than the child table there
71 -- is no need to index the refs.
72 -- Indexing the refs makes only sense if the refs are scoped.
73
74 -- ** Bulkload functionality
75 procedure disableIndexesAndConstraints(owner_name varchar2 default user,
76 table_name varchar2,
77 column_name varchar2 default NULL,
78 clear Boolean default FALSE);
79
80
81 -- This procedure will be used to drop the indexes and disable
82 -- the constraints for both xmltype
83 -- table (no P_COL_NAME) and xmltype columns.
84 -- For xmltype tables, the user needs to pass the xmltype-table
85 -- name on which the bulk load operation is to be performed.
86 -- For xmltype columns, the user needs to pass
87 -- the relational table_name and the corresponding xmltype column name.
88
89 procedure enableIndexesAndConstraints(owner_name varchar2 default user,
90 table_name varchar2,
91 column_name varchar2 default NULL);
92
93
94 -- This procedure will rebuild all indexes and enable the constraints
95 -- on the P_TABLE_NAME including its
96 -- child and out of line tables.
97 -- When P_COL_NAME is passed, it does the same for this xmltype column.
98
99
100 -- routine to disable constraints before exchange partition
101 procedure ExchangePreProc(owner_name varchar2 default user,
102 table_name varchar2);
103 -- routine to enable constraints after exchange partition
104 procedure ExchangePostProc(owner_name varchar2 default user,
105 table_name varchar2);
106
107
108 function xpath2TabColMapping(owner_name VARCHAR2 default user,
109 table_name IN VARCHAR2,
110 column_name IN VARCHAR2 default NULL,
111 xpath IN VARCHAR2,
112 namespaces IN VARCHAR2 default NULL) RETURN XMLTYPE;
113
114 function getSIDXDefFromView(viewName IN VARCHAR2) RETURN CLOB;
115
116 --routine to get the type creation DDL for all CDB invalid types after PDB plugin
117 procedure GetTypeDDL ;
118
119 END DBMS_XMLSTORAGE_MANAGE;