The VMS SharkOpenVMS Notes: RMS and Oracle-Rdb

  1. The information presented here is intended for educational use by OpenVMS technologists
  2. The information presented here is provided free of charge, as-is, with no warranty of any kind
  3. Is this text too small? You have two options:
    1. hold down the CTRL key while rolling the mouse wheel (zoom-in, zoom-out)
    2. use your keyboard like so:
      • hit: CTRL with "-" key to zoom smaller
      • hit: CTRL with "+" key to zoom larger
      • hit: CTRL with zero key to reset zoom

Quick Index

Edit: 2015-09-12 (fixed a few typos)

RMS for OpenVMS

RMS Links

Why Change to Relational?

Question: If RMS-Indexed (ISAM) technology is so fast and cheap, then why consider changing?
Answer: Evolution

  1. The first computers had no operating system software so programmers needed to write their own I/O routines every time they built a new application. Building computer hardware with more memory made it possible to load both "operating system software" and "application software" thus saving programmers valuable time by not having to write their own I/O routines. The burden of writing I/O shifted to hardware manufacturers who also exploited new technologies like "error detection and error correction".

    p.s. The first commercial computer I worked on in 1977 had no operating system (although operating systems had been available for quite some time). It was a 32-bit Interdata Model 70 (an instruction set heavily influenced by the IBM 360) was was used to record long-distance billing information provided by a Northern Electric (number 4) toll-tandem crossbar switch, then wrote that information to a Hewlett-Packard 7970C 9-track tape deck.
  2. Operating systems were first based upon tapes (TOS) and then later upon disks (DOS). Early disk operating systems only supported sequential-stream, sequential-block and relative-block operations. If you wanted indexed-access to your relative-block data, you needed to implement your own indexing schemes.

    p.s. OS developers produced standardized data formats so tapes could be read by many other vendors; this did not happen with disks until the advent of ubiquitous removable disk media such as floppy disks and CD-ROMs along with inexpensive IDE hard disk drives.
  3. The pressure of COBOL standards forced prudent OS vendors to build in index-block support. This is one reason why Indexed-RMS was chosen to be built directly into the first version of VMS in 1977.
  4. In the 1960s and 1970s Edgar F. Codd made huge contributions to the field of relational databases. His employer, IBM, was slow to develop and market Codd's ideas but Larry Ellison of Oracle Corporation was not and so kicked off the age of transactional computing. At this time, Digital Equipment Corporation started work on RDB (relational data base) which first appeared in 1984 for VMS on VAX.
  5. This software evolution continues today with modern databases now being able to store everything from searchable electronic documents, images, music, or anything else you can think of. This new technology is known by many names including "Enterprise Content Management", "Content Management System", etc.
Feature Relational RMS
relational tables? built-in maybe 1
SQL? built-in no 2
can add/drop indexes without changes to the application software? yes no
can modify field sizes and data types (within reason) without changes to the application software? yes no
possible to place all desired constraints (rules) into the database rather than the application software?
(thus protecting the database from access via 3rd party software like ODBC etc.)
yes no
possible to trigger software when just accessing the database?
(thus protecting the database from access via 3rd party software like ODBC etc.)
yes no
can be made transaction safe? yes maybe 3 5
can keep a running log of all "before/after" changes? yes maybe 3 4
maintains a limited online-log of all "before" changes? yes 5 difficult 3
possible to do file maintenance (like rebuilding indexes) on the fly to support a true 7x24 operation? yes 6 no

Subscript Notes:

  1. With software anything is possible. However, relational databases allow relational rules to be built-into the database while ISAM technologies require the accessing application software to support/enforce this. But remember that relational databases offer SQL access for ad-hoc queries. Since a human could potentially do anything he wants, the database is now required to protect itself.
  2. SQL access to RMS is only possible with third-party tools
  3. Almost all corporate financial software of the 1980's used ISAM technology so these features are possible but require a great deal of work. On top of that, all future programmers coming into an existing project need to be as diligent as the original programmers while never making any mistakes. This last statement is possible but only at great expense
  4. The "RMS Journaling" option provides cool logging features but requires a license (RMS is free, RMS Journaling is not)
  5. IIRC, it was possible to make RMS transaction safe but this required another layered product called ACMS (Application Control Monitoring System)
  6. Relational databases are "relational in both time and space". Consider the following example from Oracle 9i
    1. Alice and Bob are bank employees accessing a database consisting of one million accounts.
    2. At 9:00, Alice begins generating a financial report which will take 2 minutes to execute (caveat: must be a read-only select)
    3. At 9:01, Alice's report generator is halfway through the database.
    4. Now, Bob performs a transaction moving $25 from the first account to the last account then commits his changes before Alice's report is finished.
    5. In ISAM technology the $25 would be counted twice in Alice's report. Once on the first record and a second time on the last.
    6. In a relational technology (with transaction support) Alice will not see any of Bob's changes because:
      • all of Bob's before/after information is stored in the rollback segments (UNDO tables) along with the transaction time.
      • When fetching Alice's report data, the engine will use the start time of her transactional query as a key while watching the UNDO tables to ensure she sees the data as it was when she submitted the query at 9:00.
      • It's as if Alice sees a "snapshot" of the whole database taken at 9:00, and "snapshot" is exactly what the file is called in Oracle-Rdb
  7. SQL compliant databases first look at your SQL Statement, then look at the current database structure before building the "execution plan" to carry your desires (experts have told me that there are. on average, 20 different ways to get at your data). If you decide to rebuild an index during an online maintenance operation, the database will produce a different execution plan in order to carry out your request. Access to the data might be a little slower (because the index is unavailable) but it will never be blocked as long as the database is still running. (note that clever forms of index maintenance can even prevent this problem; for example, just create the new index before deleting the old one)
  8. If none of these features matter to you, then stick with RMS-Indexed (ISAM) databases

