1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2018 OpenLink Software
-
- This project is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; only version 2 of the License, dated June 1991.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-->
<sect1 id="systemtables"><title>Virtuoso System Tables</title>
<sect2 id="SysTables">
<title>Core System Tables</title>
<programlisting>
create table SYS_COLS (
TABLE varchar,
COLUMN varchar,
COL_ID integer,
COL_DTP integer,
primary key (COL_ID))
create index SYS_COLS_BY_NAME on SYS_COLS (TABLE, COLUMN)
create table SYS_KEYS (
KEY_TABLE varchar,
KEY_NAME varchar,
KEY_ID integer,
KEY_N_SIGNIFICANT integer,
KEY_CLUSTER_ON_ID integer,
KEY_IS_MAIN integer,
KEY_IS_OBJECT_ID integer,
KEY_IS_UNIQUE integer,
KEY_MIGRATE_TO integer,
primary key (KEY_TABLE, KEY_NAME))
create index SYS_KEYS_BY_ID on SYS_KEYS (KEY_ID)
create table SYS_KEY_PARTS (
KP_KEY_ID integer,
KP_NTH integer,
KP_COL integer
primary key (KP_KEY_ID, KP_NTH))
create table SYS_KEY_SUBKEY (
SUPER integer,
SUB integer,
primary key (SUPER, SUB))
</programlisting>
<para>
The SYS_COLS table defines all tables and columns. Each column
appears once in this table. No entries are made for inherited columns.
The SYS_KEYS table defines all indices. A row in this table corresponds
to each key in the database, either originally defined or inherited.
</para>
<para>
KEY_IS_MAIN is non-zero if this
is the primary key of its table. The KEY_MIGRATE_TO is the key ID of a
new version of this key if this key is obsolete (e.g. the primary key
of a table from before an ALTER TABLE). The KEY_N_SIGNIFICANT
indicates how many leading key parts are used in ordering keys.
</para>
<para>
The KEY_ID references the KP_KEY_ID in the SYS_KEY_PARTS table.
This table embodies the actual layout of keys and rows. The KP_NTH is
a number positioning the KP_COL to the appropriate place in the row.
The KP_COL references the COL_ID in SYS_COLS. The KP_NTH is not
necessarily a series of consecutive integers but the order matches the
order of columns on the row.
</para>
<para>
The SYS_KEY_SUBKEY table has a row for each pair of keys where one is
the immediate subkey of the other.
Note that when a table is altered, the obsolete layout is marked as a subtable of the new layout of the primary key. Thus a select on the new primary key will also get the obsolete rows.
</para>
<para>The following SQL procedure exemplifies how the SYS_COLS, SYS_KEYS
and SYS_KEY_PARTS tables combine. Given a table name it produces the
set of columns and the set of indices and their parts.
</para>
<programlisting>
create procedure dt (in tn varchar)
{
declare index_name, col, dtp varchar;
declare t, nth integer;
dtp := '-';
result_names (col, t); --- first result set
declare cr cursor for select COLUMN, COL_DTP
from SYS_COLS where TABLE = tn;
whenever not found goto done;
open cr;
while (1=1) {
fetch cr into col, t;
result (col, t);
}
done:
result_names (index_name, nth, col); -- 2nd result set
end_result ();
declare icr cursor for select KEY_NAME, KP_NTH, COLUMN
from SYS_KEYS, SYS_KEY_PARTS, SYS_COLS
where KEY_TABLE = tn and KP_KEY_ID = KEY_ID
and KP_NTH < KEY_N_SIGNIFICANT and COL_ID = KP_COL;
whenever not found goto k_done;
open icr;
while (1=1) {
fetch icr into index_name, nth, col;
result (index_name, nth, col);
}
k_done:
return 0;
}
</programlisting>
</sect2>
<sect2 id="UserSysTables"><title>System Tables</title>
<para>DB objects related to the User and Role objects are created as follows. The terms group and role are used interchangeably.</para>
<programlisting><![CDATA[create table
SYS_USERS (
U_ID integer unique, -- unique id identifying the security object
U_NAME char (128), -- unique name identifying the security object
U_IS_ROLE integer default 0, -- if true it's a group
U_FULL_NAME char (128), -- for information only, name of that user or group
U_E_MAIL char (128) default '', -- e-mail for contact
U_PASSWORD char (128), -- encrypted password
U_GROUP integer, /* the primary group references SYS_USERS (U_ID), */
U_LOGIN_TIME datetime, -- last login time, can be set in login hooks,
-- otherwise is set when login in webDAV repository
U_ACCOUNT_DISABLED integer default 1, -- if true the account is not functional
U_DAV_ENABLE integer default 0, -- true if DAV login allowed
U_SQL_ENABLE integer default 1, -- true if SQL/(ODBC/JDBC/OLE/DB etc) login allowed.
U_DATA varchar, /* reserved */
U_METHODS integer, /* reserved */
U_DEF_PERMS char (10) default '110100000R', -- see PERMISSIONS option value
U_HOME varchar (128), -- see HOME option value
U_PASSWORD_HOOK varchar, -- see PASSWORD_MODE option value
U_PASSWORD_HOOK_DATA varchar, -- see PASSWORD_MODE_DATA option value
U_GET_PASSWORD varchar, -- see GET_PASSWORD option data
U_DEF_QUAL varchar, -- default qualifier for SQL/ODBC login
U_OPTS long varchar, -- extensibility options for user&group objects
primary key (U_NAME)
)]]></programlisting>
<programlisting><![CDATA[create table
SYS_ROLE_GRANTS (
GI_SUPER integer references SYS_USERS (U_ID), -- user object id
GI_SUB integer references SYS_USERS (U_ID), -- granted role object id
GI_DIRECT integer default 1, -- false if indirect, i.e.
-- true by inheritance, not direct grant.
GI_GRANT integer, -- who has granted this role
GI_ADMIN integer default 0, -- true if granted with admin option
primary key (GI_SUPER, GI_SUB, GI_DIRECT));]]></programlisting>
<para>
For Backwards compatibility the system tables SYS_DAV_USER, SYS_DAV_GROUP,
SYS_DAV_USER_GROUP and SYS_USER_GROUP are re-defined as views:</para>
<programlisting><![CDATA[-- WebDAV Users
create view WS.WS.SYS_DAV_USER (U_ID, U_NAME, U_FULL_NAME, U_E_MAIL, U_PWD,
U_GROUP, U_LOGIN_TIME, U_ACCOUNT_DISABLED, U_METHODS, U_DEF_PERMS, U_HOME)
as select U_ID, U_NAME, U_FULL_NAME, U_E_MAIL, U_PASSWORD as U_PWD,
U_GROUP, U_LOGIN_TIME, U_ACCOUNT_DISABLED, U_METHODS, U_DEF_PERMS, U_HOME
from DB.DBA.SYS_USERS where U_IS_ROLE = 0 and U_DAV_ENABLE = 1;
-- WebDAV Groups
create view WS.WS.SYS_DAV_GROUP (G_ID, G_NAME)
as select U_ID as G_ID, U_NAME as G_NAME
from DB.DBA.SYS_USERS where U_IS_ROLE = 1 and U_DAV_ENABLE = 1;
-- The granted groups to the WebDAV user
create view WS.WS.SYS_DAV_USER_GROUP (UG_UID, UG_GID) as select GI_SUPER, GI_SUB from DB.DBA.SYS_ROLE_GRANTS
where GI_DIRECT = 1;
create view SYS_USER_GROUP (UG_UID, UG_GID) as select GI_SUPER, GI_SUB
from SYS_ROLE_GRANTS where GI_DIRECT = 1;]]></programlisting>
<programlisting>
create table SYS_GRANTS (
G_USER varchar,
G_OP integer,
G_OBJECT varchar,
G_COL varchar,
primary key (G_USER, G_OP, G_OBJECT, G_COL));
</programlisting>
<para>
These tables are visible only to dba members. The procedure list_grants
shows a summary of granted privileges:
</para>
<screen>
SQL> list_grants (0);
</screen>
<para>
These tables should not be modified by applications. Only the SQL
statements GRANT, REVOKE, CREATE USER, DELETE USER, SET USER GROUP and
SET PASSWORD should be used to maintain user and security information.
Security information is cached in RAM during the execution of a Virtuoso
process and these statements ensure that the cache stays consistent with
the tables.
</para>
</sect2>
<sect2 id="rowlevelsectab"><title>Row Level Security Table</title>
<programlisting>
create table SYS_RLS_POLICY (
RLSP_TABLE varchar, - the FQN of the table
RLSP_OP varchar, - the operation (one per row : I/U/D/S)
RLSP_FUNC varchar, - the FQN of the stored procedure to be called
PRIMARY KEY (RLSP_TABLE, RLSP_OP))</programlisting>
<para>That system table is used for persisting the definitions</para>
</sect2>
<sect2 id="charsetsystab"><title>SYS_CHARSETS</title>
<programlisting>
CREATE TABLE SYS_CHARSETS (
CS_NAME varchar, -- The "preferred" charset name
CS_TABLE long nvarchar, -- the mapping table of length 255 Wide chars
CS_ALIASES long varchar -- serialized vector of aliases
);
</programlisting>
</sect2>
<sect2 id="sys_collations">
<title>Collations System Table</title>
<para>
The SYS_COLLATIONS system table holds the data for all the defined collations. It has the following structure:
</para>
<programlisting>
CREATE TABLE SYS_COLLATIONS (
COLL_NAME VARCHAR,
COLL_TABLE LONG VARBINARY,
COLL_IS_WIDE INTEGER);
</programlisting>
<para>
COLL_NAME is the fully qualified name of the collation (it's identifier)
</para>
<para>
COLL_TABLE holds the collation table (256 bytes or 65536 wide chars)
</para>
<para>
COLL_IS_WIDE show the collation's type (0 for CHAR and 1 for NCHAR). Note that a 8bit collation
cannot be used by a NCHAR data and vice versa.
</para>
<para>
Collation can be deleted by deleting its row from SYS_COLLATIONS.
</para>
<note><title>Note</title>
<para>The collation will still be available until the server is restarted, as it's definition is cached into memory.
</para>
</note>
</sect2>
<sect2 id="uddischema"><title>UDDI Schema</title>
<programlisting><![CDATA[
---=====================
--- Business Entity Table
---=====================
create table UDDI..BUSINESS_ENTITY (
BE_BUSINESS_KEY varchar,
BE_AUTHORIZED_NAME varchar,
BE_OPERATOR varchar,
BE_NAME varchar not null,
BE_CREATED datetime,
BE_CHANGED timestamp,
BE_OWNER integer,
PRIMARY KEY (BE_BUSINESS_KEY)
)
;
]]></programlisting>
<programlisting><![CDATA[
---=======================
--- Business service Table
---=======================
create table UDDI..BUSINESS_SERVICE (
BS_BUSINESS_KEY varchar, -- references business entity (optional)
BS_SERVICE_KEY varchar not null, -- Unique Key
BS_NAME varchar not null, -- Name
BS_CREATED datetime,
BS_CHANGED timestamp,
BS_OWNER integer,
PRIMARY KEY (BS_SERVICE_KEY)
)
;
]]></programlisting>
<programlisting><![CDATA[
---========================
--- Binding Templates Table
---========================
create table UDDI..BINDING_TEMPLATE (
BT_BINDING_KEY varchar,
BT_SERVICE_KEY varchar,
BT_ACCESS_POINT varchar,
BT_HOSTING_REDIRECTOR varchar,
BT_URL_TYPE varchar,
BT_CREATED datetime,
BT_CHANGED timestamp,
BT_OWNER integer,
PRIMARY KEY (BT_BINDING_KEY)
)
;
]]></programlisting>
<programlisting><![CDATA[
---======================
--- tModel Table
---======================
create table UDDI..TMODEL (
TM_TMODEL_KEY varchar,
TM_AUTHORIZED_NAME varchar,
TM_OPERATOR varchar,
TM_NAME varchar,
TM_CREATED datetime,
TM_CHANGED timestamp,
TM_OWNER integer,
primary key (TM_TMODEL_KEY)
)
;
]]></programlisting>
<programlisting><![CDATA[
---====================
--- Descriptions Table
---====================
create table UDDI..DESCRIPTION (
UD_DESC varchar, -- Description Text
UD_LANG varchar,
UD_PARENT_ID varchar, -- Parent ID (references tmodel,
-- businessService etc.)
UD_TYPE varchar -- ParentType (name of parent table)
)
create index DESC_PARENT on DESCRIPTION (UD_TYPE, UD_PARENT_ID)
;
]]></programlisting>
<programlisting><![CDATA[
--=====================================================================================
-- Discovery URL table: contains structure - holds a URL addressable discovery documents
--=====================================================================================
create table UDDI..DISCOVERY_URL (
DU_PARENT_ID varchar not null, -- parent ID
DU_PARENT_TYPE varchar not null, -- name of parent element
DU_URL varchar, -- URI
DU_USE_TYPE varchar -- UseType element
)
create index DISCOVERY_URLS_PARENT on DISCOVERY_URL (DU_PARENT_TYPE, DU_PARENT_ID)
;
]]></programlisting>
<programlisting><![CDATA[
--===================
-- Address line table
--===================
create table UDDI..ADDRESS_LINE (
AL_PARENT_ID varchar not null, -- Parent key
AL_PARENT_TYPE varchar not null, -- name of parent element
AL_USE_TYPE varchar, -- UseType element
AL_SORT_CODE varchar, -- SortCode element
AL_LINE varchar -- The Line content
)
create index ADDR_LINE_PARENT on ADDRESS_LINE (AL_PARENT_TYPE, AL_PARENT_ID)
;
]]></programlisting>
<programlisting><![CDATA[
---================
--- Contacts Table
---===============
create table UDDI..CONTACTS (
CO_CONTACT_KEY varchar,
CO_BUSINESS_ID varchar not null, -- references business entity table by business key
CO_USE_TYPE varchar, -- UseType element
CO_PERSONAL_NAME varchar not NULL, -- name
PRIMARY KEY (CO_CONTACT_KEY)
)
create index IN_BUSINESS on CONTACTS (CO_BUSINESS_ID)
;
]]></programlisting>
<programlisting><![CDATA[
--============
-- email table
--============
create table UDDI..EMAIL (
EM_CONTACT_KEY varchar not null,
EM_ADDR varchar,
EM_USE_TYPE varchar
)
create index IN_EMPARENT on EMAIL (EM_CONTACT_KEY)
;
]]></programlisting>
<programlisting><![CDATA[
--============
-- phone table
--============
create table UDDI..PHONE (
PH_CONTACT_KEY varchar not null,
PH_PHONE varchar,
PH_USE_TYPE varchar
)
create index IN_PHPARENT on PHONE (PH_CONTACT_KEY)
;
]]></programlisting>
<programlisting><![CDATA[
---=====================
--- Identifier Bag Table
---=====================
create table UDDI..IDENTIFIER_BAG (
IB_PARENT_ID varchar not null,
IB_PARENT_TYPE varchar not null,
IB_TMODEL_KEY_ID varchar,
IB_KEY_NAME varchar,
IB_KEY_VALUE varchar
)
create index IB_PARENT on IDENTIFIER_BAG (IB_PARENT_ID,IB_PARENT_TYPE)
;
]]></programlisting>
<programlisting><![CDATA[
---===================
--- Category Bag Table
---===================
create table UDDI..CATEGORY_BAG (
CB_PARENT_ID varchar not null,
CB_PARENT_TYPE varchar not null,
CB_TMODEL_KEY_ID varchar,
CB_KEY_NAME varchar,
CB_KEY_VALUE varchar
)
create index CB_PARENT on CATEGORY_BAG (CB_PARENT_ID, CB_PARENT_TYPE)
;
]]></programlisting>
<programlisting><![CDATA[
---===================
--- Overview Doc Table
---===================
create table UDDI..OVERVIEW_DOC (
OV_KEY varchar,
OV_PARENT_ID varchar not null,
OV_PARENT_TYPE varchar not null,
OV_URL varchar,
PRIMARY KEY (OV_KEY)
)
create unique index PARENT_OVERVIEW_DOC on OVERVIEW_DOC (OV_PARENT_ID, OV_PARENT_TYPE)
;
]]></programlisting>
<programlisting><![CDATA[
---===============================
--- TModel Instance Details Table
---===============================
create table UDDI..INSTANCE_DETAIL (
ID_KEY varchar not null,
ID_BINDING_KEY varchar, -- references btemplate(bindingkey)
ID_TMODEL_KEY varchar, -- references tmodel(tmodelkey)
ID_PARMS varchar,
primary key (ID_KEY)
)
create index IN_IDPARENT on INSTANCE_DETAIL (ID_BINDING_KEY, ID_TMODEL_KEY)
;
]]></programlisting>
</sect2>
<sect2 id="robotsystables"><title>Web Robot System Tables</title>
<formalpara>
<title>Target sites table</title>
<programlisting>
create table WS.WS.VFS_SITE (
VS_DESCR varchar, -- Human readable description
VS_HOST varchar, -- target hostname (eq. www.foo.com)
VS_URL varchar, -- target path (eq. /cgi-bin/ or /)
VS_INX char(5), -- not used
VS_OWN integer, -- ID of the local WebDAV owner
VS_ROOT varchar, -- target WebDAV collection
VS_NEWER datetime, -- Update the link if newer than
VS_DEL char(3), -- Delete local copy if delete on remote detected flag
VS_FOLLOW varchar, -- follow list (list of masks to allow following the links)
VS_NFOLLOW varchar, -- the do not follow list
VS_SRC char(3), -- do get of the images - flag
VS_OPTIONS varchar, -- username/password credentials for
-- authorization on target site
VS_METHOD varchar, -- use HTTP or HTTP/WebDAV to retrieve the target site
VS_OTHER char(10), -- go to other sites flag
primary key (VS_HOST, VS_ROOT)
)
;
</programlisting>
</formalpara>
<formalpara>
<title>The queues table</title>
<programlisting>
create table WS.WS.VFS_QUEUE (
VQ_HOST varchar, -- target host
VQ_TS datetime, -- when added to the queue
VQ_URL varchar, -- path on target
VQ_ROOT varchar, -- the WebDAV local collection
VQ_STAT char (15),-- status of the entry
VQ_OTHER varchar, -- flag for other site generated link
primary key (VQ_HOST, VQ_URL, VQ_ROOT)
)
;
</programlisting>
</formalpara>
<formalpara>
<title>The retrieved URLs table</title>
<programlisting>
create table WS.WS.VFS_URL (
VU_HOST varchar, -- target host
VU_URL varchar, -- path on target
VU_ROOT varchar, -- the local WebDAV collection containing
-- content of the retrieved link
VU_CHKSUM varchar, -- checksum
VU_ETAG varchar, -- Etag from target
VU_CPTIME datetime, -- when is copied
VU_OTHER varchar, -- is the link retrieved from foreign site
primary key (VU_HOST, VU_URL, VU_ROOT)
)
;
</programlisting>
</formalpara>
</sect2>
<sect2 id="davsystables"><title>Web Server & DAV System Tables</title>
<para>
All Web Server and DAV related tables and procedures are held in the
WS catalogue. This reference section illustrates their structure.
</para>
<sect3 id="davcollections"><title>Collections (folders)</title>
<programlisting>
create table WS.WS.SYS_DAV_COL (
COL_ID integer, -- unique collection id
COL_NAME char(256),-- collection name
COL_OWNER integer, -- collection owner id (FK SYS_DAV_USER (U_ID))
COL_GROUP integer, -- collection owner group id (FK SYS_DAV_GROUP (G_ID))
COL_PARENT integer, -- parent collection id (FK SYS_DAV_COL (COL_ID))
COL_CR_TIME datetime, -- creation time
COL_MOD_TIME datetime, -- modification time
COL_PERMS char(9), -- collection access permissions (like UNIX ugo style)
primary key (COL_NAME, COL_PARENT)
)
;
</programlisting>
</sect3>
<sect3 id="davgroups"><title>Groups</title>
</sect3>
<sect3 id="davlocks"><title>Locks</title>
<programlisting>
create table WS.WS.SYS_DAV_LOCK (
LOCK_TYPE char (1), -- type of the lock (R (read) or W (write))
LOCK_SCOPE char (1), -- lock scope (X (exclusive) or S (shared))
LOCK_TOKEN char(256), -- unique lock token
LOCK_PARENT_TYPE char (1), -- lock parent type (R (resource), C (collection))
LOCK_PARENT_ID integer, -- lock parent (resource/collection)
-- id (FK SYS_DAV_COL (COL_ID) or SYS_DAV_RES (RES_ID))
LOCK_TIME datetime, -- lock creation time
LOCK_TIMEOUT integer, -- lock time-out
LOCK_OWNER integer, -- lock owner id (FK SYS_DAV_USER (U_ID))
LOCK_OWNER_INFO varchar, -- lock owner info (if WebDAV client sent
-- additional info eq. e-mail etc.)
primary key (LOCK_PARENT_TYPE, LOCK_PARENT_ID)
)
;
</programlisting>
</sect3>
<sect3 id="davproperties"><title>Properties</title>
<programlisting>
create table WS.WS.SYS_DAV_PROP (
PROP_ID integer, -- unique property id
PROP_NAME char(256), -- property name
PROP_TYPE char (1), -- property parent type (R (resource), C (collection))
PROP_PARENT_ID integer, -- parent resource/collection id (FK SYS_DAV_COL (COL_ID)
-- or SYS_DAV_RES (RES_ID))
PROP_VALUE varchar, -- value of the property (plain text or serialized XML entity)
primary key (PROP_NAME, PROP_TYPE, PROP_PARENT_ID)
)
;
</programlisting>
</sect3>
<sect3 id="davresources"><title>Resources (documents)</title>
<programlisting>
create table WS.WS.SYS_DAV_RES (
RES_ID integer, -- unique resource id
RES_NAME char(256),-- resource name
RES_OWNER integer, -- resource owner id (FK SYS_DAV_USER (U_ID))
RES_GROUP integer, -- resource owner group id (FK SYS_DAV_GROUP (G_ID))
RES_COL integer, -- parent collection id (FK SYS_DAV_COL (COL_ID))
RES_CONTENT long varchar IDENTIFIED BY RES_FULL_PATH,
-- resource content
RES_TYPE varchar, -- resource MIME type (eq. text/plain etc.)
RES_CR_TIME datetime, -- creation time
RES_MOD_TIME datetime, -- modification time
RES_PERMS char (9), -- resource access permissions (like UNIX ugo style)
RES_FULL_PATH varchar, -- resource full path (eq. /DAV/docs/name.txt)
primary key (RES_COL, RES_NAME)
)
;
</programlisting>
</sect3>
<sect3 id="davrestypes"><title>Resource Types (MIME types)</title>
<programlisting>
create table WS.WS.SYS_DAV_RES_TYPES (
T_EXT varchar, -- extension
T_TYPE varchar, -- associated MIME type
T_DESCRIPTION varchar, -- optional description
primary key (T_EXT)
)
;
</programlisting>
<note><title>Note:</title>
<para>
The Resource Types table is also used by the HTTP server for determining the
appropriate 'Content-Type' header for any deliverable, either from WebDAV or the file system.
</para>
</note>
</sect3>
<sect3 id="davhttppath"><title>HTTP Virtual Directory Mappings</title>
<programlisting>
create table DB.DBA.HTTP_PATH (
HP_HOST varchar not null, -- mapping Host in HTTP header note: *ini*
HP_LISTEN_HOST varchar not null, -- IP address & port for
-- mapping listening session
HP_LPATH varchar not null, -- logical path
HP_PPATH varchar not null, -- physical path
HP_STORE_AS_DAV integer not null, -- flag for webDAV storage
HP_DIR_BROWSEABLE integer not null, -- directory listing allowed
HP_DEFAULT varchar, -- default page
HP_SECURITY varchar, -- which method allowed all/https/digest (NULL/SSL/DIGEST)
HP_REALM varchar, -- authentication realm
HP_AUTH_FUNC varchar, -- which function authenticate this directory
HP_POSTPROCESS_FUNC varchar, -- function call after request
HP_RUN_VSP_AS varchar, -- uid for VSPs REFERENCES SYS_USERS (U_NAME)
-- ON DELETE SET NULL
HP_RUN_SOAP_AS varchar, -- uid for SOAP REFERENCES SYS_USERS (U_NAME)
-- ON DELETE SET NULL
HP_PERSIST_SES_VARS integer, -- have a persistent session variables
HP_SOAP_OPTIONS varchar, -- SOAP options
HP_AUTH_OPTIONS varchar, -- options for authentication hook function
primary key (HP_LISTEN_HOST, HP_HOST, HP_LPATH)
)
;
</programlisting>
</sect3>
<sect3 id="tables.db.dba.http_acl"><title>HTTP Access Control List</title>
<programlisting><![CDATA[
create table HTTP_ACL (
HA_LIST varchar not null, -- ACL name
HA_ORDER integer not null, -- Position in the list
HA_OBJECT integer not NULL default -1, -- Object ID (applicable to news groups also)
HA_CLIENT_IP varchar not NULL, -- *PATTERN*
HA_FLAG integer not NULL default 1, -- Allow/Deny flag, 0 - allow, 1 - deny
HA_RW integer default 0, -- Read/Write flag, 0 - read, 1 - post
HA_DEST_IP varchar default '*', -- Destination IP/Host (applicable to the proxy also)
PRIMARY KEY (HA_LIST, HA_ORDER, HA_CLIENT_IP, HA_FLAG)
);
]]></programlisting>
</sect3>
</sect2>
<sect2 id="smtptabledesc">
<title>Mail Table Description</title>
<programlisting>
- - Message queue
create table MAIL_MESSAGE_QUEUE (
MQ_ID varchar, - - FK MAIL_MESSAGE (MM_ID)
MQ_RECIEVER varchar, - - foreign mail exchanger
primary key (MQ_ID))
;
create index MAIL_MSG_Q_REC on MAIL_MESSAGE_QUEUE (MQ_RECIEVER)
;
-- Mail Table
create table DB.DBA.MAIL_MESSAGE (
MM_ID integer, -- Unique id of message (per user)
MM_OWN varchar (128), -- Local WebDAV account (recipient, mail box owner) name,
FK references WS.WS.SYS_DAV_USER (U_NAME)
MM_FLD varchar (128), -- Message Folder (initial 'Inbox')
MM_FROM varchar (512), -- From: RFC822 header field
MM_TO varchar (512), -- To: RFC822 header field
MM_CC varchar (512), -- Cc: RFC822 header field
MM_BCC varchar (512), -- Bcc: RFC822 header field
MM_SUBJ varchar (512), -- Subject of the message
MM_REC_DATE varchar (50), -- Date of arrival
MM_SND_TIME varchar (50), -- Date of posting
MM_IS_READED integer, -- Read flag (0/1 not read, 1 - read)
MM_BODY long varchar, -- Message content (including message header)
primary key (MM_OWN, MM_FLD, MM_ID)
)
;
</programlisting>
<note><title>Note:</title>
<para>MM_FROM, MM_TO, MM_CC, MM_BCC, MM_SUBJ, MM_SND_TIME exists only if there exists corresponding RFC822 headers in mail message</para>
</note>
<programlisting>
-- Temporary message MIME parts table (for message composition)
create table DB.DBA.MAIL_PARTS (
MP_ID integer, -- Unique id per user (order of parts)
MP_PART long varbinary, -- Message MIME part body
MP_ATTRS long varbinary, -- Message MIME part attributes
MP_OWN varchar (128), -- WebDAV user name - FK REFERENCES WS.WS.SYS_DAV_USER (U_NAME)
primary key (MP_OWN, MP_ID)
)
;
- - Local mail users
(this table will be needed only in case of different DB, DAV and MAIL users)
create table MAIL_USERS (
MU_NAME varchar,
MU_PWD varchar,
primary key (MU_NAME))
;
- - Allowed relay domains
(only in case of allowed relaying)
create table MAIL_RELAY (
MR_ALLOWED varchar;
primary key (MR_ALLOWED))
;
</programlisting>
</sect2>
<sect2 id="newssrvtables"><title>NNTP Server Tables</title>
<para>The server uses the following tables:</para>
<programlisting>
create table NEWS_MESSAGES (
NM_ID varchar (128) not null, -- Message-ID (unique)
NM_REF varchar (128), -- References
NM_GROUP varchar (128) not null, -- Newsgroups ID
NM_NUM_GROUP integer not null, -- ID unique for group
NM_READED integer, -- How many times this message is read
NM_OWN varchar (128), -- Local sender (if sender is non
local should be null)
NM_REC_DATE datetime, -- Receiving date
NM_STAT integer, -- Post from the local user
NM_HEAD long varchar, -- Message header
NM_BODY long varchar, -- Message content
primary key (NM_ID))
</programlisting>
<programlisting>
create table NEWS_GROUPS (
NG_GROUP integer identity, -- Newsgroups ID
NG_NAME varchar (128) NOT NULL, -- Local name
NG_DESC varchar (128), -- Comment
NG_SERVER varchar (128), -- Server
NG_SERV_PORT integer, -- Server port
NG_OUT_GROUP varchar (128), -- Out name
NG_POST integer, -- Flag 0/1 posting allowed
NG_UP_TIME datetime, -- Last Update
NG_CREAT datetime, -- When group is created (attached)
NG_UP_INT integer, -- Update interval (min)
NG_CLEAR_INT integer, -- Drop interval for messages
NG_LIFE_READ integer, -- Flag 0/1 read messages exist longer
NG_STAT integer, -- Flag 0/3 Result from last update.
0 - Unsuccessful
1 - Successful
3 - Successful but does not get all available messages.
NG_AUTO integer, -- Flag 0/1 Auto download.
NG_PASS integer, -- Download messages for one pass.
NG_UP_MESS integer, -- Messages from last update.
NG_NUM integer, -- Estimated number of articles in group
NG_FIRST integer, -- First article number in the group
NG_LAST integer, -- Last article number in the group
primary key (NG_GROUP))
</programlisting>
<programlisting>
create table NEWS_ACL (
NA_GROUP integer not NULL, -- News Group number, referencing
NEWS_GROUPS (NG_GROUP)
NA_IP varchar not NULL, -- Client IP (the mask is %)
NA_A_D integer not NULL, -- flag 0 - allow, 1 - deny (action)
NA_RW integer not NULL, -- flag 0 - read, 1 - post (reading
or posting action is allowed/disallowed)
PRIMARY KEY (NA_GROUP, NA_IP, NA_A_D, NA_RW));
</programlisting>
</sect2>
<sect2 id="systabswsrm"><title>WS Reliable Messaging</title>
<sect3 id="systabswsrmrecvr"><title>Receiver-Side Schema Objects</title>
<para>Incoming messages table used to keep
successfully received messages. An application on receiver side can
access it in order to process the messages.</para>
<programlisting><![CDATA[
CREATE TABLE SYS_WSRM_IN_MESSAGE_LOG (
IML_INDENTIFIER varchar, -- references SYS_WSRM_IN_SEQUENCES.WIS_IDENTIFIER
IML_MESSAGE_ID int NOT NULL, -- unique per sequence
IML_EXPIRE_DATE datetime, -- when expires
IML_RECEIVE_DATE timestamp NOT NULL ,
IML_MESSAGE long varchar NOT NULL, -- the message itself
IML_STATE int,
primary key (IML_INDENTIFIER, IML_MESSAGE_ID)
)
;
]]></programlisting>
<para>Incoming sequences table; used to keep the
successfully established message sequence
and policy to be applied to it.
</para>
<programlisting><![CDATA[
CREATE TABLE SYS_WSRM_IN_SEQUENCES
(
WIS_IDENTIFIER varchar, -- sequence identifier
WIS_VERSION varchar,
WIS_DELIVERY_ASSURANCE varchar,
WIS_SEQUENCE_EXPIRATION datetime,
WIS_INACTIVITY_TIMEOUT integer,
WIS_RETRANSMISSION_INTERVAL integer,
WIS_ACKNOWLEDGEMENT_INTERVAL integer,
primary key (WIS_IDENTIFIER)
)
;
]]></programlisting>
</sect3>
<sect3 id="systabswsrmsndr"><title>Sender's Schema Objects</title>
<para>Outgoing messages log table is used to keep the outgoing messages,
to track their state. It also keeps parameter to the soap request in order
to re-send if are not already accepted.</para>
<programlisting><![CDATA[
CREATE TABLE SYS_WSRM_OUT_MESSAGE_LOG (
OML_INDENTIFIER varchar, -- references SYS_WSRM_OUT_SEQUENCES.WOS_IDENTIFIER
OML_MESSAGE_ID int NOT NULL, -- unique per sequence
OML_EXPIRE_DATE datetime, -- when expires
OML_SEND_DATE timestamp NOT NULL, -- when is sent
OML_MESSAGE long varchar NOT NULL,-- soap call parameters
OML_STATE int,
primary key (OML_INDENTIFIER, OML_MESSAGE_ID)
)
;
]]></programlisting>
<para>Outgoing sequences table is used to keep parameters for outgoing
message sequences. It's used to persist their state.</para>
<programlisting><![CDATA[
CREATE TABLE SYS_WSRM_OUT_SEQUENCES (
WOS_IDENTIFIER varchar, -- sequence identifier
WOS_VERSION varchar,
WOS_DELIVERY_ASSURANCE varchar,
WOS_SEQUENCE_EXPIRATION datetime,
WOS_INACTIVITY_TIMEOUT integer,
WOS_RETRANSMISSION_INTERVAL integer,
WOS_ACKNOWLEDGEMENT_INTERVAL integer,
primary key (WOS_IDENTIFIER)
)
;
]]></programlisting>
</sect3>
</sect2>
<sect2 id="wstschema"><title>WS Trust</title>
<programlisting><![CDATA[
create table WST_SERVER_ISSUER_TOKENS
(
WSK_TOKEN_TYPE varchar,
WSK_REQUEST_TYPE varchar,
WSK_APPLIES_TO varchar,
WSK_FROM varchar,
WSK_SERVICE_NAME varchar,
WSK_PORT_TYPE varchar,
WSK_TOKEN varchar,
PRIMARY KEY (WSK_TOKEN_TYPE, WSK_FROM, WSK_TOKEN)
)
;
]]></programlisting>
</sect2>
<sect2 id="syncmlschema"><title>SyncML Schema Objects</title>
<sect3 id="smlsdevices"><title>SyncML Devices</title>
<programlisting><![CDATA[
create table SYNC_DEVICES (
DEV_ID integer identity,
DEV_USER_ID integer, -- references WS.WS.SYS_DAV_USER(U_ID)
DEV_URI varchar,
DEV_MAN varchar, -- manufacturer
DEV_MOD varchar, -- model
DEV_OEM varchar, -- OEM
DEV_FWV varchar, -- firmware version
DEV_SWV varchar, -- software version
DEV_HWV varchar, -- hardware version
DEV_DEVID varchar, -- device id ; must be unique
DEV_DEVTYP varchar, -- device type
DEV_UTC integer, -- requires datetime in UTC
DEV_SUPP_LOB integer, -- supports large objects
DEV_SUPP_NOC integer, -- supports "number of changes"
primary key (DEV_URI) -- constraint foobar unique(DEV_USER_ID, DEV_URI)
)
;
]]></programlisting>
</sect3>
<sect3 id="smlsmaps"><title>SyncML Maps</title>
<programlisting><![CDATA[
create table SYNC_MAPS (
MAP_DEV_ID integer, -- references SYNC_DEVICES(DEV_ID)
MAP_COL_ID int, -- references WS.WS.SYS_DAV_COL (COL_ID)
MAP_LUID varchar, -- local id (from client's view)
MAP_GUID varchar, -- references WS.WS.SYS_DAV_RES (RES_ID)
primary key (MAP_DEV_ID, MAP_LUID, MAP_GUID)
)
;
]]></programlisting>
</sect3>
<sect3 id="smlssyncanchors"><title>SyncML Sync Anchors</title>
<programlisting><![CDATA[
create table SYNC_ANCHORS (
A_COL_ID integer, -- references WS.WS.SYS_DAV_COL(COL_ID)
A_DEV_ID integer, -- references SYNC_DEVICES(DEV_ID)
A_LAST_LOCAL datetime, -- last local anchor
A_LAST_REMOTE varchar, -- last remote anchor
A_NEXT_LOCAL datetime, -- last local anchor
A_NEXT_REMOTE varchar, -- last remote anchor
primary key (A_COL_ID, A_DEV_ID)
)
;
]]></programlisting>
</sect3>
<sect3 id="smlssynclog"><title>SyncML Sync Log</title>
<programlisting><![CDATA[
create table SYNC_RPLOG (
RLOG_RES_ID int, -- references WS.WS.SYS_DAV_RES (RES_ID)
RLOG_RES_COL int, -- references WS.WS.SYS_DAV_COL (COL_ID)
DMLTYPE varchar, -- IUD - insert/update/delete
SNAPTIME datetime, -- timestamp
primary key (RLOG_RES_ID)
)
;
]]></programlisting>
</sect3>
<sect3 id="smlsdevicesessions"><title>SyncML Device's Sessions</title>
<programlisting><![CDATA[
create table SYNC_SESSION
(
S_ID varchar, -- session ID (unique per device)
S_DEV varchar, -- device URI
S_DEV_ID int, -- references SYNC_DEVICES(DEV_ID)
S_UID int, -- user ID SYS_USERS.U_ID
S_LAST_MSG int, -- last massage no
S_LAST_CMD int, -- last command no
S_DATA long varbinary, -- internal use
S_TS timestamp, -- last used
S_AUTH int default 0, -- authenticated for this session
S_NONCE varchar default '', -- nonce value
S_INIT int default 1, -- init state flag
primary key (S_ID, S_DEV)
)
;
]]></programlisting>
</sect3>
</sect2>
<sect2 id="views_information_schema"><title>INFORMATION_SCHEMA views</title>
<para>The INFORMATION_SCHEMA views are described in the SQL200n standard.
These views are defined in every qualifier and describe the objects in
that qualifier.
</para>
<sect3 id="views_information_schema_tables"><title>TABLES</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.TABLES
TABLE_CATALOG VARCHAR(128),
TABLE_SCHEMA VARCHAR(128),
TABLE_NAME VARCHAR(128),
TABLE_TYPE VARCHAR(128),
V_KEY_TABLE VARCHAR,
V_KEY_NAME VARCHAR,
V_KEY_ID INTEGER,
V_KEY_N_SIGNIFICANT SMALLINT,
V_KEY_CLUSTER_ON_ID SMALLINT,
V_KEY_IS_MAIN SMALLINT,
V_KEY_IS_OBJECT_ID SMALLINT,
V_KEY_IS_UNIQUE SMALLINT,
V_KEY_MIGRATE_TO INTEGER,
V_KEY_SUPER_ID INTEGER,
V_KEY_DECL_PARTS SMALLINT,
V_KEY_STORAGE VARCHAR,
V_KEY_OPTIONS ANY
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_columns"><title>COLUMNS</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.COLUMNS
TABLE_CATALOG VARCHAR(128),
TABLE_SCHEMA VARCHAR(128),
TABLE_NAME VARCHAR(128),
COLUMN_NAME VARCHAR(128),
ORDINAL_POSITION INTEGER,
COLUMN_DEF VARCHAR,
NULLABLE VARCHAR (3),
DATA_TYPE VARCHAR(128),
CHARACTER_MAXIMUM_LENGTH INTEGER,
CHARACTER_OCTET_LENGTH INTEGER,
NUMERIC_PRECISION SMALLINT,
NUMERIC_PRECISION_RADIX SMALLINT,
NUMERIC_SCALE SMALLINT,
DOMAIN_CATALOG VARCHAR(128),
DOMAIN_SCHEMA VARCHAR(128),
DOMAIN_NAME VARCHAR(128),
IS_IDENTITY VARCHAR(3),
IDENTITY_GENERATION VARCHAR(10),
IDENTITY_START VARCHAR,
IDENTITY_INCREMENT VARCHAR,
V_TABLE VARCHAR,
V_COLUMN VARCHAR,
V_COL_ID INTEGER,
V_COL_DTP SMALLINT,
V_COL_PREC INTEGER,
V_COL_SCALE SMALLINT,
V_COL_DEFAULT VARCHAR,
V_COL_CHECK VARCHAR,
V_COL_NULLABLE SMALLINT,
V_COL_NTH SMALLINT,
V_COL_OPTIONS ANY,
V_KP_NTH SMALLINT
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_schemata"><title>SCHEMATA</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.SCHEMATA
CATALOG_NAME VARCHAR(128),
SCHEMA_NAME VARCHAR(128),
SCHEMA_OWNER VARCHAR(128)
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_CHECK_CONSTRAINTS"><title>CHECK_CONSTRAINTS</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.CHECK_CONSTRAINTS
CONSTRAINT_CATALOG VARCHAR(128),
CONSTRAINT_SCHEMA VARCHAR(128),
CONSTRAINT_NAME VARCHAR(128),
CHECK_CLAUSE VARCHAR,
V_C_TABLE VARCHAR(128),
V_C_ID INTEGER,
V_C_TEXT VARCHAR(4000),
V_C_MODE LONG VARCHAR
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_CHECK_CONSTRAINTS"><title>CHECK_CONSTRAINTS</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.CHECK_CONSTRAINTS
CONSTRAINT_CATALOG VARCHAR(128),
CONSTRAINT_SCHEMA VARCHAR(128),
CONSTRAINT_NAME VARCHAR(128),
CHECK_CLAUSE VARCHAR,
V_C_TABLE VARCHAR(128),
V_C_ID INTEGER,
V_C_TEXT VARCHAR(4000),
V_C_MODE LONG VARCHAR
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_COLUMN_DOMAIN_USAGE"><title>COLUMN_DOMAIN_USAGE</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.COLUMN_DOMAIN_USAGE
DOMAIN_CATALOG VARCHAR(128),
DOMAIN_SCHEMA VARCHAR(128),
DOMAIN_NAME VARCHAR(128),
TABLE_CATALOG VARCHAR(128),
TABLE_SCHEMA VARCHAR(128),
TABLE_NAME VARCHAR(128),
COLUMN_NAME VARCHAR(128)
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_COLUMN_PRIVILEGES"><title>COLUMN_PRIVILEGES</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.COLUMN_PRIVILEGES
GRANTOR VARCHAR(128),
GRANTEE VARCHAR(128),
TABLE_CATALOG VARCHAR(128),
TABLE_SCHEMA VARCHAR(128),
TABLE_NAME VARCHAR(128),
COLUMN_NAME VARCHAR(128),
PRIVILEGE_TYPE VARCHAR(10),
IS_GRANTABLE VARCHAR (3),
V_G_USER INTEGER,
V_G_OP INTEGER,
V_G_OBJECT VARCHAR (386),
V_G_COL VARCHAR (386),
V_G_GRANTOR VARCHAR (128),
V_G_ADMIN_OPT VARCHAR (128)
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_KEY_COLUMN_USAGE"><title>KEY_COLUMN_USAGE</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.KEY_COLUMN_USAGE
CONSTRAINT_CATALOG VARCHAR(128),
CONSTRAINT_SCHEMA VARCHAR(128),
CONSTRAINT_NAME VARCHAR(128),
TABLE_CATALOG VARCHAR(128),
TABLE_SCHEMA VARCHAR(128),
TABLE_NAME VARCHAR(128),
COLUMN_NAME VARCHAR(128),
ORDINAL_POSITION SMALLINT,
V_KEY_IS_MAIN SMALLINT,
V_KEY_IS_UNIQUE SMALLINT
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_ROUTINES"><title>ROUTINES</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.ROUTINES
SPECIFIC_CATALOG VARCHAR(128),
SPECIFIC_SCHEMA VARCHAR(128),
SPECIFIC_NAME VARCHAR(128),
ROUTINE_CATALOG VARCHAR(128),
ROUTINE_SCHEMA VARCHAR(128),
ROUTINE_NAME VARCHAR(128),
MODULE_CATALOG VARCHAR(128),
MODULE_SCHEMA VARCHAR(128),
MODULE_NAME VARCHAR(128),
UDT_CATALOG VARCHAR(128),
UDT_SCHEMA VARCHAR(128),
UDT_NAME VARCHAR(128),
DATA_TYPE VARCHAR(128),
CHARACTER_MAXIMUM_LENGTH INTEGER,
CHARACTER_OCTET_LENGTH INTEGER,
COLLATION_CATALOG VARCHAR(128),
COLLATION_SCHEMA VARCHAR(128),
COLLATION_NAME VARCHAR(128),
CHARACTER_SET_CATALOG VARCHAR(128),
CHARACTER_SET_SCHEMA VARCHAR(128),
CHARACTER_SET_NAME VARCHAR(128),
NUMERIC_PRECISION SMALLINT,
NUMERIC_PRECISION_RADIX SMALLINT,
NUMERIC_SCALE SMALLINT,
DATETIME_PRECISION SMALLINT,
INTERVAL_TYPE VARCHAR(128),
INTERVAL_PRECISION SMALLINT,
TYPE_UDT_CATALOG VARCHAR(128),
TYPE_UDT_SCHEMA VARCHAR(128),
TYPE_UDT_NAME VARCHAR(128),
SCOPE_CATALOG VARCHAR(128),
SCOPE_SCHEMA VARCHAR(128),
SCOPE_NAME VARCHAR(128),
MAXIMUM_CARDINALITY INTEGER,
DTD_IDENTIFIER VARCHAR(128),
ROUTINE_BODY VARCHAR(30),
ROUTINE_DEFINTION VARCHAR,
EXTERNAL_NAME VARCHAR(128),
EXTERNAL_LANGUAGE VARCHAR(30),
PARAMETER_STYLE VARCHAR(30),
IS_DETERMINISTIC VARCHAR(10),
SQL_DATA_ACCESS VARCHAR(30),
IS_NULL_CALL VARCHAR(10),
SQL_PATH VARCHAR(128),
SCHEMA_LEVEL_ROUTINE VARCHAR(10),
MAX_DYNAMIC_RESULT_SETS SMALLINT,
IS_USER_DEFINED_CAST VARCHAR(10),
IS_IMPLICITLY_INVOCABLE VARCHAR(10),
CREATED DATETIME,
LAST_ALTERED DATETIME
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_PARAMETERS"><title>PARAMETERS</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.PARAMETERS
SPECIFIC_CATALOG VARCHAR(128),
SPECIFIC_SCHEMA VARCHAR(128),
SPECIFIC_NAME VARCHAR(128),
ORDINAL_POSITION INTEGER,
PARAMETER_MODE VARCHAR(10),
IS_RESULT VARCHAR(10),
AS_LOCATOR VARCHAR(10),
PARAMETER_NAME VARCHAR(128),
DATA_TYPE VARCHAR(128),
CHARACTER_MAXIMUM_LENGTH INTEGER,
CHARACTER_OCTET_LENGTH INTEGER,
COLLATION_CATALOG VARCHAR(128),
COLLATION_SCHEMA VARCHAR(128),
COLLATION_NAME VARCHAR(128),
CHARACTER_SET_CATALOG VARCHAR(128),
CHARACTER_SET_SCHEMA VARCHAR(128),
CHARACTER_SET_NAME VARCHAR(128),
NUMERIC_PRECISION SMALLINT,
NUMERIC_PRECISION_RADIX SMALLINT,
NUMERIC_SCALE SMALLINT,
DATETIME_PRECISION SMALLINT,
INTERVAL_TYPE VARCHAR(128),
INTERVAL_PRECISION SMALLINT,
USER_DEFINED_TYPE_CATALOG VARCHAR(128),
USER_DEFINED_TYPE_SCHEMA VARCHAR(128),
USER_DEFINED_TYPE_NAME VARCHAR(128),
SCOPE_CATALOG VARCHAR(128),
SCOPE_SCHEMA VARCHAR(128),
SCOPE_NAME VARCHAR(128)
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_REFERENTIAL_CONSTRAINTS"><title>REFERENTIAL_CONSTRAINTS</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
CONSTRAINT_CATALOG VARCHAR(128),
CONSTRAINT_SCHEMA VARCHAR(128),
CONSTRAINT_NAME VARCHAR(128),
UNIQUE_CONSTRAINT_CATALOG VARCHAR(128),
UNIQUE_CONSTRAINT_SCHEMA VARCHAR(128),
UNIQUE_CONSTRAINT_NAME VARCHAR(128),
MATCH_OPTION VARCHAR(7),
UPDATE_RULE VARCHAR(9),
DELETE_RULE VARCHAR(9),
V_FK_TABLE VARCHAR(128)
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_TABLE_CONSTRAINTS"><title>TABLE_CONSTRAINTS</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.TABLE_CONSTRAINTS
CONSTRAINT_CATALOG VARCHAR(128),
CONSTRAINT_SCHEMA VARCHAR(128),
CONSTRAINT_NAME VARCHAR(128),
TABLE_CATALOG VARCHAR(128),
TABLE_SCHEMA VARCHAR(128),
TABLE_NAME VARCHAR(128),
CONSTRAINT_TYPE VARCHAR(11),
IS_DEFERRABLE VARCHAR(2),
INITIALLY_DEFERRED VARCHAR(2)
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_TABLE_PRIVILEGES"><title>TABLE_PRIVILEGES</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.TABLE_PRIVILEGES
GRANTOR VARCHAR(128),
GRANTEE VARCHAR(128),
TABLE_CATALOG VARCHAR(128),
TABLE_SCHEMA VARCHAR(128),
TABLE_NAME VARCHAR(128),
PRIVILEGE_TYPE VARCHAR(10),
IS_GRANTABLE VARCHAR (3),
V_G_USER INTEGER,
V_G_OP INTEGER,
V_G_OBJECT VARCHAR (386),
V_G_GRANTOR VARCHAR (386)
]]></programlisting>
</sect3>
<sect3 id="views_information_schema_VIEWS"><title>VIEWS</title>
<programlisting><![CDATA[
INFORMATION_SCHEMA.VIEWS
TABLE_CATALOG VARCHAR(128),
TABLE_SCHEMA VARCHAR(128),
TABLE_NAME VARCHAR(128),
VIEW_DEFINITION VARCHAR,
CHECK_OPTION VARCHAR(7),
IS_UPDATABLE VARCHAR(3)
]]></programlisting>
</sect3>
</sect2>
</sect1>
|