database-guide.html 16.3 KB
Newer Older
Matt Tucker's avatar
Matt Tucker committed
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>Jive Messenger Database Schema Guide</title>
  <link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<a name="top"></a>
<h1>Jive Messenger Database Schema Guide</h1>
<h2>Introduction</h2>
<p>
This document outlines the data type conventions and tables in the Jive
Messenger 1.1 database
schema. Some information, like column indexes and foreign keys, is
omitted. For this, please
read the individual schema of the database you're interested in.
The <a href="database10-guide.html">Messenger 1.0 schema</a> is
documented separately as well a <a
 href="database10_11-upgrade-guide.html">1.0 to 1.1 database upgrade
guide</a> for those that need to know the changes to database schema.
An upgrade script is provided for each database in the <tt>database/upgrade</tt>
directory of the distribution that automatically upgrade Messenger 1.0
databases to 1.1.<br>
</p>
<h2>Data Type Conventions</h2>
<p>
Date column type support varies widely across databases. Therefore,
Jive Messenger
specially encodes dates as VARCHAR values. Each date is a Java long
value which
is 0-padded to 15 characters. The long value is the internal
representation of
Java Date objects, which can be obtained with code such as the
following:
</p>
<pre>long currentDate = new Date().getTime();</pre>
<p>
Boolean values are always represented a numeric values: 0 for false and
1 for
true.
</p>
<h2>Database Tables</h2>
<p>
Below is a description of each of the tables in the Jive Messenger
database schema.
A <span class="primary-key">yellow row</span> denotes a primary key.
</p>
<ul>
  <li><a href="#jiveChatbot">jiveChatbot</a></li>
  <li><a href="#jiveDomain">jiveDomain</a><br>
  </li>
  <li><a href="#jiveGroup">jiveGroup</a> </li>
  <li><a href="#jiveGroupProp">jiveGroupProp</a> </li>
  <li><a href="#jiveGroupUser">jiveGroupUser</a> </li>
  <li><a href="#jiveID">jiveID</a></li>
  <li><a href="#jiveOffline">jiveOffline</a><br>
  </li>
  <li><a href="#jivePrivate">jivePrivate</a> </li>
  <li><a href="#jiveUser">jiveUser</a></li>
  <li><a href="#jiveUserID">jiveUserID</a><br>
  </li>
  <li><a href="#jiveUserProp">jiveUserProp</a> </li>
  <li><a href="#jiveRoster">jiveRoster</a> </li>
  <li><a href="#jiveRosterGroups">jiveRosterGroups</a> </li>
  <li><a href="#jiveVCard">jiveVCard</a> </li>
</ul>
<br>
<a name="jiveChatbot"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveChatbot (Chatbot addresses)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>chatbotID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>Chatbot ID (Primary Key)</td>
    </tr>
    <tr>
      <td>description</td>
      <td>VARCHAR</td>
      <td>4000</td>
      <td>Chatbot Description</td>
    </tr>
    <tr>
      <td>creationDate</td>
      <td>VARCHAR</td>
      <td>15</td>
      <td>Creation Date</td>
    </tr>
    <tr>
      <td>modificationDate</td>
      <td>VARCHAR</td>
      <td>15</td>
      <td>Last Modified Date</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<a name="jiveDomain"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveDomain (Messenger account domains)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>domainID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>Domain ID (Primary Key)</td>
    </tr>
    <tr>
      <td>name</td>
      <td>VARCHAR</td>
      <td>255</td>
      <td>Domain Name</td>
    </tr>
    <tr>
      <td>description</td>
      <td>VARCHAR</td>
      <td>4000</td>
      <td>Domain Description</td>
    </tr>
    <tr>
      <td>creationDate</td>
      <td>VARCHAR</td>
      <td>15</td>
      <td>Creation Date</td>
    </tr>
    <tr>
      <td>modificationDate</td>
      <td>VARCHAR</td>
      <td>15</td>
      <td>Last Modified Date</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<a name="jiveGroup"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveGroup (user Group data)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>groupID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>Group ID (Primary Key)</td>
    </tr>
    <tr>
      <td>name</td>
      <td>VARCHAR</td>
      <td>255</td>
      <td>Group Name</td>
    </tr>
    <tr>
      <td>description</td>
      <td>VARCHAR</td>
      <td>4000</td>
      <td>Group Description</td>
    </tr>
    <tr>
      <td>creationDate</td>
      <td>VARCHAR</td>
      <td>15</td>
      <td>Creation Date</td>
    </tr>
    <tr>
      <td>modificationDate</td>
      <td>VARCHAR</td>
      <td>15</td>
      <td>Last Modified Date</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<a name="jiveGroupProp"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveGroupProp (name-value associations for a
Group)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>groupID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>Group ID</td>
    </tr>
    <tr class="primary-key">
      <td>name</td>
      <td>VARCHAR</td>
      <td>100</td>
      <td>Group Property Name</td>
    </tr>
    <tr>
      <td>propValue</td>
      <td>VARCHAR</td>
      <td>4000</td>
      <td>Group Property Value</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<a name="jiveGroupUser"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveGroupUser (associates Users with Groups)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>groupID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>Group ID (Primary Key)</td>
    </tr>
    <tr class="primary-key">
      <td>userID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>User ID (Primary Key)</td>
    </tr>
    <tr class="primary-key">
      <td>administrator</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>Adminstrator (Boolean) (Primary Key)</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<a name="jiveID"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveID (used for unique ID sequence generation)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>idType</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>ID type (e.g., Group, User, Roster) (Primary Key)</td>
    </tr>
    <tr>
      <td>id</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>Next available block of ID&#8217;s (Used for Database-Independent
