HP c-tree-SQL ISQL and Tools Manuel d'utilisateur Page 1

Naviguer en ligne ou télécharger Manuel d'utilisateur pour Logiciel HP c-tree-SQL ISQL and Tools. HP c-tree-SQL ISQL and Tools User's Manual Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 99
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 0
ISQL and Tools Reference Guide
For use with c-treeSQL Server
This manual provides reference material for the ISQL interactive SQL utility
and other administrative tools provided in the c-treeSQL environment. It also
includes a tutorial describing how to use the ISQL utility.
Vue de la page 0
1 2 3 4 5 6 ... 98 99

Résumé du contenu

Page 1 - For use with c-treeSQL Server

ISQL and Tools Reference Guide For use with c-treeSQL ServerThis manual provides reference material for the ISQL interactive SQL utility and other adm

Page 2

ISQL and Tools 1-2 FairCom Corporation

Page 3 - Table of Contents

FairCom Corporation 2-1Chapter 2Quick Tour2.1 INTRODUCTORY TUTORIALiSQL_Tutorial1.sqlThis introductory tutorial will rapidly take you through the basi

Page 4 - 4 Data Load Utility: dbload

ISQL and Tools2-2 FairCom Corporation2.1.2 DefineIn this case define consists of the CREATE TABLE statement. This is done in a single iSQL statement i

Page 5

