Contents

Preface

Introduction

List of Programs

Part I Basics

1 Getting Started

What You Will Need

Programming Conventions

The C Programming Language

2 meTTTa Game Application

C Environment

Main Dialog

Game Strategy

Graphics

Game Support Routines

Text Box 1 - Tic Tac Toe Strategy

Text Box 2 - Computerized Tic Tac Toe

Part II SQL

3 SQL

What is SQL

Essential SQL Statements

Sample Database

Creating a Table

Describing the Structure of a Table

Inserting Data into a Database Table

Selecting Data from a Database Table

Updating Existing Data in a Database Table

Deleting Data from a Database Table

Advanced SQL Queries

Functions

Groups and Counts

Joins

Sub-Queries

Other Advanced SQL Statements

Indexes

Grants

4 Oracle

Components of Oracle

Oracle Hardware Platforms

SQL*Plus

Editing the SQL Buffer

SQL*Plus Command Files

SQL*Forms

Starting SQL*Forms Designer

Choosing the Form and Block

Painting the Form

Specifying Block Options

Generating the Executable Form

Using Your Completed form

SQL*Forms Triggers

Reports

A Simple Report Using SQL*Plus

Oracle RDBMS

The Oracle Database

The Oracle RDBMS Processes

How the Oracle RDBMS Processes an SQL Statement

PL/SQL

5 C Programming with Embedded SQL

What is Embedded SQL

Host Variables

The SQLCA

The INTO Clause

Oracle Pro*C

Creating a Pro*C Program

Precompiling Your Pro*C Program

Compiling Your Pro*C Program

Linking Your Pro*C Program

Running Your Pro*C Program

6 SQL meTTTa Game Application

Pro*C Environment

Main Dialog

Game Strategy

Graphics

Game Support Routines

Database Support Routines

Text Box 3 - Alternate Versions of Tic Tac Toe

Text Box 4 - Machine Learning

Text Box 5 - Fractals

Part III Distributed SQL

7 Client Server Architecture

What is the Client Server Model

Details on Client-Server

Other Architectures

Oracle Corporation Approaches and Products

What is SQL*Net

SQL*Net Protocols

SQL*Net for Banyan VINES

Using SQL*Net

Other Vendors Approaches and Products

Microsoft's Approach

IBM's Systems Application Architecture (SAA)

SQL as a Communications Protocol

8 SQL Server

Dynamic SQL

Oracle's SQLDA

IBM's DB2 SQLDA

Descriptors

Description of SQLSRVR Program

Stored Procedures

Multi-statement Transactions

Server Triggers and Constraints

SQLSRVR Program Listing

9 Data Communications Basics

Introduction to Data Communications

Terminal Emulation

Transferring Files

Distributed Processing

ASCII Encoding

RS232

Error Detection and Correction

Flow Control

What is a Network

Wide Area Networks

Local Area Networks

Open Systems Interconnection (OSI) 7 Layer Model

Application Layer

Presentation Layer

Session Layer

Transport Layer

Network Layer

Data Link Layer

Physical Layer

10 Data Communications for Distributed SQL

Application Layer

LAYER_7 Program Listing

Transport Layer

LAYER_4 Program Listing

Data Link Layer

LAYER_2 Program Listing

LAYR2_PC Program Listing

LAYR2_VX Program Listing

Physical Layer

Queue and Buffer Handling

Q_BUFF Program Listing

11 SQL Precompiler for Client Applications

Description of SQLPCC Program

SQLPCC Program Listing

12 Distributed SQL meTTTa Game Application

Installing the Distributed Application

Creating the Client Executable

PC Configuration Files

PROCOMM PLUS

Crosstalk

Other PC Communications Packages

VAX

Kermit

Oracle on a VAX

VAX C Compiler

VAX Linker with Oracle

Running SQL Server

Data General

MS-DOS PCs as Servers

Using the Distributed Application

Starting Up

Client-Server Interaction

Closing Down

Part IV Beyond Distributed SQL

13 Kermit like Protocols for SQL

14 Distributed SQL Windows

Generic SQL Windows

Customized SQL Windows

15 SQL*Forms Without Oracle

16 Parallel Processing

Part V Appendices

A Program Listing Defines & Declarations

meTTTa Definitions & Declarations

C Header Files

sqlsrvr.h

fproto.h

q_buff.h

sql_comm.h

B Microsoft C Graphics Functions

C ANSI Escape Sequences

Bibliography

Glossary

Index