How To Use the Oracle CDD/Repository Interactive Demo ----------------------------------------------------- 1./ Start demo by typing: @SYS$COMMON:[SYSHLP.EXAMPLES.CDD]CDD_DEMO 2./ Answer the question: "NAME OF THIS WORKSTATION?" with the nodename of the workstation on which you are running the demo. 3./ When a list of features is shown, read it aloud and call attention to the changing screen colors (CDO=blue, SQL=yellow, VMS=green). Each time the screen (and simultaneously the screen color) changes, it indicates that you are now switching from a Repository (CDO) environment to a Database (SQL) environment, and vice versa. This should help the audience to orient themselves as the demo switches between the different activities. 4./ At logical intervals the demo will ask you, if you wish to continue. If you type "N", the demo will finish and delete all traces of work, reposi- tories, databases, files included. Pressing any other key will tell the demo to continue. 5./ At different points during the Demo, you should call attention to the following: a./ DEFINE AND POPULATE FIRST REPOSITORY We are creating the first repository, which is a simplified copy of the "PERSONNEL" database, used often in RDB training. It takes a few minutes to create a repository. The messages should be ignored at this point. The demo is defining (= creating) the repository, and will then, in the empty repository, define fields and records. The records are equivalent with the tables of the database, while the fields are equivalent to the columns in the table. b./ SHOW THAT DIRECTORIES CAN BE VIEWED FROM VMS: At the end of this section, we create a few subdirectories to demon- strate how these directories that were created in the repository by CDO, can be viewed from VMS. c./ CREATE DATABASE (NO AUTOMATIC INTEGRATION FOR THIS ONE): In this section, we'll create the first database, using SQL. Note that we only use this brief SQL command: CREATE DATABASE FILENAME CDD$DATABASE1:B1; This database was not created for automatic integration. All future attempts to integrate data between the repository and this database will have to be done "manually", using the SQL INTEGRATE command. We create two tables: EMPLOYEES and SALARY_HISTORY (equivalent to the record of the repository) and several columns (equivalent to the fields of the repository) and since this is an actual database that contains data, instead of metadata, we insert rows of data into one of the tables. We create two additional tables: JOB_HISTORY and WORK_STATUS. e./ SHOW REPOSITORY BEFORE MANUAL INTEGRATION (EXPECT ERRORS): We'll return to our repository: PERSONNEL and take a look at the tables, (records in repository terms). While we have no difficulty viewing EMPLOYEES, that we created in this repository, we are unable to view the two new tables that were created in the database. Errors are reported. f./ MANUALLY INTEGRATE DATABASE CHANGE WITH REPOSITORY: Back to SQL, we will integrate the database with the repository with this command: INTEGRATE DATABASE FILENAME CDD$DATABASE1:B1 CREATE PATHNAME CDD$REPOSITORY1:B1; g./ SHOW RESULT OF MANUAL INTEGRATION: Once again we try to view the records in the repository. We had difficulties earlier. We have no problems this time! After manual integration, the repository shows the records (tables): JOB_HISTORY, WORK_STATUS that were created in the database. h./ CREATE AND POPULATE SECOND REPOSITORY We are creating a second repository, whose values will be based on the first repository: PERSONNEL. This repository is called: CREDIT_UNION. Note the dependency of the second repository as it's shown by the "SHOW REPOSITORY/FULL" command. Note the difference between the "SHOW REPOSITORY/FULL" and the "SHOW ALL" commands. i./ CREATE DATABASE (FOR AUTOMATIC INTEGRATION): Now we are creating another database, but at creation time we indicate that this database is connected to a certain repository. Note the difference between this database creation and the previous one. CREATE DATABASE FILENAME CDD$DATABASE2:B2 PATHNAME CDD$REPOSITORY2:B2 DICTIONARY IS REQUIRED; The fact that this database is linked to the repository will be clear as soon we create the table: CREDIT_RECORD. Without any specification in SQL, the table will be the exact copy of the record CREDIT_RECORD in the (second) repository: CREDIT_UNION, we created earlier. We also create a new column: CREDIT_RECORD in the table: ELIGIBILITY_DATE, show the altered table with the "SHOW TABLE CREDIT_RECORD" command and exit from SQL. j./ CHECK INTEGRATION IN SECOND REPOSITORY Switched back to the [second] repository: CREDIT_UNION, we now check if automatic integration works. The new column, id. new field (in repository terms): ELIGIBILITY_DATE should show up in the repository. k./ SHOW RESULTS OF CHANGE: Note that the datatypes in the second repository, CDD$REPOSITORY2, are all longwords. These elements were all based on a field: SALARY_AMOUNT, that located in the first repository: CDD$REPOSITORY1. Now we set default to CDD$REPOSITORY1 and change the datatype of SALARY_AMOUNT from longword to byte. This should effect the datatype of the fields in CDD$REPOSITORY2 since those fields were based on SALARY_AMOUNT. Set default to CDD$REPOSITORY2 and note that the datatypes of those fields changed. They are now all bytes instead of longwords. l./ DEFINE, RESERVE AND REPLACE COLLECTIONS: We are creating a partition and a context within that partition. We open the context ("SET CONTEXT...") and create some collections within the context. We reserve the collection and create some fields in the collection. Replace the collections reserved earlier. Now, do a reserve and replace by using the "CLOSURE=TO_BOTTOM" option. Note how each replace creates a new version of the replaced element. m./ CREATE DEPENDENCY WITH COBOL PROGRAM (EXPECT ERROR!): The COBOL compiler creates a dependency. The record: EMPLOYEES can not be deleted. n./ WOULD YOU LIKE TO SEE OUR Oracle CDD/Administrator DEMO? This part of the demo is optional. Any key, but "N" will bring up Oracle CDD/Administrator. It will point to CDD$REPOSITORY1, which is the the PERSONNEL repository. With the "SET DEFAULT" capability however, you can change the default to CDD$REPOSITORY2 (CREDIT_UNION). In either repository, you can view the contents, edit, show graphs, etc. Orientation: On your right is the CONTROL PANEL, on your left is the NAVIGATOR. Suggested steps: Let's take a look at the NAVIGATOR. At this point it should show the contents of the Repository: PERSONNEL and the role: Standard should be in the heading. Choose an element, like: EMPLOYEES, click on it once, then from the View menu, select: Expand. Note how the fields of the EMPLOYEES Record will show up under the record heading. Double click on the icon (of EMPLOYEES), it should collapse. Double click again. It should expand. On the CONTROL PANEL, pull down the Preferences menu. Choose: Set Role. In the Set Role window, select: Repository Administrator. Click on OK. Note that the CONTROL PANEL's Menu Bar is extended to include one more option (Maintenance). In addition, other options are added to the Menu-list of Tools. At this point, the Navigator Panel should also show the change and say: "Repository Administrator". In the Navigator panel, click (1x) on D1, then choose "Expand Recursive" from the View menu. Now let's see the same thing on a graph. Click on EMPLOYEES again and pull down the Tools menu on the CONTROL PANEL. Select the "Dependency Graph". Enlarge the resulting Dependency Graph Display, move the top element boxes around (to the top). Most of the fields, with their version numbers will be visible. Close this window by selecting: "Close" from the File menu. Now, let's take a look at: SALARY_AMOUNT. So many other fields were based on this one. In the NAVIGATOR window, select SALARY_AMOUNT and click on it twice. This will bring up the Editor. Change the datatype of this element again. By using the datatype window, select "signed quadword", then pull down the File menu (in the same window) and select: "Save/Close". The Editor window will disappear. To see the content of another repository, from the Preferences Menu of the CONTROL PANEL, select: "SET DEFAULT". In the resulting Set Default Panel, write in the selection: CDD$REPOSITORY2. In the CONTROL PANEL, pull down the Tools menu and select: "Repository Contents". A second NAVIGATOR window should appear, showing the contents of CREDIT_UNION. Click on the second NAVIGATOR window (CDD$REPOSITORY2). In the CONTROL PANEL pull down the File menu and select: "Create Element". In the "Create New Element" window, select: CDD$DATA_ELEMENT and click on "OK". In the resulting Editor window, fill out the name: "CDD_DATE" (be sure to keep the cursor on the name-field while typing), then change the datatype to "DATE". From the File menu, select: "Save/Close". If you select: "Redisplay" from the View menu, you'll see the newly created element showing up on the list. To exit CDDA, in the CONTROL PANEL pull down the File menu and select: "Quit". 6./ If everything ran correctly, the demo should clean up after itself. In other words: nothing should remain in the directory.