ID Sequence Generator)</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<a name="jiveOffline"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveOffline (offline message storage)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Change</th>
    </tr>
    <tr class="primary-key">
      <td>userID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>User ID (Primary Key)<br>
      </td>
    </tr>
    <tr class="primary-key">
      <td style="vertical-align: top;">messageID<br>
      </td>
      <td style="vertical-align: top;">NUMBER<br>
      </td>
      <td style="vertical-align: top;">n/a<br>
      </td>
      <td style="vertical-align: top;">ID of stored message (Primary
Key)<br>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">creationDate<br>
      </td>
      <td style="vertical-align: top;">VARCHAR<br>
      </td>
      <td style="vertical-align: top;">15<br>
      </td>
      <td style="vertical-align: top;">Date message stored<br>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">size<br>
      </td>
      <td style="vertical-align: top;">NUMBER<br>
      </td>
      <td style="vertical-align: top;">n/a<br>
      </td>
      <td style="vertical-align: top;">Size of message in bytes<br>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">message<br>
      </td>
      <td style="vertical-align: top;">TEXT<br>
      </td>
      <td style="vertical-align: top;">n/a<br>
      </td>
      <td style="vertical-align: top;">The message text<br>
      </td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<a name="jivePrivate"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jivePrivate (Private data storage)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>userID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>User ID (Primary Key)</td>
    </tr>
    <tr class="primary-key">
      <td>name</td>
      <td>VARCHAR</td>
      <td>100</td>
      <td>Name of the private entry (Primary Key)</td>
    </tr>
    <tr class="primary-key">
      <td>namespace</td>
      <td>VARCHAR</td>
      <td>200</td>
      <td>Namespace of the private entry (Primary Key)</td>
    </tr>
    <tr>
      <td>value</td>
      <td>TEXT</td>
      <td>n/a</td>
      <td>Value of the private data</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<br>