Quick TourFairCom Corporation 2-3VALUES ('1001', '61434', 'CT', '1', 'Michael Jordan', '13 Main

Page 6

ISQL and Tools2-4 FairCom Corporation2.2 RELATIONAL MODEL AND INDEXING TUTORIALiSQL_Tutorial2.sqlThis intermediate tutorial will advance the concepts

Page 7 - Documentation Overview

Quick TourFairCom Corporation 2-5OrderList - A table of records consisting of a list of orders. OrderItem - A table of records consisting of specific

Page 8 - RELATED DOCUMENTATION

ISQL and Tools2-6 FairCom CorporationISQL> CREATE INDEX itemnum ON itemmast (im_itemnum);ISQL> CREATE TABLE custmast ( cm_custnum VARCHAR(5),

Page 9 - Introduction

Quick TourFairCom Corporation 2-7INSERT INTO custmast VALUES ('1000', '92867', 'CA', '1', 'Bryan Willia

Page 10 - 1-2 FairCom Corporation

ISQL and Tools2-8 FairCom Corporation2.2.5 Complete Relational Model and Indexing Tutorial Source CodeComplete source code for the relational model an

Page 11 - Quick Tour

Quick TourFairCom Corporation 2-92.3 LOCKING TUTORIALiSQL_Tutorial3.sqlThis tutorial will introduce the concept of locking. The function-ality for th

Page 12 - Add Records

Copyright © 1992-2004 FairCom Corporation All rights reserved.Portions © 1987-2004 Dharma Systems, Inc. All rights reserved.Eleventh Edition, First pr

Page 13 - Display Records

ISQL and Tools2-10 FairCom Corporation2.3.2 DefineIn this case define consists of the CREATE TABLE statement. This is done in a single iSQL statement

Page 14 - TUTORIAL

Quick TourFairCom Corporation 2-11The first process has the record associated with customer number 1003 locked. Meanwhile the second process has atte

Page 15

ISQL and Tools2-12 FairCom Corporation2.3.5 Complete Locking Tutorial Source CodeComplete source code for the locking tutorial can be found in Appendi

Page 16 - 2.2.3 Manage

Quick TourFairCom Corporation 2-132.4 TRANSACTION PROCESSING TUTORIALiSQL_Tutorial4.sqlThis tutorial will introduce the concept of transaction process

Page 17 - 2.2.4 Done

ISQL and Tools2-14 FairCom CorporationTransactionThese tables consist of a Customer Master table and an Item Master table that support prima-rily stat

Page 18 - Tutorial Source Code

Quick TourFairCom Corporation 2-152.4.3 ManageThis step provides data management functionality for the applica-tion. In this example we will add recor

Page 19 - 2.3 LOCKING TUTORIAL

ISQL and Tools2-16 FairCom CorporationSELECT orderlist.ol_custnum, custmast.cm_custnum FROM orderlist, custmast WHERE orderlist.ol_custnum = cus

Page 20 - 2.3.3 Manage

FairCom Corporation 3-1Chapter 3ISQL Statements3.1 OVERVIEWThis chapter describes only those statements that are specific to ISQL. See the c-treeSQL R

Page 21 - 2.3.4 Done

ISQL and Tools3-2 FairCom CorporationThe file name must be enclosed in doubles quotes, such as:isql -s "test script.sql" testdb -u user_name

Page 22 - Tutorial Source Code"

ISQL StatementsFairCom Corporation 3-33.4 FORMATTING OUTPUT OF ISQL QUERIESFormatting of database query results makes the output of a database query m

Page 23 - 2.4.2 Define

FairCom Corporation iTable

Page 24 - Transaction

ISQL and Tools3-4 FairCom CorporationISQL includes several statements that provide simple formatting of SQL queries. The follow-ing table summarizes t

Page 25 - 2.4.3 Manage

ISQL StatementsFairCom Corporation 3-5All the examples use the same ISQL query. The query retrieves data on outstanding customer orders. The query joi

Page 26 - Source Code

ISQL and Tools3-6 FairCom Corporation3.4.1 Formatting Column Display with the COLUMN StatementYou can specify the width of the display for character c

Page 27 - ISQL Statements

ISQL StatementsFairCom Corporation 3-7Example 3-3: Customizing Format of Numeric Column DisplaysISQL> column order_value format "$99,999,999.

Page 28 - 3.3 STATEMENT HISTORY SUPPORT

ISQL and Tools3-8 FairCom Corporationwhenever the value in the customer_name column changes. In other words, we need to specify a column break on the

Page 29 - FairCom Corporation 3-3

ISQL StatementsFairCom Corporation 3-9The following example also issues two more DISPLAY statements to display the variable val-ues. As before, the DI

Page 30

ISQL and Tools3-10 FairCom CorporationThe TITLE statement lets you specify text that ISQL displays before (TITLE TOP) or after (TITLE BOTTOM) the quer

Page 31

ISQL StatementsFairCom Corporation 3-11 End of Orders Summary Report 23 records selectedISQL> 3.5 T

Page 32

ISQL and Tools3-12 FairCom Corporation<SQL statement> ROLLBACK WORK ;An SQL statement starting immediately after a COMMIT WORK or ROLLBACK WORK

Page 33

ISQL StatementsFairCom Corporation 3-13insert into stores values (1001,chassis);insert into stores values (1002,chips);select * from stores where item

Page 34

ii FairCom Corporation3.5 The HELP and TABLE Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-113.6 Transa

Page 35

ISQL and Tools3-14 FairCom CorporationSKIP nThe optional SKIP clause can be used to skip the specified number of lines when the specified break occurs

Page 36

ISQL StatementsFairCom Corporation 3-15ISQL> select customer_name from customers; CUSTOMER_NAME ---------

Page 37 - 3.6 TRANSACTION SUPPORT

ISQL and Tools3-16 FairCom Corporation | BREAK | COLUMN | COMPUTE | DISPLAY | TITLEDescriptionThe CLEAR statement removes set

Page 38 - 3.7 ISQL REFERENCE

ISQL StatementsFairCom Corporation 3-17DescriptionThe COLUMN statement controls how ISQL displays a column's values (the FORMAT clause) and speci

Page 39 - Arguments

ISQL and Tools3-18 FairCom Corporation(a) Format String DetailsTable 3-3: Numeric Format Strings for the COLUMN StatementCharacter Example Descriptio

Page 40 - Examples

ISQL StatementsFairCom Corporation 3-19ExamplesThe following examples are based on a table, orders, with columns defined as follows:ISQL> table ord

Page 41 - 3.7.3 CLEAR

ISQL and Tools3-20 FairCom Corporationorder_info CHAR 200order_weight IN

Page 42 - 3.7.4 COLUMN

ISQL StatementsFairCom Corporation 3-21 Thursday 1 record selectedISQL> column sysdate format "Month"ISQL> select sysdate from sysc

Page 43

ISQL and Tools3-22 FairCom CorporationCOMPUTE statements have no effect until you issue a BREAK statement with the same break_spec. Issuing the COMPUT

Page 44 - (a) Format String Details

ISQL StatementsFairCom Corporation 3-233.7.6 DEFINESyntaxDEFINE [ variable_name = value ] ;Description The DEFINE statement defines a variable and ass

Page 45

FairCom Corporation iii5.4

Page 46

ISQL and Tools3-24 FairCom CorporationIssuing the DISPLAY statement without any arguments displays the currently-set DISPLAY specifications, if any.Ar

Page 47 - 3.7.5 COMPUTE

ISQL StatementsFairCom Corporation 3-25ISQL> display col 5 "Number of orders placed by", customer_name, "=", n_ord on customer_

Page 48

ISQL and Tools3-26 FairCom Corporationedited. When you exit the editor, ISQL writes the buffer contents as the last statement in the history buffer.By

Page 49

ISQL StatementsFairCom Corporation 3-273.7.10 GETSyntaxG[ET] filename;DescriptionThe GET statement reads the first SQL statement stored in the specifi

Page 50

ISQL and Tools3-28 FairCom Corporation ( orders.order_id = lots.order_id ) and ( ( customers.customer_name = 'Ship Shapers Inc.&a

Page 51 - 3.7.8 EDIT

ISQL StatementsFairCom Corporation 3-29CUSTOMER_NAME ORDER_INFO -------------

Page 52 - Related Statements

ISQL and Tools3-30 FairCom CorporationDescriptionThe HISTORY statement lists the statements in the statement history buffer, along with an identifying

Page 53

ISQL StatementsFairCom Corporation 3-313.7.13 HOST or SH or !Syntax{ HOST | SH | ! } [host_command];DescriptionThe HOST statement executes a host oper

Page 54 - 3-28 FairCom Corporation

ISQL and Tools3-32 FairCom Corporation3.7.14 LISTSyntaxL[IST] [ stmt_num ];DescriptionThe LIST statement displays the statement with the specified sta

Page 55

ISQL StatementsFairCom Corporation 3-333.7.15 QUIT or EXITSyntaxQ[UIT] DescriptionThe QUIT statement terminates the current ISQL session.Related State

Page 56

iv FairCom Corporation

Page 57 - 3.7.13 HOST or SH or !

ISQL and Tools3-34 FairCom CorporationOffice Furniture Inc. 10 records selectedISQL> 3.7.17 SAVESyntaxS[AVE] filename;

Page 58 - 3.7.14 LIST

ISQL StatementsFairCom Corporation 3-35 | COMMAND LINES number_lines | REPORT { ON | OFF } | ECHO { ON | OFF } | PAUSE {

Page 59

ISQL and Tools3-36 FairCom CorporationDISPLAY COST ON | OFFSET DISPLAY COST ON displays the values the c-treeSQL optimizer uses to calculate the least

Page 60

ISQL StatementsFairCom Corporation 3-37sys_chkcol_usagesys_keycol_usageHere's a page break! ...ISQL> SET DISPLAY COST ONISQL> -- Select f

Page 61

ISQL and Tools3-38 FairCom Corporation ____________________ EDITOR ... : viHISTORY buffer size ... : 50

Page 62

ISQL StatementsFairCom Corporation 3-39ExampleTo record the displayed output into the file called STK, enter:ISQL> SPOOL STK ON ;ISQL> SELECT *

Page 63 - 3.7.19 SHOW

ISQL and Tools3-40 FairCom CorporationISQL> -- Display a script file with the ! shell statement. The script's SQL ISQL> -- statement uses t

Page 64 - 3.7.20 SPOOL

ISQL StatementsFairCom Corporation 3-41has_ccnstrs NOT NULL VARCHAR 1has_ucnstrs NOT NULL V

Page 65

ISQL and Tools3-42 FairCom Corporationlot_id NOT NULL INT 4purity DO

Page 66 - 3.7.22 TABLE

ISQL StatementsFairCom Corporation 3-43ExamplesThe following example shows the effect of specifying a top title without a bottom title, then both a to

Page 67 - FairCom Corporation 3-41

FairCom Corporation vDocumentation Overview PURPOSE OF THIS MANUALThis manual provides reference material for the ISQL interactive SQL utility as wel

Page 68 - 3.7.23 TITLE

ISQL and Tools3-44 FairCom Corporation

Page 69

FairCom Corporation 4-1Chapter 4Data Load Utility: dbload4.1 INTRODUCTIONThis chapter describes the c-treeSQL database load utility, dbload. This util

Page 70 - 3-44 FairCom Corporation

ISQL and Tools4-2 FairCom CorporationFigure 4-1: dbload Execution Process4.2 PREREQUISITES FOR DBLOADBefore running dbload, you need:• A valid, reada

Page 71 - Data Load Utility: dbload

Data Load Utility: dbloadFairCom Corporation 4-3-l logfileSpecifies the file into which the error logging is done. stderr is the default. dbload also

Page 72 - 4.2 PREREQUISITES FOR DBLOAD

ISQL and Tools4-4 FairCom Corporation4.4.1 Variable Length RecordsFor variable length records, the fields in the data file can be of varying length. U

Page 73 - 4.4 DATA FILE FORMATS

Data Load Utility: dbloadFairCom Corporation 4-54.5.1 The DEFINE RECORD StatementThe DEFINE RECORD statement is used to define the record that is to b

Page 74 - 4.5 THE COMMANDS FILE

ISQL and Tools4-6 FairCom Corporation• start_position is the position where the field starts. It must be an unsigned integer.• end_position is the pos

Page 75

Data Load Utility: dbloadFairCom Corporation 4-7statement. The following example shows the list interchanged with respect to the list in the DEFINE RE

Page 76 - 4.5.2 The FOR EACH Statement

ISQL and Tools4-8 FairCom CorporationThe following is the commands file to load records into the orders table. The input data file is orders_in which

Page 77 - 4.6 EXAMPLES

Data Load Utility: dbloadFairCom Corporation 4-9Position for SHORT not specified correctly.The size of the field (start position to end position) must

Page 78 - 4.7 DBLOAD ERRORS

ISQL and Tools vi FairCom Corporation RELATED DOCUMENTATIONRefer to the following documents for more information:lowercase Lowercase type denotes eith

Page 79 - 4.7.2 Fatal Errors

ISQL and Tools4-10 FairCom Corporation

Page 80 - 4-10 FairCom Corporation

FairCom Corporation 5-1Chapter 5Data Unload Utility: dbdump5.1 INTRODUCTIONThis chapter describes the c-treeSQL database dump utility, dbdump.dbdump

Page 81 - Data Unload Utility: dbdump

ISQL and Tools5-2 FairCom Corporation• SELECT privileges on the tables named in the commands file5.3 DBDUMP COMMAND LINE SYNTAXThe dbdump command acce

Page 82 - 5.5 THE COMMANDS FILE

Data Unload Utility: dbdumpFairCom Corporation 5-3The syntax definition for the commands file is as shown:dbdump_commands: define_record_statement

Page 83

ISQL and Tools5-4 FairCom Corporation• record_length is the length of the fixed length record. This length should include the length of field or recor

Page 84 - 5.6 EXAMPLES

Data Unload Utility: dbdumpFairCom Corporation 5-5 ( no, name, loc ) FIELD DELIMITER ' ' ;FOR RECORD dept_rec DUMP INTO deptrecs_out

Page 85

ISQL and Tools5-6 FairCom Corporation

Page 86 - 5-6 FairCom Corporation

FairCom Corporation 6-1Chapter 6Schema Export Utility: dbschema6.1 INTRODUCTIONThis chapter describes the c-treeSQL utility, dbschema. This utility re

Page 87 - Chapter 6

ISQL and Tools6-2 FairCom Corporationagainst a corresponding user name before it connects to the database. If omitted, the default value depends on th

Page 88 - 6.2 EXAMPLES

Schema Export Utility: dbschemaFairCom Corporation 6-3ADMIN@isis% dbschema -t dbp1,test_view rdsdbDBSCHEMAcreate table ADMIN.dbp1 ( c1 int

Page 89

FairCom Corporation 1-1Chapter 1Introduction1.1 OVERVIEWInteractive SQL (often referred to throughout this manual as ISQL) is a utility supplied with

Page 90 - 6-4 FairCom Corporation

ISQL and Tools6-4 FairCom Corporation

Page 91 - Appendix A

FairCom Corporation A-1Appendix ATutorial Source CodeA.1 INTRODUCTORY TUTORIALCREATE TABLE CUSTMAST ( cm_custnum VARCHAR(5), cm_zip VARC

Page 92 - A-2 FairCom Corporation

ISQL and ToolsA-2 FairCom Corporation oi_itemnum VARCHAR(6) );CREATE INDEX orderitem ON orderitems (oi_ordernum, oi_seqnumber);CREATE TABLE itemmas

Page 93 - A.3 LOCKING TUTORIAL

Tutorial Source CodeFairCom Corporation A-3COLUMN oi_quantity FORMAT "A10" heading "QTY"COLUMN im_price FORMAT "$99.99"

Page 94 - A-4 FairCom Corporation

ISQL and ToolsA-4 FairCom Corporation im_desc VARCHAR(48));CREATE TABLE custmast ( cm_custnum VARCHAR(5), cm_zip VARCHAR(10), cm_st

Page 95 - FairCom Corporation A-5

Tutorial Source CodeFairCom Corporation A-5ROLLBACK WORK;INSERT INTO orderitems VALUES ('3', 1, 2, '3');INSERT INTO orderitems VA

Page 96 - A-6 FairCom Corporation

ISQL and ToolsA-6 FairCom Corporation

Page 97

FairCom Corporation Index-iIndexSymbols@Execute syntax . . . . . . . . . . . . . . . . . . . . .3-12AAdding titles . . . . . . . . . . . . . . . . .

Page 98

ISQL and ToolsIndex-ii FairCom CorporationFormatting ISQL output . . . . . . . . . . . . . . . . .3-3GGET statement . . . . . . . . . . . . . . . . .

Page 99

IndexIndex-iii FairCom CorporationCOMPUTE . . . . . . . . . . . . . . 3-4, 3-7, 3-21COMPUTE syntax . . . . . . . . . . . . . . . .3-21DEFINE . . .

Commentaires sur ces manuels

Pas de commentaire