Oracle-Rdb for OpenVMS

A really neat product which all VMS developers should try at least once.

Oracle Rdb Installation (Quick Use)

Caveat: the following information came from tests on OpenVMS-7.3-2 Alpha. I can only assume it would be the same on OpenVMS-8-4.

$! title  :
$! author : Neil Rieck
$! created: 2004-09-11
$! NSR 051231 tweaked for public display
$       env_verify = f$environment("verify_procedure")  ! remember verify_state
$       set nover                                       ! now force verify: OFF
$       say :== write sys$output                        !
$       ask :== inquire/nopunct                         !
$       bel[0,8]==7                                     !
$       on warn then goto warning_handler               ! don't take any chances
$       set on                                          !
$       say ""                                          !
$       say ""                   !
$       say "======================="                   !
$       temp = f$trnlnm("csmis$dat")                    ! does this logical exist?
$       if temp .eqs. ""                                ! nope
$       then                                            !
$               temp2 = f$environment("DEFAULT")        ! get our current default directory
$               set ver                                 !
$               def/sys/log csmis$dat 'temp2'           ! so we'll create the file in current directory
$               setnover                                !
$       endif                                           !
$       temp = f$search("csmis$dat:rdb_demo1_db.rdb")   !
$       if temp .nes. ""                                !
$       then
$               say "-w- warning: database 'csmis$dat:rdb_demo1_db.rdb' already exists"
$               say "    and continuing will create a new database over the old one"
$               ask choice "Continue? (y/N) "           !
$               choice = f$extract(0,1,choice)          !
$               if choice .nes. "Y" then goto sortie1   ! don't take any chances
$       endif
$       set ver		                                ! watch the SQL$ statements
$sql$                   ! this will only work after "@sys$library:RDBVMS_SETVER.COM reset"
!       WARNING: if the database already exists, this command will create another new one
create database filename csmis$dat:rdb_demo1_db.rdb
        number of users 500             ! number of connections (e.g. 125 users x 4 connections each)
        number of cluster nodes 1;      ! if not in an OpenVMS cluster then set to 1 to improve performance
!       domains can be used to provide a uniform column definition between tables
!       eg. alter table customer add column tel3 standard_tel after column tel2;
create domain   standard_address        char(25);
create domain   standard_city           char(20);
create domain   standard_name           char(30);
create domain   standard_tel            char(10);
create table customer(
        name    char(30),
        address char(25),
        city    char(20),
        tel1    char(10),
        tel2    char(10));
alter table customer add column postal char(6) after column city;
alter table customer add column province char(15) after column city;
insert into customer values(
        'Neil Rieck',
        '20 Water St N',
insert into customer values(
        'Steve Kennel',
        '20 Water St N',
insert into customer values(
        'Dave McNeil',
        '140 Bayfield St',
insert into customer(
        'Karim Macklai',
        '220 Simcoe St',
exit                                    ! exit from SQL$
$sortie1:                               !
$       set nover                       !
$       goto sortie2                    !
$warning_handler:                       !
$error_handler:                         !
$       set noon                        !
$       set nover                       !
$       say "-e- did you execute the script '@sys$library:RDBVMS_SETVER.COM reset' ?"
$sortie2:                               !
$       if env_verify .eqs. "TRUE" then set verify
$       exit                            ! adios

Oracle Rdb Links

"Oracle Database" Links

Note: Be sure not to confuse "Oracle-Rdb" with "Oracle Database" (a.k.a. Oracle 8i, Oracle 9i, Oracle 10g, Oracle 11g, Oracle 12c, ...). They are two different product lines.

Product Note Description
Oracle 8   Just a very cool SQL-compliant database
Oracle 8i i=internet Oracle 8 with added Java support for easy interfacing to the internet (built-in callable Internet package s/w)
Oracle 9i i=internet Oracle 8i with many more features including auto-tuning
Oracle 10g g=grid Oracle 9i with many more features including support for GRID computing
Oracle 11g g=grid Oracle 10g with many more features including automated self-management and testing; XML support; compression
Oracle 12c c=cloud Oracle 11g with extensions for cloud computing

Oracle-Rdb Licensing (as I understand it)

"RMS to Rdb" Migration Tips

Link: Programming examples of how to access 'Oracle Rdb' from 'HP-BASIC for OpenVMS' using SQLMOD

(Recommended) RDB Books

Back to OpenVMS
Back to Home
Neil Rieck
Kitchener - Waterloo - Cambridge, Ontario, Canada.