HP c-tree-SQL ISQL and Tools Manual de usuario

Busca en linea o descarga Manual de usuario para Software HP c-tree-SQL ISQL and Tools. HP c-tree-SQL ISQL and Tools User's Manual Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 99
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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.
Vista de pagina 0
1 2 3 4 5 6 ... 98 99

Indice de contenidos

Pagina 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

Pagina 2

ISQL and Tools 1-2 FairCom Corporation

Pagina 3 - Table of Contents

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

Pagina 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

Pagina 5

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

Pagina 6

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

Pagina 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

Pagina 8 - RELATED DOCUMENTATION

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

Pagina 9 - Introduction

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

Pagina 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

Pagina 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

Pagina 12 - Add Records

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

Pagina 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

Pagina 14 - TUTORIAL

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

Pagina 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

Pagina 16 - 2.2.3 Manage

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 23 - 2.4.2 Define

FairCom Corporation iTable

Pagina 24 - Transaction

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

Pagina 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

Pagina 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

Pagina 27 - ISQL Statements

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

Pagina 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

Pagina 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

Pagina 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

Pagina 31

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

Pagina 32

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

Pagina 33

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

Pagina 34

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

Pagina 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

Pagina 36

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

Pagina 37 - 3.6 TRANSACTION SUPPORT

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

Pagina 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

Pagina 39 - Arguments

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

Pagina 40 - Examples

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

Pagina 41 - 3.7.3 CLEAR

ISQL and Tools3-20 FairCom Corporationorder_info CHAR 200order_weight IN

Pagina 42 - 3.7.4 COLUMN

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

Pagina 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

Pagina 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

Pagina 45

FairCom Corporation iii5.4

Pagina 46

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

Pagina 47 - 3.7.5 COMPUTE

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

Pagina 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

Pagina 49

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

Pagina 50

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

Pagina 51 - 3.7.8 EDIT

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

Pagina 52 - Related Statements

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

Pagina 53

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

Pagina 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

Pagina 55

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

Pagina 56

iv FairCom Corporation

Pagina 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;

Pagina 58 - 3.7.14 LIST

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

Pagina 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

Pagina 60

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

Pagina 61

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

Pagina 62

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

Pagina 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

Pagina 64 - 3.7.20 SPOOL

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

Pagina 65

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

Pagina 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

Pagina 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

Pagina 68 - 3.7.23 TITLE

ISQL and Tools3-44 FairCom Corporation

Pagina 69

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 75

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

Pagina 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

Pagina 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

Pagina 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

Pagina 79 - 4.7.2 Fatal Errors

ISQL and Tools4-10 FairCom Corporation

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 84 - 5.6 EXAMPLES

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

Pagina 85

ISQL and Tools5-6 FairCom Corporation

Pagina 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

Pagina 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

Pagina 88 - 6.2 EXAMPLES

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

Pagina 89

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

Pagina 90 - 6-4 FairCom Corporation

ISQL and Tools6-4 FairCom Corporation

Pagina 91 - Appendix A

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

Pagina 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

Pagina 93 - A.3 LOCKING TUTORIAL

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

Pagina 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

Pagina 95 - FairCom Corporation A-5

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

Pagina 96 - A-6 FairCom Corporation

ISQL and ToolsA-6 FairCom Corporation

Pagina 97

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

Pagina 98

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

Pagina 99

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

Comentarios a estos manuales

Sin comentarios