<a name="jiveUser"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveUser (User data)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>userID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>User ID (Primary Key)</td>
    </tr>
    <tr>
      <td>password</td>
      <td>VARCHAR</td>
      <td>32</td>
      <td>Password Data (plain-text or MD5 hash depending on settings)</td>
    </tr>
    <tr>
      <td>name</td>
      <td>VARCHAR</td>
      <td>100</td>
      <td>Name</td>
    </tr>
    <tr>
      <td>nameVisible</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>Is Name Visible (Boolean)</td>
    </tr>
    <tr>
      <td>email</td>
      <td>VARCHAR</td>
      <td>100</td>
      <td>Email Address</td>
    </tr>
    <tr>
      <td>emailVisible</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>Is Email Visible (Boolean)</td>
    </tr>
    <tr>
      <td>creationDate</td>
      <td>VARCHAR</td>
      <td>15</td>
      <td>Creation Date</td>
    </tr>
    <tr>
      <td>modificationDate</td>
      <td>VARCHAR</td>
      <td>15</td>
      <td>Last Modified Date</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<a name="jiveUserID"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveUserID (User account IDs - address
reservations)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>username</td>
      <td>VARCHAR</td>
      <td>30<br>
      </td>
      <td>User name (Primary Key)</td>
    </tr>
    <tr class="primary-key">
      <td>domainID</td>
      <td>NUMBER</td>
      <td>n/a<br>
      </td>
      <td>The domain this account belongs to (Primary Key)</td>
    </tr>
    <tr>
      <td>objectType</td>
      <td>NUMBER</td>
      <td>n/a<br>
      </td>
      <td>Address type (0 - user, 1 - chatbot)<br>
      </td>
    </tr>
    <tr>
      <td>objectID</td>
      <td>NUMBER</td>
      <td>n/a<br>
      </td>
      <td>ID of the corresponding account</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br ="">
<a name="jiveUserProp"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveUserProp (name-value associations for a User)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>userID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>User ID (Primary Key)</td>
    </tr>
    <tr class="primary-key">
      <td>name</td>
      <td>VARCHAR</td>
      <td>100</td>
      <td>User Property Name</td>
    </tr>
    <tr>
      <td>propValue</td>
      <td>NUMBER</td>
      <td>4000</td>
      <td>User Property Value</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<a name="jiveRoster"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveRoster (buddy rosters or lists)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>rosterID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>ID of roster (Primary Key)</td>
    </tr>
    <tr>
      <td>userID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>User ID</td>
    </tr>
    <tr>
      <td style="vertical-align: top;">jid<br>
      </td>
      <td style="vertical-align: top;">TEXT<br>
      </td>
      <td style="vertical-align: top;">n/a<br>
      </td>
      <td style="vertical-align: top;">The address of the roster entry<br>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">sub<br>
      </td>
      <td style="vertical-align: top;">NUMBER<br>
      </td>
      <td style="vertical-align: top;">n/a<br>
      </td>
      <td style="vertical-align: top;">The subscription status of the
entry<br>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">ask<br>
      </td>
      <td style="vertical-align: top;">NUMBER<br>
      </td>
      <td style="vertical-align: top;">n/a<br>
      </td>
      <td style="vertical-align: top;">The ask status of the entry<br>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">recv<br>
      </td>
      <td style="vertical-align: top;">NUMBER<br>
      </td>
      <td style="vertical-align: top;">n/a<br>
      </td>
      <td style="vertical-align: top;">Flag indicating the entry is a
roster request that was received<br>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">nick<br>
      </td>
      <td style="vertical-align: top;">VARCHAR<br>
      </td>
      <td style="vertical-align: top;">255<br>
      </td>
      <td style="vertical-align: top;">The nickname assigned to this
roster entry<br>
      </td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<a name="jiveRosterGroups"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveRosterGroups (Groups of buddy entries in a
roster)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>rosterID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>Roster ID (Primary Key)</td>
    </tr>
    <tr class="primary-key">
      <td>rank</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>Position of the entry (Primary Key)</td>
    </tr>
    <tr>
      <td>groupName</td>
      <td>VARCHAR</td>
      <td>255</td>
      <td>The user defined name for this roster group</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>
<br>
<br>
<br>
<a name="jiveVCard"></a>
<table class="dbtable">
  <tbody>
    <tr>
      <th colspan="4">jiveVCard (vCard contact information)</th>
    </tr>
    <tr>
      <th>Column Name</th>
      <th>Type</th>
      <th>Length</th>
      <th>Description</th>
    </tr>
    <tr class="primary-key">
      <td>userID</td>
      <td>NUMBER</td>
      <td>n/a</td>
      <td>User ID (Primary Key)</td>
    </tr>
    <tr class="primary-key">
      <td>name</td>
      <td>VARCHAR</td>
      <td>100</td>
      <td>Name of the vCard entry (Primary Key)</td>
    </tr>
    <tr>
      <td>propValue</td>
      <td>TEXT</td>
      <td>n/a</td>
      <td>Value of the vCard entry</td>
    </tr>
  </tbody>
</table>
&nbsp;<a href="#top" class="top">top of page</a>

</body>
</html>