Data Management Library Introduction to Data Management Abstract Part Number This manual summarizes the features and capabilities of the Tandem data mangement products for system managers, application and system programmers, analysts, and operators.
Document History Edition Part Number Product Version Operating System Version Date First Edition 15873 C20 GUARDIAN 90 C20 March 1989 New editions incorporate any updates issued since the previous edition. Copyright All rights reserved. No part of this document may be reproduced in any form, including photocopying or translation to another language, without the prior written consent of Tandem Computers Incorporated. Copyright 1989 Tandem Computers Incorporated.
Contents vii Section 1 An Overview of Data Management 1-1 1-3 1-3 1-6 Section 2 Online Transaction Processing Distributed Databases—Massive Storage at Different Sites Relational Databases—Easy and Flexible Data Retrieval The Tandem NonStop Computer Systems Managing Data on the Tandem Systems 2-1 2-2 2-2 2-3 2-4 2-5 2-6 2-7 2-7 2-9 2-9 Section 3 Preface High Volume Throughput for Processing Efficiency Concurrent OLTP for Active Databases Rapid Response Time Specialized Application Modules Load Balanc
Contents Section 4 Managing Records with ENSCRIBE 4-1 4-1 4-2 4-2 4-3 4-4 4-4 4-4 4-4 4-4 4-5 4-5 4-6 4-6 4-6 4-8 4-8 4-9 4-10 4-11 4-11 4-12 4-12 4-12 Section 5 Developing Applications with PATHMAKER 5-1 5-1 5-2 5-2 5-2 5-2 5-3 5-3 5-3 5-3 5-4 5-4 5-5 5-7 5-7 5-7 iv Features Multiple Disk File Structures Multiple-Key Record Access Partitioned Files Audited Files Access Coordination Nowait and Waited I/O Support for Database Development Support for Application Generation Support for Relational Queries
Contents Section 6 Developing Applications with PATHWAY 6-1 6-1 6-6 6-7 6-8 6-9 Section 7 Ensuring Database Consistency with TMF 7-2 7-7 7-8 7-9 7-9 7-11 7-12 7-12 Section 8 Features Application Development Benefits System Management Advantages Relationship to Other Products Developing a PATHWAY Application Managing a PATHWAY Application Features Protection Against Transaction Failures Protection Against System Failures Protection Against Media Failures Concurrency Control Relationship to Other Produc
Contents 3-12 3-13 3-14 3-16 3-18 3-19 3-20 4-3 4-7 5-5 5-6 5-7 5-8 5-10 5-12 5-15 6-2 6-5 6-10 6-12 7-3 7-4 7-5 7-6 7-8 7-10 7-11 8-2 8-5 vi Figure 3-5. Figure 3-6. Figure 3-7. Figure 3-8. Figure 3-9. Figure 3-10. Figure 3-11. Figure 4-1. Figure 4-2. Figure 5-1. Figure 5-2. Figure 5-3. Figure 5-4. Figure 5-5. Figure 5-6. Figure 5-7. Figure 6-1. Figure 6-2. Figure 6-3. Figure 6-4. Figure 7-1. Figure 7-2. Figure 7-3. Figure 7-4. Figure 7-5. Figure 7-6. Figure 7-7. Figure 8-1. Figure 8-2.
Preface This manual introduces the Tandem data management products. These products help you create, manipulate, and maintain information in distributed relational databases.
1 An Overview of Data Management Most information processing systems involve the acquisition, storage, analysis, and retrieval of data. When data processing people talk about the collective control of these tasks, they often use the term data management. On large and sophisticated computer systems, data management programs enable an operator to query, augment, and manipulate large repositories of data.
An Overview of Data Management Figure 1-1. Online Processing and Database NEW CUSTOMERS CREDIT CHECK JONES, JOE ACME, INC. 105 S. MAIN SAN JOSE, CA JONES, JOE ACME, INC. 105 S. MAIN SAN JOSE, CA Credit Inquiry Update Database S8020-001 In this environment, many users manipulate the database simultaneously and any change made to the database by one user is visible to everyone else.
An Overview of Data Management Distributed Databases— Massive Storage at Different Sites A vital feature of modern online transaction processing systems is data distribution. This feature is necessary to accommodate many applications, large numbers of users, and a demand for extensive hardware and software resources. Data distribution is based upon the idea of networks. In a local network of computers, two or more machines at a particular site are connected to permit communication with each other.
An Overview of Data Management Figure 1-2. Network of Systems with a Distributed Database New York San Francisco London Los Angeles Paris S8020-002 Database management systems differ in the way they organize records in the database. The newest database management system, the relational system, organizes records in a tabular format. In this format, each file contains only one kind of record—for instance, only checking account records or only bank employee records.
An Overview of Data Management Figure 1-3. Tabular Structure in a Relational Database Table Employee Adams, Joan Anderson, Samuel Archer, Edward Baker, Susan Belding, Frances Bellamy, Roger Blanchard, Ken Brent, Moris Cash, Roselle Catlett, Mary Chatterly, Irma Clancey, Donald Extension 6277 7728 9962 6301 7544 6276 5760 7872 2798 9874 2267 9230 Office No. Dept. No.
An Overview of Data Management With a relational database, relationships between records (rows) are based on common field values, and aggregate operators direct the system to the desired rows or columns of the table. An application can, for example, request a display showing all salespeople (in the employee table) who have placed orders (in the invoice table) for a part (in the part table).
2 Managing Data on the Tandem Systems Today, many businesses own and operate an online transaction processing (OLTP) facility. At this facility, the database must always accurately reflect the up-to-theminute activities of the business. The survival of many businesses, in fact, depends on their ability to obtain this current information quickly. To provide this capability, the Tandem NonStop computer systems offer the following important features: High-volume throughput.
Managing Data on the Tandem Systems Concurrent OLTP for In an active OLTP system, not only must many transactions take place concurrently, Active Databases but functionally related operations must be interleaved with each other. The Tandem systems make this concurrency possible by providing rapid response at the terminal, specialized application modules called requesters and servers, and the ability to balance the workload between CPUs to achieve the most efficient processing.
Managing Data on the Tandem Systems As an example of such an arrangement, Figure 2-1 shows an application that performs three main functions: checking credit, adding a new order, and updating an existing order. Each of these functions is handled by a corresponding server process that manages the activity on the database. Users request these operations, however, through an order-entry requester process that manages terminal I/O. Figure 2-1.
Managing Data on the Tandem Systems Figure 2-2. Multiple Requesters and Servers Multiple Copies of Server Order Entry (Requester) Credit Check (Server) Credit Check (Server) Add New Order (Server) Order Entry (Requester) Update Order (Server) Database S8020-005 Load Balancing Most system software for the Tandem computers is constructed of small components that can run on any CPU. These components can be added, deleted, or moved about without rewriting any software.
Managing Data on the Tandem Systems For example, you can use the Network Statistics System (NSS) to detect major problems and impediments. NSS monitors and collects performance statistics on all nodes, CPUs, and EXPAND line handlers. Then, you can use the MEASURE system performance measurement tool for more detailed analysis. MEASURE continuously collects statistics on disk drives, files, processes, transactions, and terminals as well as CPUs and line handlers.
Managing Data on the Tandem Systems Database Consistency When you design a database, you establish certain criteria for the relationship for Accurate Data between items in the database. One criterion for a banking application, for instance, is Relationships that an account balance must always equal the credits minus the debits for that account. When the database satisfies the criteria, it is said to be consistent.
Managing Data on the Tandem Systems Location. In conjunction with the EXPAND software, TMF enforces consistency across all nodes of a database spread over a network. TMF guarantees this consistency no matter where a transaction originates or how it is geographically distributed. As an example, a transaction might generate updates to files stored at three different nodes.
Managing Data on the Tandem Systems Figure 2-3. Adding New Applications Tandem System Inventory Control Application Bill-ofMaterials Application Materials Requirement Planning Application S8020-006 You can also easily modify selected portions of an existing process to suit your changing needs, leaving the rest of this process—and other processes—intact.
Managing Data on the Tandem Systems Because devices are treated as files, you can write new programs without regard for the physical location of specific devices or process code to be accessed. As far as your application is concerned, interprocess communication appears identical to I/O with physical devices. Global Databases A growing business often adds geographically dispersed facilities that increase the need for sharing information among computers at several locations.
Managing Data on the Tandem Systems ENSCRIBE database record manager—an alternative to NonStop SQL for highlevel access to records in a database, used with these allied products: Data Definition Language (DDL)—a language for defining records and data items for ENSCRIBE files, and for generating messages ENABLE program generator—a tool for generating simple OLTP applications based on ENSCRIBE files ENFORM query language and report writer—an interactive tool for writing queries and generating reports based o
3 Accessing Databases With NonStop SQL On a Tandem computer system, an online transaction processing (OLTP) application is a set of programs that perform OLTP tasks on behalf of the user. An application normally runs in a PATHWAY operating environment, established either through PATHMAKER or through PATHWAY itself. The application consists of requester processes that handle I/O at the terminal or workstation, and server processes that operate on the database. These processes communicate with each other.
Accessing Databases With NonStop SQL Figure 3-1. Tables in a NonStop SQL Database EMPLOYEE Table EMPNUM FNAME 1 23 .. 568 ROGER JERRY .. JESSICA LNAME GREEN HOWARD .. CRINER DEPTNUM 9000 1000 .. 3500 JOBCODE 100 100 .. 300 DEPT Table DEPTNUM DEPTNAME 1000 1500 .. 9000 FINANCE PERSONNEL .. CORPORATE SALARY 175500.00 137000.00 .. 39500.00 JOB Table MGR RPTDEPT 23 213 .. 1 9000 1000 .. 9000 LOCATION CHICAGO CHICAGO .. CHICAGO JOBCODE 100 250 .. 900 JOBDESC MANAGER ASSEMBLER ..
Accessing Databases With NonStop SQL Figure 3-2. A NonStop SQL View DEPT Table EMPLOYEE Table EMPNUM 1 23 29 32 .. 213 234 FNAME ROGER JERRY JANE THOMAS .. ROBERT MARY LNAME GREEN HOWARD RAYMOND RUTLOFF .. WHITE MILLER DEPTNUM 9000 1000 3000 2000 .. 1500 2500 JOBCODE 100 100 100 100 .. 100 100 DEPTNUM 1000 1500 2000 2500 .. 4100 9000 DEPTNAME FINANCE PERSONNEL INVENTORY SHIPPING .. PLANNING CORPORATE MGR 23 213 32 234 .. 87 1 MGRLIST View FNAME JERRY ROBERT THOMAS ..
Accessing Databases With NonStop SQL Processing Speed and Power Unlike most relational database management systems, NonStop SQL is fast and powerful enough to handle large quantities of rapidly changing data. NonStop SQL was specifically designed to manage heavy OLTP demands without sacrificing performance. Many users can update data simultaneously, recording data in the database as it is entered.
Accessing Databases With NonStop SQL Data Security NonStop SQL provides data security by allowing you to specify authorization restrictions on objects in your database. These restrictions ensure that only authorized users can see or change this data. For example, suppose you are a database administrator creating a table that contains data on company personnel.
Accessing Databases With NonStop SQL Special commands that manage concurrent access to the database, maintain the latest statistics about the database, and create constraints, which are rules that apply to data values added to the database Physical database design extensions such as distributed databases, tables audited by TMF and nonaudited tables, specification of blocksize and other physical attributes, and default locking of tables and rows Relationship to Other NonStop SQL is integrated with the GUAR
Accessing Databases With NonStop SQL Key-sequenced tables have rows of variable length. Rows are inserted in the table in order of primary key value. Usually, you define the primary key as a set of one or more columns in the table. Thus, if the primary key in an inventory table is the part number of the item described in a row, the rows would be arranged in order of part number. If there are no suitable columns to use for the primary key, the system defines a special key column for this purpose.
Accessing Databases With NonStop SQL Partitioning a table geographically allows you to place data where it is used most often, optimizing its access to users at that site. Even if a large table fits on a single volume, partitioning it across many disks can improve access efficiency. This distribution supports simultaneous access to different partitions of the same table.
Accessing Databases With NonStop SQL Shorthand views, however, are used strictly for convenience. They are derived from any number of tables or other views, and use the security of the underlying tables or views. You can read the data in a shorthand view, but you cannot update or delete it. Files You can regard a relational database as consisting of two structural levels, as shown in Figure 3-4. The top level includes the tables and views that you access directly through SQL statements.
Accessing Databases With NonStop SQL Figure 3-4. Structural Levels in a Database Logical Level Views Views Tables Physical Level Files S8020-010 NonStop SQL also lets you explicitly request the locking of entire tables or rows within a table. With this feature, you can control the degree to which you protect your data from access by concurrent users. This control, though, is subject to a tradeoff.
Accessing Databases With NonStop SQL Using NonStop SQL NonStop SQL permits you to enter SQL statements through either an interactive or a programmatic interface: The NonStop SQL Conversational Interface (SQLCI) allows you to enter SQL statements directly through your terminal or workstation. Using this interface, you can interactively enter ad hoc queries, generate simple reports, modify data, and test SQL statements—all without writing an application program.
Accessing Databases With NonStop SQL Figure 3-5. Developing Queries and Reports SQLCI SQL SELECT FNAME, LNAME, SID FROM STUDENT WHERE DEPTID = "BUSAD" ; Business Professional Formatted Report ...... ...... ...... ...... ...... ...... Data Dictionary Report Writer OUT_REPORT $S.#LASER ; SET LIST_COUNT 0 ; SELECT FNAME, LNAME, SID FROM STUDENT WHERE DEPTID = "BUSAD" ; REPORT TITLE "Business Administration Students" ; DETAIL FNAME HEADING "Student Name" , LNAME NOHEAD, SID HEADING "ID No.
Accessing Databases With NonStop SQL Figure 3-6. SQLCI Response to an Online Query FNAME _____ LNAME _____ SID ___ Audrey Rodney Robert Carol Stephanie Samuel Douglas Lana April . . . Brown Carey Colvin Dooley Duncan Edison Eliot Fong Fowler . . . 2761 1654 3476 2003 1764 2002 2009 1777 1642 . . . Generating Reports You can use SQLCI to produce reports based on data derived from queries.
Accessing Databases With NonStop SQL Figure 3-7. Output from the Report Writer Business Administration Students Student Name _________________________ ID No. ______ Audrey Rodney Robert Carol Stephanie Samuel Douglas Lana April . . . 2761 1654 3476 2003 1764 2002 2009 1777 1642 . . . Brown Carey Colvin Dooley Duncan Edison Eliot Fong Fowler . . . Modifying Data You can use SQLCI to interactively insert, update, or delete data in the database.
Accessing Databases With NonStop SQL The dictionary is actually composed of individual data catalogs—it is the set of all SQL catalogs in the network. Each catalog is a group of predefined tables—one table for each type of object in the database. Some of these tables provide most of the information you need about your database, while others contain information used only by NonStop SQL.
Accessing Databases With NonStop SQL Figure 3-8. Administering a Database SQLCI SQL DDL CREATE TABLE CUSTOMER (CUSTNAME CHAR (15), ADDRESS CHAR (30)); Database Administrator Dictionary Report Tables Columns .......... .......... .......... .......... .......... .......... Data Dictionary Report Writer OUT_REPORT $S.
Accessing Databases With NonStop SQL 3. Creating any indexes for optimizing object access time, and any views that make it easier to refer to particular data 4. Defining the database security by specifying the owner and type of access allowed for each object, and by defining strategies for backing up the database through the use of TMF When you install NonStop SQL, you create the data dictionary for the database and the first catalog in the dictionary.
Accessing Databases With NonStop SQL In your programs, you often use the same data management statements that business professionals and end users enter from their terminals and workstations when making ad hoc queries or requesting printed reports. In addition, you use statements that control access to tables and views, and other statements that establish and control TMF transactions. Figure 3-9.
Accessing Databases With NonStop SQL Your programs combine statements in a host language (COBOL85, Pascal, or C) with statements in SQL to manage the database. A portion of a program, with COBOL85 as the host language and SQL statements highlighted within the listing, appears in Figure 3-10. In this program, the NonStop SQL statements in the Data Division declare the host variables NEWPRICE and PARTNAME.
Accessing Databases With NonStop SQL Figure 3-11.
Accessing Databases With NonStop SQL Another advantage is automatic recompilation. At runtime, the SQL executor determines whether the object program file is consistent with the latest version of the database dictionary. If the object program file is not consistent, the executor directs the SQL compiler to recompile the program automatically, assuring programmers that their SQL statements always apply to the current database.
4 Managing Records With ENSCRIBE The first generation of database management software from Tandem was based on the ENSCRIBE database record manager and its associated products, the Data Definition Language (DDL), ENABLE program generator, and ENFORM query language. Later, the PATHMAKER online application code generator was added to this group of software products. Today, these products continue to support applications and relational databases at sites throughout the world.
Managing Records With ENSCRIBE Relative files consist of a series of numbered slots. Each slot holds a fixedlength record, and each record’s primary key is the number of the slot (called the record number) that the record occupies. For example, in a relative file containing employee data, if the records for employees 1002, 1003, and 1001 occupy the first, second, and third slots of the file, the primary keys for these three records are 1, 2, and 3, respectively.
Managing Records With ENSCRIBE Figure 4-1. Using Key Values to Locate Records In a key-sequenced file, only one record can have the primary-key value JONES, J. A. in the NAME field. JONES, J. A. MOORE, Q. A. SMITH, S. A. DAYTON, OHIO LOS ANGELES, CA CHICAGO, IL CENTRAL WESTERN CENTRAL Two or more records, however, can have the value CENTRAL in their REGION alternate-key fields.
Managing Records With ENSCRIBE Access Coordination Several processes can have access to one file at the same time. To coordinate simultaneous access, each process must indicate, when opening a file, how it intends to use that file. First, the process indicates the access mode that specifies the kinds of operations that the process will perform: read/write, read-only, or write-only access.
Managing Records With ENSCRIBE Relationship to ENSCRIBE is a mature product that has served many users well. It does not, NonStop SQL however, offer all the state-of-the-art power, flexibility, and convenience of the new NonStop SQL software.
Managing Records With ENSCRIBE Creating and Before a program can access a disk file, you must create that file. At this point, you Accessing specify the name of the file, whether the file is permanent or temporary, and the ENSCRIBE Files structure of the file (key-sequenced, relative, entry-sequenced, or unstructured), among other information. Once your file exists, you can access it through an application program or through ENABLE or ENFORM.
Managing Records With ENSCRIBE Figure 4-2. Using the Data Definition Language (DDL) Dictionary FUP Source Schema DDL Compiler FORTRAN Output Generator Pascal TAL COBOL TACL C >DDL Listing Report DDL S8020-030 2. Compiling the object definitions into internal data description format and adding them to a DDL data dictionary. To do this, you submit these definitions to the DDL compiler from your schema or enter them interactively through your terminal.
Managing Records With ENSCRIBE 4. Generating source code for your programs. In this step, you request the DDL output generator to retrieve the data descriptions from either your source schema or dictionary, translate them into appropriate source code, and write the translated descriptions to an EDIT file. The output generator can produce these descriptions in a variety of programming languages, including C, COBOL 74, COBOL85, FORTRAN, Pascal, TACL, and TAL.
Managing Records With ENSCRIBE When writing applications, remember that calls to ENSCRIBE procedures can coexist in the same program with NonStop SQL statements. This feature gives you great flexibility in developing applications to support your relational database. Developing Simple Using the ENABLE program generator, you can produce simple OLTP applications Applications with based on ENSCRIBE files.
Managing Records With ENSCRIBE Typically, an ENABLE application 1. Presents the application screen, on which the end user fills in the necessary information 2. Accepts a request from the user to insert the entered information in the database; customarily, the user transmits this request by pressing RETURN, ENTER, or a special function key 3. Accesses the database to insert the information 4.
Managing Records With ENSCRIBE Creating an ENABLE Application Once you have created your ENSCRIBE database and its data dictionary through FUP and DDL, as discussed earlier in this section, you can access the database through ENABLE. An ENABLE application can access all types of structured and unstructured ENSCRIBE files. Creating the application generally involves: 1. Supplying specifications that describe the application, plus a request to generate the application, in the form of commands to ENABLE.
Managing Records With ENSCRIBE If you have generated several ENABLE applications, you can integrate them all to run under the control of one PATHMON process. You can arrange for one application to call another. You can arrange to have all terminal I/O handled by one TCP, which uses the object code from any of the applications to send requests to the general server.
5 Developing Applications With PATHMAKER Today, programmers writing OLTP applications are concentrating more and more on the idea of productivity. They want to produce quality software while shortening their development and maintenance timetables. To help them realize this goal, Tandem offers the PATHMAKER online application code generator. PATHMAKER streamlines programming work by guiding you through the development and maintenance processes with a series of menus and data-entry screens.
Developing Applications With PATHMAKER Unified Development Environment PATHMAKER offers a unified environment for developing new PATHWAY applications, and for modifying existing applications previously created by PATHMAKER.
Developing Applications With PATHMAKER Consistent Application Modules PATHMAKER promotes consistency among requesters, servers, and even among different applications, resulting in applications that are easy to use and maintain. To support this standardization, PATHMAKER allows an application developer to create default requesters and servers that function as templates or models that other application developers can copy and modify.
Developing Applications With PATHMAKER Relationship to PATHMAKER generates applications that run in the PATHWAY environment, where Other Products TMF controls the consistency of each transaction and creates audit trails that promote data integrity. Together with the GUARDIAN 90 operating system, PATHWAY supports fault tolerance and transaction recovery during application execution. PATHWAY applications can be developed without PATHMAKER, but the process is longer and less convenient.
Developing Applications With PATHMAKER Application When you begin your development effort, PATHMAKER creates a project, which is a Components framework that allows the application to run under control of the PATHWAY transaction processing system. The PATHWAY environment includes the requesters that manage the terminal interface and the servers that manage the database, both supplied by your application.
Developing Applications With PATHMAKER To create a service, you fill in the necessary information to define your database transactions and then use COBOL statements to implement the balance of the business function. Under your guidance, PATHMAKER packages the services into one or more servers, along with the communication statements that permit the server to interact with the requester, as shown in Figure 5-2. Figure 5-2.
Developing Applications With PATHMAKER Developing a PATHMAKER guides you in developing your applications, leading you step-by-step PATHMAKER through the development process. Nevertheless, you must draw upon your own Application professional skills if you are to produce an effective and useful application. You must design the database, describe that design to PATHMAKER, and describe the activities you want performed on the database.
Developing Applications With PATHMAKER Figure 5-4.
Developing Applications With PATHMAKER As with all major development tasks, you select requester definition through the main menu. You can create a requester by starting from the beginning, filling in the desired information on a requester definition screen as shown in Figure 5-5. Or you can make a new requester that is a copy or modification of some existing requester.
Developing Applications With PATHMAKER Figure 5-5.
Developing Applications With PATHMAKER When it is first presented, the default screen contains the title, the function key assignments, the fields that you have specified as part of the requester context, the headings for those fields, and the video attributes. You can use the Screen Painter to move data fields to different locations on the screen and to add decorations made up of unchanging text characters that you enter from your keyboard.
Developing Applications With PATHMAKER Figure 5-6.
Developing Applications With PATHMAKER PATHMAKER provides all COBOL code needed for your server, except for the Procedure Division and some of the entries in the Working-Storage Section of the Data Division. For those two areas, PATHMAKER furnishes only framework or skeleton code—you must either write the missing code yourself, or use the PATHMAKER general-purpose database server for services that perform standard database functions and require no custom code.
Developing Applications With PATHMAKER Testing the Application When you complete construction of your application, you supply PATHMAKER with information needed to create a PATHWAY environment for testing the application. This information includes CPU assignments, home terminal name, and other data. At this point, you also assign the names of server classes to which your server belongs.
Developing Applications With PATHMAKER Figure 5-7. Screen Produced by Application During Testing O R D E R I N G PAGE 1/1 I N F O R M A T I O N ============================================================================== NAME: Anne STREET: 2749 Baker Street CITY: Santa Clara A. Adams PHONE: 408 - 238 - 5560 STATE: CA ZIP: 95148 ============================================================================== Please enter the model number and quantity desired below.
6 Developing Applications With PATHWAY During the evolution of the Tandem NonStop systems, the mainstay software product for OLTP application development, configuration, execution, and maintenance has been the PATHWAY transaction processing system. PATHWAY furnishes the software needed to support the requester and server modules that make up your applications and the interprocess communication messages by which these modules interact with one another.
Developing Applications With PATHWAY Figure 6-1. Requester and Server in a PATHWAY Application Requester-Server Application Send Requests ••• Display Screens Requester Accept Commands and Data Write Records Server Return Replies Read Records Order Entry Codes Stock Orders Database Terminal Management Database Management 1. Display blank order screen. 2. Accept new order data. 3. Send data to server for verification and totals. 4. Get request message. 5. Get new order number. 6.
Developing Applications With PATHWAY Standardized Applications With PATHWAY, you can standardize your applications by sharing program modules. Different screen programs can use the same server. As an example, applications that need to check a credit file can all use the same credit-check server. Applications can also call the same screen programs. For example, all applications that require the end user to logon can use the same logon requester.
Developing Applications With PATHWAY Automatic Fault Tolerance Working with the GUARDIAN 90 operating system, PATHWAY automatically ensures that applications remain continually available to their end users—you need not write the code that supports this availability. For example, PATHWAY allows both TCPs and server processes to run as NonStop process pairs. In such pairs, a primary process runs in one CPU and a backup process in another CPU.
Developing Applications With PATHWAY Figure 6-2. Feature 1: Programmers design screens. PATHWAY Development and Configuration Tools Processes Supplied by PATHWAY Programs & Data Supplied by User PATHAID Screen Design Format SCREEN COBOL Object Library Feature 2: Programmers write screen programs. SCREEN COBOL Source Code Order Entry Program SCREEN COBOL Compiler Accounts Receivable Program Feature 3: TCPs interpret programs and control user terminals.
Developing Applications With PATHWAY SCUP is a utility program for managing libraries that contain the object code for the screen programs produced by SCREEN COBOL or PATHAID. SCUP is particularly useful when you want to manage multiple versions of object programs. System Management Advantages The modular construction of PATHWAY applications, plus a variety of other features, makes them easy to configure, operate, and maintain.
Developing Applications With PATHWAY Support for Dedicated and Nondedicated Devices The devices and processes that your screen programs control allow users to interact directly or programmatically with your application. Often, the devices are terminals through which the users enter and retrieve transaction data. However, the devices might also be intelligent devices such as personal computers, workstations, point-ofsale devices, or automatic teller machines (ATMs).
Developing Applications With PATHWAY NonStop SQL, for enabling server programs to define and manipulate data structures in an effective and efficient way Data Definition Language (DDL), for defining records and data items in ENSCRIBE databases, and for generating messages INSPECT, for interactively examining and modifying running screen programs and server programs VIEWPOINT, for allowing operators to interact simultaneously with multiple Tandem products through a single convenient interface Developing a
Developing Applications With PATHWAY Managing a PATHWAY Application After you have developed and tested your application modules, you are ready to configure a PATHWAY system to control and run the application. A PATHWAY system consists of processes, definitions, and templates (patterns) for running and controlling the programs that make up your application and the I/O devices used by those programs. These processes, definitions, and templates are known as PATHWAY objects.
Developing Applications With PATHWAY Figure 6-3.
Developing Applications With PATHWAY Depending on the requirements of your application, you might distribute PATHWAY objects over a single Tandem computer system by running different modules on different CPUs. You can distribute PATHWAY functions over different physical or geographical locations by spreading a single PATHWAY system across a network of computer systems, or by configuring two or more PATHWAY systems to communicate across a network, as shown in Figure 6-4.
Developing Applications With PATHWAY Figure 6-4.
Developing Applications With PATHWAY c. Starting your new PATHWAY system. Here, PATHMON starts the PATHMON backup process (if one is requested), and creates the PATHWAY control file that will contain the configuration and control information for all objects in your PATHWAY system. During system configuration, PATHMON continuously updates the control file as object definitions are added, altered, or deleted.
7 Ensuring Database Consistency With TMF To be truly effective, a fault tolerant OLTP system must guarantee database consistency; the system must ensure that the data in your database always corresponds to the real world that the database is intended to reflect. A database is consistent when it satisfies particular criteria that you establish for the relationship between items in the database.
Ensuring Database Consistency With TMF Features TMF offers application developers many powerful features, all of which support the overall goal of fault tolerant protection for your applications and their databases. The main benefits of TMF are outlined as follows. Protection Against Transaction Failures An individual transaction can fail for a variety of reasons.
Ensuring Database Consistency With TMF Figure 7-1. TMF Transaction Backout Database changes associated with transaction are backed out Add new employees Requester Server User Transaction aborts! ACCEPT INPUT . BEGIN TRANSACTION . . SEND REQUEST TO SERVER . . . END TRANSACTION READ REQUEST . . . UPDATE DATABASE . . . REPLY TO REQUEST S8020-021 Audit Trails Transaction backout is made possible by the use of audit trails.
Ensuring Database Consistency With TMF Figure 7-2. TMF Audit Trails Before-images and after-images of records R1, R2, and R3 Server CHANGE RECORDS . . . CHANGE RECORDS . . . CHANGE RECORDS . . . Audit Trails R1 R2 R3 R1 R2 R3 Status information (in monitor or master audit trail) R1 R2 R3 Database Files S8020-022 In the audit trail, the before-image shows the value of each field before the update, while the after-image shows the value of each field following the update.
Ensuring Database Consistency With TMF Figure 7-3. TMF Transaction in a SCREEN COBOL Program IDENTIFICATION DIVISION. ENVIRONMENT DIVISION. SPECIAL-NAMES. ENTER-KEY IS F1, EXIT-KEY IS F16. DATA DIVISION. WORKING-STORAGE SECTION. LINKAGE SECTION. SCREEN SECTION SCREEN MAPPING From DDL From PATHAID PROCEDURE DIVISION. DISPLAY BASE CUSTOMER-ENTRY. ACCEPT CUSTOMER-SCREEN UNTIL ENTER-KEY ESCAPE ON EXIT-KEY, TIMEOUT 600.
Ensuring Database Consistency With TMF Figure 7-4.
Ensuring Database Consistency With TMF Protection Across the Network Together with the EXPAND software, TMF supports consistency across all portions of a database distributed over a network. This consistency prevails no matter where a transaction originates or how it is geographically distributed. As an example, a transaction might produce updates to files stored at three different network nodes.
Ensuring Database Consistency With TMF System failures can also arise from more dramatic circumstances, like fires, floods, and earthquakes that cause total destruction of the system. To recover your database after this kind of calamity, you must use the Remote Duplicate Database Facility (RDF) described in Section 8. Following a system failure, all transactions in progress during the failure, not just a single transaction, must be backed out or redone.
Ensuring Database Consistency With TMF The online dump contains the most recent backup copy of the files in your database. The operator produces these dumps for your archives on a regular basis, by copying the database to tape or an offline disk where it is safe from the effects of any massive failure. The rollforward facility requires the latest dump because any disk failure destroys the current version of the database that would otherwise be used as the starting point for the recovery.
Ensuring Database Consistency With TMF Figure 7-6. TMF Rollforward Online Audit Dump Dumps Audit Trails Rollforward Processes Database Restored to Latest Possible Consistent State Online Dump Online Dump Database Restored to Earlier State S8020-026 The database changes are implemented by the server, at the request of the screen program run by the TCP. The TCP and server cooperate through the use of interprocess messages. But it is TMF that locks the affected records.
Ensuring Database Consistency With TMF Figure 7-7. TMF Record Locking Transaction 1 Records locked for Transaction 1 until it commits or aborts Server Transaction 2 Server Disk Process Audited Files Transaction 3 Server S8020-027 Record locking gives TMF a stable image of each affected record prior to and after the transaction.
Ensuring Database Consistency With TMF Developing an To develop an application for the PATHWAY environment, you typically employ Application with TMF TMF in the following steps: 1. Design your application so that it includes a series of discretely identifiable transactions against your database. 2. Code your application, using SCREEN COBOL for your requesters and another appropriate language for your servers. 3.
8 Protecting Databases With RDF Sometimes, a truly major disaster occurs at a computer site. The disaster might be a fire, an earthquake, flooding from a broken water pipe, or release of a toxic substance that severely damages the computer hardware. Catastrophes like this happen rarely. But when they do, they can take down the entire computer system—and perhaps even destroy all systems at the site, leaving the site with no way to carry on its daily business operations.
Protecting Databases With RDF Figure 8-1. RDF in Operation \NODEA \NODEB TMF Primary Database TMF Audit Trail Audit Trail Buffer RDF RDF Dynamic Extract and Transmit Audit Trail Receive Audit Store Audit for Update Dynamic Database Update Backup Database S8020-028 If the primary system is shut down by a disaster, the backup system becomes the primary processing site for the applications that were using the primary database.
Protecting Databases With RDF Features RDF offers the capabilities, benefits, and features described in the following paragraphs. Complete Backup at the Remote Site Resource for Database Inquiries RDF allows users to maintain a current, complete, online copy of the database at the backup node. Because this online, ready copy can be located far from the primary system, RDF can minimize the effect of widescale disasters.
Protecting Databases With RDF Accessible Operating Information Through RDFCOM and another utility called RDFSCAN, you can access valuable status information. For example, you can find out what portion of the extracted records from the primary database has been transmitted to the backup system. You can determine what portion of the records received on the backup system has been applied to the backup database. Relationship to Other RDF is based upon, and uses, routines that are part of TMF.
Protecting Databases With RDF RDFSCAN allows you to specify: A starting point in the log file to begin scanning The number of records to scan Specific text to search for in the log file RDFSCAN runs interactively from your terminal, and accesses the log file you designate; it does not accept commands from a command file. RDFSCAN, like RDFCOM, contains an online help facility. RDF Processes Figure 8-2.
Protecting Databases With RDF Primary System Processes At the primary site, RDF processes monitor the TMF audit trail files associated with the primary database and extract information from them, filtering out before-images and other irrelevant records. TMF after-images showing the state of the database records after any update are immediately extracted from the audit trail files and sent over a communications line to an RDF process at the backup site.
Glossary Access mode. A specification of the kinds of operations (read/write, read-only, or write-only) that a process can perform against a file, established when the file is opened. Active dictionary. A data dictionary that is always consistent with the current state of the data it defines. NonStop SQL provides an active dictionary, but ENSCRIBE does not. Ad hoc query. A one-time request for data from the database. After-image.
Glossary Autorollback. A rapid recovery mechanism provided by TMF that enables a database to recover from a computer system failure. After the system is restored to operation, the autorollback facility uses TMF audit trails to automatically return the database to its most consistent state following the failure. Backout. A mechanism provided by TMF that protects a database from the effects of individual transaction failures.
Glossary Concurrent access. The ability of two or more processes to gain access to the same data at the same time. Constraint. In NonStop SQL, a data check that helps protect the integrity of information in a table by supporting rules that all the values in particular columns of the table must satisfy. Context.
Glossary Database integrity. Protection of your database against contamination or loss of data caused by a system or disk-drive failure. Many products cooperate to afford this protection, including the GUARDIAN 90 operating system, TMF, the EXPAND data communication software, and RDF. DBA. See Database administrator. DDL.
Glossary ENFORM query language and report writer. An interactive tool for writing queries and generating reports based on data from ENSCRIBE files. ENSCRIBE database record manager. A software product for high-level access to records in a relational database. The basic product in the first generation of database management software from Tandem. This product accesses data on a record-byrecord basis. Entry-sequenced file.
Glossary GUARDIAN 90 operating system. The set of software that oversees system and application program execution on all Tandem NonStop computer systems. Host language. In NonStop SQL, any programming language whose statements can be combined with SQL statements in the same source program. Index. In NonStop SQL, an alternate access path to a table that differs from the inherent access path (or primary key) defined for the table at creation. Also, the file where the index is stored. INSPECT.
Glossary MEASURE system performance measurement tool. A performance analysis tool that collects statistics on CPUs, line handlers, disk drives, terminals, files, processes, and transactions. Multiprocessing. The ability of a computer system to execute programs on more than one CPU simultaneously but independently. Network Statistics System (NSS). A software product that helps you detect major problems and impediments that affect overall system performance. Network-distributed transaction.
Glossary Object. In NonStop SQL, a database entity that is created, manipulated, or dropped by means of SQL statements, and that is described in an SQL catalog. Objects include tables, views, columns, partitions, constraints, indexes, and files. OLTP. Online transaction processing. OLTP application. See Online transaction processing application. Online processing. Interactive processing where many users at terminals all have immediate access to data in a database.
Glossary PATHWAY object. An entity that you can reference and control independently through various commands to PATHWAY; any of the processes, definitions, or templates that collectively make up a PATHWAY system. An object can be a PATHMON, TCP, TERM, PROGRAM, SERVER, or the PATHWAY system itself. PATHWAY programmatic interface. A set of programmatic commands that allow you to write management application programs that communicate directly with PATHMON for configuration and control operations.
Glossary Protection view. In NonStop SQL, a view derived from a single table by taking either a projection of the columns of the table, a selection of the rows in the table, or both. A protection view provides a form of field level security because the view can be secured, updated, and read. PS TEXT EDIT. See TEDIT. Query. Generally, a request for data from the database. In NonStop SQL, the execution of a SELECT statement against a table or view. Query optimization.
Glossary Report. In NonStop SQL, a formatted listing of data retrieved by a query; a highly formatted report can be defined with the SQLCI report writer. In PATHMAKER, a listing of information from a project's catalog or from an application's database; standard reports show such information as object types defined in the catalog, service and server structure, relationships among requesters, and other details. Report writer. In NonStop SQL, the SQLCI component used to produce reports from queries.
Glossary Screen. (1) That part of the terminal on which screen images are displayed. (2) A screen image. (3) In PATHMAKER, the logical screen associated with a requester, corresponding to the SCREEN section of a SCREEN COBOL program unit. The logical screen defines the locations, lengths, and other attributes of fields displayed on the end user's screen. SCREEN COBOL compiler.
Glossary Service. In PATHMAKER, a unit of work to be performed by a server as part of a transaction. A service corresponds to a single SEND operation in a PATHWAY environment. Shorthand view. In NonStop SQL, a view that can be derived from one or more tables or views by joining tables or views, by selecting columns, by projecting rows, or by a combination of these operations; this kind of view can be read but not updated or secured. Simulation.
Glossary System. A computer system that consists of from 2 to 16 processors on a dual communication path (DYNABUS interprocessor bus). A system in a network of systems is also called a node. System failure. The failure of system components (CPUs or buses) to remain online, making the system unusable. Table.
Glossary Transaction. A group of computer operations that reflect a particular commercial interaction. These operations, including the entry of data about the interaction, the processing of that data, and the resulting change in the database, provide a computer model of the real events making up the transaction. A transaction might insert an airline flight reservation record or transfer money from one bank account record to another.
Glossary Waited I/O. The kind of I/O activity where an application process is suspended during reading and writing operations. The process does not resume execution until the I/O operations are completed. Contrast with Nowait I/O.
Index A ABORT-TRANSACTION statement 7-6 Aborted TMF transactions 2-8 Access coordination 3-11, 4-4 Access mode 4-4 Accessing databases with NonStop SQL 3-1 Accessing files 4-10 Active dictionary 3-3 Adding new database applications 2-10 Administering data 3-16 Aggregate operators 1-5 Alternate key 4-2 American National Standards Institute (ANSI) 3-5 Applications adding 2-10 developing with ENABLE 4-11 developing with NonStop SQL 3-20 developing with PATHMAKER 5-1 developing with TMF 7-12 expandability 2-9 s
Index C C programming language 3-22, 4-6 Catalogs 3-17 COBOL 3-22, 4-6 Column, definition of 1-4 Compilers 3-23 Concurrency and TMF 2-7 control of 7-9 Concurrent access and TMF 7-1 Concurrent OLTP 2-2 Consistency database 2-7 Constraints 3-4 D Data catalogs 3-17 consistency 3-5 defining and administering 3-16 forms of representation 1-3 integrity 3-4 loading into files 4-10 modifying 3-16 records 1-3 security 3-5 Data Definition Language (DDL) describing record formats with 4-7 description of 2-13 source s
Index global 1-3, 2-11 integrity 2-6 local 2-9 maintaining 3-19 recovery with RDF 8-2 relational 1-2, 1-3 rows 1-4 structural levels in 3-12 tables 3-7 Database, description of 1-1 Decorations with screen painter 5-12 Describing record formats 4-7 Developing applications with ENABLE 4-11 Developing applications with NonStop SQL 3-20 Devices, treatement by GUARDIAN 90 2-10 Dictionary creating 3-18 maintaining 3-19 Distributed databases 1-3 Distributed storage of data 1-2 Distributed systems, support for 3-4
Index key-sequenced files 4-2 keys 4-2 managing records with 4-1 nowait and waited I/O 4-4 partitioned files 4-3 relationship to other products 4-6 structured files 4-2 support 4-4 unstructured files 4-2 Entry-sequenced files 4-2 Entry-sequenced tables 3-8 Exclusion mode 4-4 EXEC SQL keywords 3-22 EXPAND 2-6, 2-7 network 3-7 Extensions to NonStop SQL 3-6 F Failure and TMF 2-7 Fault tolerance 6-4, 7-1 Fields see Data fields File system and devices 2-10 File system procedures 4-10 File Utility Program (FUP)
Index G Global databases 2-11 Global network 1-3 GUARDIAN 90 operating system and expandability 2-9 and I/O requests 4-1 description of 2-6 with PATHWAY 6-4 H High volume throughput 2-1 I Independent multiprocessing 1-6 Index, description of 3-17 Integrity, database 2-6 International Standards Organization (ISO) 3-5 K Key alternate 4-2 primary 4-2 Key-sequenced files 4-2 Key-sequenced tables 3-8 L Load balancing 2-5 Loading data into files 4-10 Local database 2-9 Local network 1-3 Locally distributed datab
Index Modifying data 3-16 Modules, specialized 2-2 Multiple requesters 2-5 Multiple servers 2-5 Multithreaded processes 2-4 N Network global 1-3 local 1-3 protection 7-7 Network Statistics System (NSS) 2-6 NonStop SQL and EXPAND network 3-7 and files 3-11 and MEASURE 3-7 and PATHMAKER 3-7 and PATHWAY 3-7, 6-8 description of 3-6 distributed relational database management system 2-11 extensions to 3-6 features 3-1 relationship to other products 3-7 NonStop SQL Conversational Interface (SQLCI) 3-13 NonStop SQ
Index PATHAID 2-13, 6-4 PATHCOM 4-13, 6-7 PATHMAKER and NonStop SQL 3-7 and PATHWAY 3-23 and requester screens 3-25 application components 5-5 application operation 5-4 defining services 5-12 defining the database in 5-9 defining the function keys in 5-10 defining the requester in 5-9 description of 2-13 developing applications with 5-1 features 5-1 project 5-5, 5-8 relationship to other products 5-4 requesters and servers 5-5 screen painter 5-11 testing an application 5-15 PATHMON 4-13, 6-9, 6-11 PATHWAY
Index single-threaded 2-4 Processing speed 3-4 PROGRAM 6-9 Programming for a PATHWAY environment 3-23 with NonStop SQL 3-21 Project, PATHMAKER 5-5, 5-8 Protection against media failures 7-8 against system failures 7-7 network 7-7 Protection views 3-5, 3-10 PS TEXT EDIT 4-6 Q Queries developing 3-13 entering 3-14 generating with ENFORM 4-14 R Rapid response time 2-2 RDFCOM utility 8-4 RDFSCAN utility 8-5 Record formats, describing 4-7 Record locking 7-11 Records, managing with ENSCRIBE 4-1 Recovery with RDF
Index primary system processes 8-7 processes 8-6 RDFCOM utility 8-4 RDFSCAN utility 8-5 relationship to other products 8-4 updating modes in 8-4 using 8-7 Remote sites and RDF 8-3 Reports developing 3-13 generating 3-15, 4-14 Requester defining in PATHMAKER 5-9 framework supplied by PATHWAY 6-3 process 2-2 screens 3-25, 5-11 Requester-server relationship 2-4 RESTART-TRANSACTION statement 7-6 Rollforward feature 7-9 Row, definition of 1-4 S Schema, source 4-8 Screen logical 5-5 requester 5-11 SCREEN COBOL 2
Index Standardized applications in PATHWAY 6-3 Structural levels in a database 3-12 Structured Query Language (SQL) 3-5 Subsystem Programmatic Inteface (SPI) 4-7 SURVEYOR performance management tool 2-6 System failures and TMF 7-1 protection against 7-7 T Tables audited 3-10 description of 3-7 entry-sequenced 3-8 key-sequenced 3-8 partitioned 3-8 relative 3-8 Tabular format 1-4 TACL 4-10 TAL 4-10 TEDIT 4-6 TERM 6-9 Terminal Control Process (TCP) 5-5, 6-3 Transaction backout, TMF 7-2 Transaction failures an
Index features 7-2 managing a system with 7-12 network protection 7-7 protection against media failures with 7-8 protection against system failures with 7-7 record locking 7-11 relationship to other products 7-11 RESTART-TRANSACTION statement in 7-6 rollforward feature 7-9 support of PATHWAY 7-4 Transaction processing online 1-1 screen oriented 1-2 Transaction protection 3-5 Transaction, description of 1-1 U Unstructured files 4-2 Updating modes in RDF 8-4 V Video attributes 5-11 Views protection 3-5, 3-10