Ir para a página of
Manuais similares
-
Printer
HP OFFICEJET PRO X551
242 páginas 13.6 mb -
Printer
HP LaserJet 4MV Series
4 páginas 0.3 mb -
Printer
HP LaserJet 2430
252 páginas 3.81 mb -
Printer
HP K550 Series
138 páginas 2.88 mb -
Printer
HP 1160
9 páginas 0.29 mb -
Printer
HP Deskjet 5160
173 páginas -
Printer
HP Deskjet D1560
2 páginas 5.83 mb -
Printer
HP DeskJet 870Cxi
13 páginas
Bom manual de uso
As regras impõem ao revendedor a obrigação de fornecer ao comprador o manual com o produto HP c-tree-SQL ISQL and Tool. A falta de manual ou informações incorretas fornecidas ao consumidor são a base de uma queixa por não conformidade do produto com o contrato. De acordo com a lei, pode anexar o manual em uma outra forma de que em papel, o que é frequentemente utilizado, anexando uma forma gráfica ou manual electrónicoHP c-tree-SQL ISQL and Tool vídeos instrutivos para os usuários. A condição é uma forma legível e compreensível.
O que é a instrução?
A palavra vem do latim "Instructio" ou instruir. Portanto, no manual HP c-tree-SQL ISQL and Tool você pode encontrar uma descrição das fases do processo. O objetivo do manual é instruir, facilitar o arranque, a utilização do equipamento ou a execução de determinadas tarefas. O manual é uma coleção de informações sobre o objeto / serviço, um guia.
Infelizmente, pequenos usuários tomam o tempo para ler o manual HP c-tree-SQL ISQL and Tool, e um bom manual não só permite conhecer uma série de funcionalidades adicionais do dispositivo, mas evita a formação da maioria das falhas.
Então, o que deve conter o manual perfeito?
Primeiro, o manual HP c-tree-SQL ISQL and Tool deve conte:
- dados técnicos do dispositivo HP c-tree-SQL ISQL and Tool
- nome do fabricante e ano de fabricação do dispositivo HP c-tree-SQL ISQL and Tool
- instruções de utilização, regulação e manutenção do dispositivo HP c-tree-SQL ISQL and Tool
- sinais de segurança e certificados que comprovam a conformidade com as normas pertinentes
Por que você não ler manuais?
Normalmente, isso é devido à falta de tempo e à certeza quanto à funcionalidade específica do dispositivo adquirido. Infelizmente, a mesma ligação e o arranque HP c-tree-SQL ISQL and Tool não são suficientes. O manual contém uma série de orientações sobre funcionalidades específicas, a segurança, os métodos de manutenção (mesmo sobre produtos que devem ser usados), possíveis defeitos HP c-tree-SQL ISQL and Tool e formas de resolver problemas comuns durante o uso. No final, no manual podemos encontrar as coordenadas do serviço HP na ausência da eficácia das soluções propostas. Atualmente, muito apreciados são manuais na forma de animações interessantes e vídeos de instrução que de uma forma melhor do que o o folheto falam ao usuário. Este tipo de manual é a chance que o usuário percorrer todo o vídeo instrutivo, sem ignorar especificações e descrições técnicas complicadas HP c-tree-SQL ISQL and Tool, como para a versão papel.
Por que ler manuais?
Primeiro de tudo, contem a resposta sobre a construção, as possibilidades do dispositivo HP c-tree-SQL ISQL and Tool, uso dos acessórios individuais e uma gama de informações para desfrutar plenamente todos os recursos e facilidades.
Após a compra bem sucedida de um equipamento / dispositivo, é bom ter um momento para se familiarizar com cada parte do manual HP c-tree-SQL ISQL and Tool. Atualmente, são cuidadosamente preparados e traduzidos para sejam não só compreensíveis para os usuários, mas para cumprir a sua função básica de informação
Índice do manual
-
Página 1
ISQL and T ools Reference Guide For use with c-treeSQL Server This manual provides refe rence material for the IS QL interactive SQL utility and other administrative tool s provided in th e c-treeSQL enviro nment. It also includes a tutorial describi ng how to use the ISQL utility .[...]
-
Página 2
Copyright © 1992-20 04 FairCo m Corporation All rights reserved. Portions © 1987-20 04 Dharma Systems, Inc. All rights reserved. Eleventh Edition, First printing: September 2003 Information in th is document is subject to change without notice. No part of this publication may be stor ed in a retrieval system, or transmitted in any form or by any [...]
-
Página 3
Fa ir C om Co rp o ra ti o n i T able of Content s Documentation Overv iew Purpose of This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]
-
Página 4
ii FairCom Corporation 3.5 The HELP and T ABLE Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11 3.6 Transaction Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11 3.7 ISQL Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]
-
Página 5
F ai r C o m Co r p o r a ti o n i ii 5.4 Data File Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5- 2 5.5 The Commands File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 5.5.1 The DEFINE RECORD Statement . . . . .[...]
-
Página 6
iv FairCom Corporation[...]
-
Página 7
FairCom Corporation v Document ation Overview PURPOSE OF THIS MANUAL This manual provides reference materi al for th e ISQL interactive SQL utility as well as the dbload , dbdump , and dbschema administrative tools provided in the c-treeSQ L environment. It also includes a tutorial describing how t o use the ISQL ut ility . AUDIENCE The reader of t[...]
-
Página 8
ISQL and Tools vi FairCom Corporation RELATED DOCUMENT ATION Refer to the following docum ents for more infor mati on: lowercase Lowercase type denotes either u ser-supplied elements or n ames of other syntax diagrams. User-supplied elements include names of tables, host- language variables, e xpressions, and l iterals. Syntax diagrams can refe r t[...]
-
Página 9
FairCom Corporation 1-1 Chapter 1 Introduction 1.1 OVERVIEW Interactive SQL (often referred to throughou t this manual as ISQL) is a utility supplied with c- treeSQL that lets you issue SQL statements directly from a term inal and see resul ts displ ayed at the terminal. Y ou can use interactive SQL to: • Learn how SQL statements work • T est a[...]
-
Página 10
ISQL and Tools 1-2 FairCom Corpora tion[...]
-
Página 11
FairCom Corporation 2-1 Chapter 2 Quick T our 2.1 INTRODUCTORY T UTORIAL iSQL_Tutorial1.sql This introductory tutorial will rapi dly tak e you throug h the basic use of the powerful interactive SQL (iSQL) databas e interface. iSQL is a full featured command lin e client side query tool useful for submitting ad hoc SQL statemen ts to a Server . Like[...]
-
Página 12
ISQL and Tools 2-2 FairCom Corpora tion 2.1.2 Define In this case define consists of the CREA TE T ABLE statement. This is done in a single iSQL st atement in which specific fields are defined. Upon successful cr eation of the table, the changes made to the database by this tr ansaction are made permanent by executing the COMMIT WORK stat ement. Th[...]
-
Página 13
Quick Tour FairCom Corporation 2-3 VALUES ('1001', '61434', 'CT', '1', 'Michael Jordan', '13 Main', 'Harford'); ISQL> INSERT INTO CUSTMAST VALUES ('1002', '73677', 'GA', '1', 'Joshua Brown', '4356 Cambridge', 'At[...]
-
Página 14
ISQL and Tools 2-4 FairCom Corpora tion 2.2 RELATIONAL MODE L AND INDEXING TU T O R I A L iSQL_Tutorial2.sql This intermediate tutorial wil l ad vance the concepts introduced in the first tutorial by expanding th e number of tables and buildin g a relational model. This tutorial wi ll walk you through definin g an index for each table, demonstratin[...]
-
Página 15
Quick Tour FairCom Corporation 2-5 OrderList - A table of records consisting of a list of orders. OrderItem - A table of records consisting of sp ecific items associated with an order . ItemMaster - A table of records consisting of information abou t item s. CustomerMaster - A table of records consisting of sp ecific info related to each customer .[...]
-
Página 16
ISQL and Tools 2-6 FairCom Corpora tion ISQL> CREATE INDEX itemnum ON itemmast (im_itemnum); ISQL> CREATE TABLE custmast ( cm_custnum VARCHAR(5), cm_zip VARCHAR(10), cm_state VARCHAR(3), cm_rating VARCHAR(2), cm_name VARCHAR(48), cm_address VARCHAR(48), cm_city VARCHAR(48)); ISQL> CREATE INDEX custnum ON custmast (cm_custnum); ISQL> COM[...]
-
Página 17
Quick Tour FairCom Corporation 2-7 INSERT INTO custmast VALUES ('1000', '92867', 'CA', '1', 'Bryan Williams', '2999 Regency', 'Orange'); INSERT INTO custmast VALUES ('1001', '61434', 'CT', '1', 'Michael Jordan', '13 Main&apos[...]
-
Página 18
ISQL and Tools 2-8 FairCom Corpora tion 2.2.5 Complete Relational Model and Indexing T utorial Source Code Complete source code for the relatio nal model and indexing tut o- rial can b e found in App endix A " Tutorial Source Code " .[...]
-
Página 19
Quick Tour FairCom Corporation 2-9 2.3 LOCKING T UTORIAL iSQL_Tutorial3.sql This tutorial w ill introduce th e concept of locki ng. The functio n- ality for this tutorial focuses on adding records, then updati ng a single record to th e customer master table. From the iSQL utility the script will be parsed and passe d to the server . The script c o[...]
-
Página 20
ISQL and Tools 2-10 FairCom Corporati on 2.3.2 Define In this case define consists of the CREA TE T ABLE statement. This is done in a single iSQL st atement in which specific fields are defined. Upon successful cr eation of the table, the changes made to the database by this tr ansaction are made permanent by executing the COMMIT WORK stat ement. T[...]
-
Página 21
Quick Tour FairCom Corporation 2-11 The first process has the record associated with customer number 1003 locked. Meanwhile the second process has attempted to delete the conten ts of the customer master table and has been blocked when attemp ting to lock the tab le. At th is point both processes are effectively blocked. The first process is hold i[...]
-
Página 22
ISQL and Tools 2-12 FairCom Corporati on 2.3.5 Complete Locking T utorial Source Code Complete source code for the lock ing tutorial can be found in Appendix A " Tutorial Source Code " .[...]
-
Página 23
Quick Tour FairCom Corporation 2-13 2.4 T RANSACTION PROCESSING T UTORIAL iSQL_Tutorial4.sql This tutorial w ill introduce th e concept of trans action processing, based on the relational model of the previou s tu torial. Records will be added to tables orderlist and orderitems as a single transac- tion. T ransacti on processing in iSQ L is hand le[...]
-
Página 24
ISQL and Tools 2-14 FairCom Corporati on T ransaction These tables consist of a Customer Master tabl e and an Item Master table th at support prima- rily static in formation regarding a company's product line and custom er dem ographics. The orderlist and orderitems tables co nsist of dy nam ic information pertinent to day to day sales. This d[...]
-
Página 25
Quick Tour FairCom Corporation 2-15 2.4.3 Manage This step provides data ma nagem ent functionality fo r the applica- tion. In this exampl e we will ad d records to the itemmast and cust- mast tables, intended as static data. Then, sales ord ers will be processed as a transaction and "commited" or "rolled back" depending on the [...]
-
Página 26
ISQL and Tools 2-16 FairCom Corporati on SELECT orderlist.ol_custnum, custmast.cm_custnum FROM orderlist, custmast WHERE orderlist.ol_custnum = custmast.cm_custnum; ROLLBACK WORK; 2.4.4 Done When a client application has completed operations with the server , it must release resources by d isconnecting from the data- base. iSQL is an application th[...]
-
Página 27
FairCom Corporation 3-1 Chapter 3 ISQL S t atement s 3.1 OVERVIEW This chapter describes only thos e statem ents that are specific to ISQL. See the c-tr eeSQL Ref- er ence Guide for detailed reference informatio n on standa rd SQL statements that can be issued in other environments. 3.2 S T ARTING INTERACTIVE SQL Start ISQL by issuing the isql comm[...]
-
Página 28
ISQL and Tools 3-2 FairCom Corpora tion The file name must be enclosed in doubles quotes, such as: isql -s "test script.sql" testdb -u user_name The user name c-treeSQL uses to conn ect to the database specified in the connect_str ing . c- treeSQL verifies the user name against a co rresponding password before it connects to the database.[...]
-
Página 29
ISQL Statements FairCom Corporation 3-3 3.4 FORMATTING OUTPUT OF ISQL QUERIES Formatting of d atabase query results makes the output of a database query m ore presentable and understandable. The formatted output of an ISQL database query can be eith er displayed on the screen, written to a file, or spooled to a printer to produce a hardcopy of the [...]
-
Página 30
ISQL and Tools 3-4 FairCom Corpora tion ISQL includes several statements that provid e simple formatting of SQL queries. The follow- ing table summarizes the ISQL query -formatti ng statements. The rest of this section provides an extended ex ample that illustrates how to use the statements together to impro ve formatting. T able 3-2: ISQL S t atem[...]
-
Página 31
ISQL Statements FairCom Corporation 3-5 All the examples use the same ISQL query . The query retrieves data on outstanding customer orders. The query joins two tables, customers and or ders . The example s for the T ABLE state- ment on Section 3.7.13 " H OST or SH or ! " on page 3-31 show the columns and data types for these sample tables[...]
-
Página 32
ISQL and Tools 3-6 FairCom Corpora tion 3.4.1 Formatting Column Displ ay with the COLUMN St atement Y ou can specify the width of the display for ch aracter columns with th e COLUMN statement's "An" format string. Specify th e form at str ing in the FORMA T clause of the COLUMN state- ment. Y ou need to issue separate COLUMN stat eme[...]
-
Página 33
ISQL Statements FairCom Corporation 3-7 Example 3-3: Customizing Format of Nu meric Column Displays ISQL> column order_value format "$99,999,999.99" ISQL> column; -- Show all the COLUMN statements now in effect: column CUSTOMER_NAME format "A19" heading "CUSTOMER_NAME" column CUSTOMER_CITY format "A19" [...]
-
Página 34
ISQL and Tools 3-8 FairCom Corpora tion whenever the value in the customer_name column changes. In other words, we need to specify a column break on the custo mer_name column. Approach this task in two steps. First, devi se a DISPLA Y statement to display the customer name and confirm that it is disp layi ng correct ly . Then, issue COMPUTE stateme[...]
-
Página 35
ISQL Statements FairCom Corporation 3-9 The following example also issues two more DI SPLA Y statements to display the variable val- ues. As before, the DISPLA Y statements must specify the customer_name break. They also indent their display farther to indicate the rel ationship with the previo usly issued DISPLA Y . As before, this example uses th[...]
-
Página 36
ISQL and Tools 3-10 FairCom Corporati on The TITLE statement lets you sp ecify text that ISQL displays before (TITLE TOP) or after (TITLE BOTT OM) the query results. The title can also be horizontally positione d by specifyin g the keyw ords LEFT , CENTER, or RIGHT ; or by specifying the actual column num ber corresp onding to the required position[...]
-
Página 37
ISQL Statements FairCom Corporation 3-11 End of Orders Summary Report 23 records selected ISQL> 3.5 THE HELP AND T A BLE S T ATEMENTS ISQL supports an on-line help facility that can be invoked by usi ng the HELP statem ent. T yp- ing HELP at the ISQL prompt will display a help file which will list the options accepted by the HELP statement. The [...]
-
Página 38
ISQL and Tools 3-12 FairCom Corporati on <SQL statement> ROLLBACK WORK ; An SQL statement starting immediately af ter a COMMIT WORK or ROLLBACK WORK statement starts a new transaction. 3.7 ISQL REFERENCE This section provides reference materi al for statements specific to ISQL. This section does not include descript ions of stan dard SQL stat[...]
-
Página 39
ISQL Statements FairCom Corporation 3-13 insert into stores values (1001,chassis); insert into stores values (1002,chips); select * from stores where item_no > 1001; set echo off ; T o execute the above statements stored in a file named cmdfile , enter: ISQL> @cmdfile 3.7.2 BREAK Synt ax BREAK [ ON break_spec [ SKIP n ] ] ; break_spec:: { col[...]
-
Página 40
ISQL and Tools 3-14 FairCom Corporati on SKIP n The optional SKIP clause can be used to skip th e specified number of li nes when the specified break occurs and before processing o f any associated DISPLA Y statements. Examples The following examples illustrate how various break set tings and corresponding DISPLA Y statements affect the disp lay of[...]
-
Página 41
ISQL Statements FairCom Corporation 3-15 ISQL> select customer_name from customers; CUSTOMER_NAME ------------- Sports Cars Inc. Break on every row! Mighty Bulldozer Inc. Break on every row! Ship Shapers Inc. Break on every row! . . . ISQL> break on page ISQL> select customer_name from customers; CUSTOMER_NAME ------------- Break on page ([...]
-
Página 42
ISQL and Tools 3-16 FairCom Corporati on | BREAK | COLUMN | COMPUTE | DISPLAY | TITLE Description The CLEAR statement removes settings m ade by the ISQL statemen t corresponding to option. Argument option Which ISQL statement' s settings to clear: • CLEAR HISTOR Y - Clears the IS QL statement history buffer . • CLEAR BREAK - Clears the bre[...]
-
Página 43
ISQL Statements FairCom Corporation 3-17 Description The COLUMN statement controls how ISQL displays a column 's values (the FORMA T clause) and specifies alternative column-h eading text (the HEADING clause). The COLUMN statement without any arguments displays the current column specifications. Argument s column_n ame The name of the column a[...]
-
Página 44
ISQL and Tools 3-18 FairCom Corporati on (a) Format S tring Details T able 3-3: Numeric Format Strings for the COLUMN S t atement Character Example Description 9 99999 Number of 9's specifies width. If the col umn value is too large to display in the specified format, ISQL displays # characters in place of the value. 0 09999 Display leading ze[...]
-
Página 45
ISQL Statements FairCom Corporation 3-19 Examples The following examples are based on a table, or ders , with columns defined as follows: ISQL> table orders COLNAME NULL ? TYPE LENGTH ------- ------ ---- ------ order_id NOT NULL INT 4 customer_id INT 4 steel_type CHAR 20 W The week of month as a 1-digit number (in the range 1-5). DDD The day of [...]
-
Página 46
ISQL and Tools 3-20 FairCom Corporati on order_info CHAR 200 order_weight INT 4 order_value INT 4 order_state CHAR 20 ISQL displays the order_info co lumn, at 200 characters, with lo ts of blank space preceding the values: ISQL> select order_info from orders where order_value < 1000000 ORDER_INFO ---------- Solid Rods 5 in. diameter 1 record [...]
-
Página 47
ISQL Statements FairCom Corporation 3-21 Thursday 1 record selected ISQL> column sysdate format "Month" ISQL> select sysdate from syscalctable SYSDATE ------- May 1 record selected ISQL> column sysdate format "DDth" ISQL> select sysdate from syscalctable SYSDATE ------- 7th 1 record selected Note: If the select-list [...]
-
Página 48
ISQL and Tools 3-22 FairCom Corporati on COMPUTE statements have no ef fect until you issue a BREAK statement with the same br eak_spec . Issuing the COMPUTE statement without any arguments displays the currently-set COM- PUTE specifications, if any . Argument s A VG | MAX | MIN | SUM | COUNT The function to apply to values of column_name . The fun[...]
-
Página 49
ISQL Statements FairCom Corporation 3-23 3.7.6 DEFINE Synt ax DEFINE [ variable_name = value ] ; Description The DEFINE statement defines a variable and assigns an ASCII st rin g value to it. When you refer to the defined variable in DISPLA Y statements, ISQL prints the value. The DEFINE statement is useful if you have scripts with many DISPLA Y st[...]
-
Página 50
ISQL and Tools 3-24 FairCom Corporati on Issuing the DISPLA Y statemen t without any arguments displays the currently-set DISPLA Y specifications, if any . Argument s col_position An optional argument that specifies the horizontal positioning of the associated display value. There are two forms for the ar gument: If the DISPLA Y statement omits co [...]
-
Página 51
ISQL Statements FairCom Corporation 3-25 ISQL> display col 5 "Number of orders placed by", customer_name, "=", n_ord on customer_name ISQL> compute count of order_id in n_ord on customer_name; ISQL> select c.customer_name, o.order_id from customers c, orders o where o.customer_id = c.customer_id; CUSTOMER_NAME ORDER_ID [...]
-
Página 52
ISQL and Tools 3-26 FairCom Corporati on edited. When you exit the editor , ISQL writes the buf fer contents as the last statement in the history buffer . By default, ISQL invokes the vi editor on UNIX and the MS-DOS editor on NT . Y ou can change the default by setting the EDITOR environment variable: • On UNIX, set the environment variab le at [...]
-
Página 53
ISQL Statements FairCom Corporation 3-27 3.7.10 GET Synt ax G[ET] filename; Description The GET statement reads the fi rst SQL statement stored in the specified script file. Argument s filename The name of the script file. IS QL reads the fi le until it encounters a semicolon ( ; ) statement terminator . It ap pends the statement to the history buf[...]
-
Página 54
ISQL and Tools 3-28 FairCom Corporati on ( orders.order_id = lots.order_id ) and ( ( customers.customer_name = 'Ship Shapers Inc.' ) AND ( lot_staging.start_date is not NULL ) AND ( lot_staging.end_date is NULL ) ) ISQL> RUN SELECT customers.customer_name, orders.order_info, orders.order_state, lot_staging.lot_location, lot_staging.sta[...]
-
Página 55
ISQL Statements FairCom Corporation 3-29 CUSTOMER_NAME ORDER_INFO ------------- ---------- ORDER_STATE LOT_LOCATION START_DATE ----------- ------------ ---------- Ship Shapers Inc. I Beams Size 10 Processing Hot Rolling 12/26/1994 1 record selected 3.7.1 1 HELP Synt ax HE[LP] {COMMANDS|CLAUSES}; HE[LP] ; Description The HELP statement displays the [...]
-
Página 56
ISQL and Tools 3-30 FairCom Corporati on Description The HISTOR Y statement lis ts the statements in the statement hi story buffer , along with an identifying number . Notes • ISQL maintains a list of statements typed by the user in the statement history buffer . The SET HISTOR Y statement sets the size of the history buf fer . • The statements[...]
-
Página 57
ISQL Statements FairCom Corporation 3-31 3.7.13 HOST or SH or ! Synt ax { HOST | SH | ! } [host_command]; Description The HOST statement executes a host operat ing system co mmand without termi natin g the cur- rent ISQL session. Argument s HOST | SH | ! Synonyms for directing ISQL to execute an operati ng system com mand. host_command The operatin[...]
-
Página 58
ISQL and Tools 3-32 FairCom Corporati on 3.7.14 LIST Synt a x L[IST] [ stmt_num ]; Description The LIST statement displays th e statement with the specified statement num ber from the state- ment history buffer and makes it the current stat ement by adding it to the end of the history list. If LIST omits st mt_num , it di sp lays the last statem en[...]
-
Página 59
ISQL Statements FairCom Corporation 3-33 3.7.15 QUIT or EXIT Synt ax Q[UIT] Description The QUIT statement terminates the current ISQL session. Related St atement s QUIT and EXIT are synonymous. There is no difference in their ef fect. 3.7.16 RUN Synt ax R[UN] [stmt_num]; Description The RUN statement executes the st atement with the speci fied sta[...]
-
Página 60
ISQL and Tools 3-34 FairCom Corporati on Office Furniture Inc. 10 records selected ISQL> 3.7.17 SA VE Synt a x S[AVE] filename; Description The SA VE statement saves the last statement in the hist ory buffer in filename. The GET and ST AR T statements can then be used to r ead and execute the statement from a file. If filename does not exist, IS[...]
-
Página 61
ISQL Statements FairCom Corporation 3-35 | COMMAND LINES number_lines | REPORT { ON | OFF } | ECHO { ON | OFF } | PAUSE { ON | OFF } | TIME { ON | OFF } | DISPLAY COST { ON | OFF } | AUTOCOMMIT { ON | OFF } | TRANSACTION ISOLATION LEVEL isolation_level | CONNECTION { database_name | DEFAULT } Description The SET statement changes various character [...]
-
Página 62
ISQL and Tools 3-36 FairCom Corporati on DISPLA Y COST ON | OFF SET DISPLA Y COST ON displays the valu es th e c-treeSQL optimizer uses to calculate the least-costly query strategy fo r a particular SQL statement. The UPDA TE ST A TISTICS statem ent updates the values displayed b y SET DISPLA Y COST ON. SET DISPLA Y COST OFF suppresses the display [...]
-
Página 63
ISQL Statements FairCom Corporation 3-37 sys_chkcol_usage sys_keycol_usage Here's a page break! . . . ISQL> SET DISPLAY COST ON ISQL> -- Select from the one-record SYSCALCTABLE table: ISQL> SELECT * FROM SYSCALCTABLE; Estimated Cost Values : ----------------------- COST : 8080 CARDINALITY : 200 TREE SIZE : 3072 FLD --- 100 3.7.19 SHOW[...]
-
Página 64
ISQL and Tools 3-38 FairCom Corporati on ____________________ EDITOR ..................... : vi HISTORY buffer size ........ : 50 PAUSE ..................... : ON COMMAND LINES .............. : 10 TIMEing command execution.. : OFF SPOOLing ................... : ON LINESIZE .................. : 78 REPORTing Facility ......... : ON PAGESIZE .........[...]
-
Página 65
ISQL Statements FairCom Corporation 3-39 Example T o record the displayed output into the file called STK, enter: ISQL> SPOOL STK ON ; ISQL> SELECT * FROM customer ; ISQL> SPOOL OFF ; 3.7.21 ST ART Synt ax ST[ART] filename [ argument ] [ ... ] ; Description The ST AR T statement executes the first SQL stat ement stored in the specified scr[...]
-
Página 66
ISQL and Tools 3-40 FairCom Corporati on ISQL> -- Display a script file with the ! shell statement. The script's SQL ISQL> -- statement uses the LIKE predicate to retrieve customer names ISQL> -- beginning with the string passed as an argument in a START statement: ISQL> ! more start_ex.sql SELECT customer_name FROM customers WHERE[...]
-
Página 67
ISQL Statements FairCom Corporation 3-41 has_ccnstrs NOT NULL VARCHAR 1 has_ucnstrs NOT NULL VARCHAR 1 tbl_status NOT NULL VARCHAR 1 rssid NOT NULL INT 4 The following example uses the table command to detail the struct ure of the tables used in examples throughout this chapter . ISQL> table - List the sample tables TABLENAME --------- customers[...]
-
Página 68
ISQL and Tools 3-42 FairCom Corporati on lot_id NOT NULL INT 4 purity DOUBLE 8 p_deviation DOUBLE 8 strength DOUBLE 8 s_deviation DOUBLE 8 comments CHAR 200 ISQL> table samples COLNAME NULL ? TYPE LENGTH ------- ------ ---- ------ lot_id INT 4 samples INT 4 comments CHAR 200 ISQL> 3.7.23 TITLE Synt a x TITLE [ [ TOP | BOTTOM ] [ [ LEFT | CENT[...]
-
Página 69
ISQL Statements FairCom Corporation 3-43 Examples The following example shows the effect of specifying a top title without a bott om ti tle, then both a top and bottom title. ISQL> TITLE "fred" ISQL> select * from syscalctable; fred FLD --- 100 1 record selected ISQL> TITLE BOTTOM "flintstone" ISQL> select * from sys[...]
-
Página 70
ISQL and Tools 3-44 FairCom Corporati on[...]
-
Página 71
FairCom Corporation 4-1 Chapter 4 Dat a Load Utility: dbload 4.1 INTRODUCTION This chapter describes the c-treeSQL database load utility , dbload . This uti lit y loads records from an input d ata file into tables of a databa se. The format of the data file is specified by a record description given in an input com mands file to dblo ad . Both dblo[...]
-
Página 72
ISQL and Tools 4-2 FairCom Corpora tion Figure 4- 1: dbload Execution Process 4.2 PREREQUISITES FOR DBLOAD Before running dbl oad , you need: • A valid, readable commands file • INSER T privileges on the tables named in the comm ands fil e 4.3 DBLOAD COMMAND LINE SYNT AX The dbload command does not directl y specify an input file, but instead n[...]
-
Página 73
Data Load Utility: dbload FairCom Corporation 4-3 -l logfile Specifies the file into which the error lo gging is done. stderr is the de fault. dbload also writes statistics to the file: • Number of records read • Number of records skipped • Number of records loaded • Number of records rejected -b badfile The file into which the bad rows tha[...]
-
Página 74
ISQL and Tools 4-4 FairCom Corpora tion 4.4.1 V ariable Length Records For variable length records, the fields in th e da ta file can be of varying length. Unless the key- word FIXED is used in the comm ands file, it is assumed that the dbload record processing will be for variable length records. 4.4.2 Fixed Length Records For fixed length records[...]
-
Página 75
Data Load Utility: dbload FairCom Corporation 4-5 4.5.1 The DEFINE RECORD St atement The DEFINE RECORD statement is us ed to define the record that is to be loaded into the data- base. It describes the data found in the data fi le . The following are the definitions that are made known by the DEFINE RECORD statemen t: • Names the record to be loa[...]
-
Página 76
ISQL and Tools 4-6 FairCom Corpora tion • start_position is the positio n where the field starts. It must be an u nsigned integer . • end_position is the positio n where the fiel d en ds. It must be an unsi gned integer . The first position of each record is 1 and not 0. If date and time types are to be inserted they can be specified as charact[...]
-
Página 77
Data Load Utility: dbload FairCom Corporation 4-7 statement. The following example shows the li st interchanged with respect to the list in the DEFINE RECORD statement. DEFINE RECORD dept_rec AS ( dept_no, dept_name, location ) FIELD DELIMITER ' ' ; FOR EACH RECORD dept_rec FROM dept_in INSERT INTO ADMIN.department (loc, no, name) VALUES [...]
-
Página 78
ISQL and Tools 4-8 FairCom Corpora tion The following is the commands f ile to load records into the or ders t able. The input data file is or ders_in which is a binary file in the fixed leng th record format. DEFINE RECORD orders_rec OF FIXED LENGTH 30 AS ( order_no POSITION (1:4) LONG, order_date POSITION (6:16) CHAR, product POSITION (18:25) CHA[...]
-
Página 79
Data Load Utility: dbload FairCom Corporation 4-9 Position for SHORT no t specified corr ectly . The size of the field (start position to end position) must be equa l to th e size of SHOR T . Position for LONG not specified corr ectly . The size of the field (start position to end position ) mu st be equal to the size of LONG . Position for FLOA T [...]
-
Página 80
ISQL and Tools 4-10 FairCom Corporati on[...]
-
Página 81
FairCom Corporation 5-1 Chapter 5 Dat a Unload Utility: dbdump 5.1 INTRODUCTION This chapter describes the c-treeSQL database dump utility , dbdump . dbdump writes the data in a database to a file. The format of the exported data is specified by the record description given in an input com m and file to dbdump . Both dbload and dbdump commands file[...]
-
Página 82
ISQL and Tools 5-2 FairCom Corpora tion • SELECT privileges on the tables named in the commands file 5.3 DBDUMP COMMAND LINE SYNT AX The dbdump command accepts the commands file name, the database name and a c ommand option. Synt a x dbdump -f commands_file [-n] database_name Options -f command s_file Specifies the f ile containing dbdump command[...]
-
Página 83
Data Unload Utility : dbdump FairCom Corporation 5-3 The syntax definition for the commands file is as shown: dbdump_commands: define_record_statement for_record_statement The following is sample commands fil e showin g dum p instructions. DEFINE RECORD ord_rec AS ( ord_no, item_name, date, item_qty ) FIELD DELIMITER ' ' ; FOR RECORD ord_[...]
-
Página 84
ISQL and Tools 5-4 FairCom Corpora tion • r ecor d_length is the length of the fixed length record. This length sh ould include the length of field or record delimiters, i f any . • field_name is the name used to refer to a field in the data file. • delimiter_char is the field delimiter and is a single character . delimiter_char must be spec-[...]
-
Página 85
Data Unload Utility : dbdump FairCom Corporation 5-5 ( no, name, loc ) FIELD DELIMITER ' ' ; FOR RECORD dept_rec DUMP INTO deptrecs_out USING SELECT dept_no , dept_name , location FROM ADMIN.dept ; The following is the commands file to write records from the customer tab le. The output d ata file is cust _out which is a binary file in the[...]
-
Página 86
ISQL and Tools 5-6 FairCom Corpora tion[...]
-
Página 87
FairCom Corporation 6-1 Chapter 6 Schema Export Utility: dbschema 6.1 INTRODUCTION This chapter describes the c-treeSQL utility , dbschem a . This utility recreates specified data- base elements and data. Synt ax dbschema [ -h ] [ -d ] [-u user_name ] [-a password ] [ -o outfile ] [ -p [ user_name.]procedure_name [ , ... ] ] [ -t [ user_name.]table[...]
-
Página 88
ISQL and Tools 6-2 FairCom Corpora tion against a corresponding user name before i t connects to the database. If omitted, the default value depends on the environment. (On UNIX , the value of the DH_P A SSWD env iro nmen t variable specifies the default password.) -o outfil e Redirects the output to the specified file. The default is standard out [...]
-
Página 89
Schema Export Utility: dbschema FairCom Corporation 6-3 ADMIN@isis% dbschema -t dbp1,test_view rdsdb DBSCHEMA create table ADMIN.dbp1 ( c1 integer ) pctfree 20; create view ADMIN.test_view ( fld ) as select * from test_revoke1 ; The following example uses the -p option with the % wildcard character to g enerate definitions for all stored procedures[...]
-
Página 90
ISQL and Tools 6-4 FairCom Corpora tion[...]
-
Página 91
FairCom Corporation A-1 Appendix A T utorial Source Code A.1 INTRODUCTORY T U TORIAL CREATE TABLE CUSTMAST ( cm_custnum VARCHAR(5), cm_zip VARCHAR(10), cm_state VARCHAR(3), cm_rating VARCHAR(2), cm_name VARCHAR(48), cm_address VARCHAR(48), cm_city VARCHAR(48) ); COMMIT WORK; INSERT INTO CUSTMAST VALUES ('1000', '92867', 'CA[...]
-
Página 92
ISQL and Tools A-2 FairCom Corporation oi_itemnum VARCHAR(6) ); CREATE INDEX orderitem ON orderitems (oi_ordernum, oi_seqnumber); CREATE TABLE itemmast ( im_weight INTEGER, im_price MONEY, im_itemnum VARCHAR(6), im_desc VARCHAR(48) ); CREATE INDEX itemnum ON itemmast (im_itemnum); CREATE TABLE custmast ( cm_custnum VARCHAR(5), cm_zip VARCHAR(10), c[...]
-
Página 93
Tutorial Source Code FairCom Corporation A-3 COLUMN oi_quantity FORMAT "A10" heading "QTY" COLUMN im_price FORMAT "$99.99" heading "PRICE" SELECT custmast.cm_name, orderitems.oi_quantity, itemmast.im_price FROM custmast, orderitems, itemmast, orderlist WHERE orderlist.ol_custnum = custmast.cm_custnum AND orde[...]
-
Página 94
ISQL and Tools A-4 FairCom Corporation im_desc VARCHAR(48)); CREATE TABLE custmast ( cm_custnum VARCHAR(5), cm_zip VARCHAR(10), cm_state VARCHAR(3), cm_rating VARCHAR(2), cm_name VARCHAR(48), cm_address VARCHAR(48), cm_city VARCHAR(48)); COMMIT WORK; DELETE FROM orderlist; DELETE FROM orderitems; DELETE FROM itemmast; DELETE FROM custmast; COMMIT W[...]
-
Página 95
Tutorial Source Code FairCom Corporation A-5 ROLLBACK WORK; INSERT INTO orderitems VALUES ('3', 1, 2, '3'); INSERT INTO orderitems VALUES ('3', 2, 3, '99'); INSERT INTO orderlist VALUES ('9/22/2002', '9/26/2002', '3', '1002'); SELECT orderitems.oi_itemnum, itemmast.im_i[...]
-
Página 96
ISQL and Tools A-6 FairCom Corporation[...]
-
Página 97
FairCom Corporation Index-i Index Symbols @Execute syntax . . . . . . . . . . . . . . . . . . . . . 3-12 A Adding titles . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 B Beginning titles . . . . . . . . . . . . . . . . . . . . . . . 3-9 BREAK statement . . . . . . . . . . . . . . . . . . . . . 3-4 BREAK statement syntax . . . . . . . . . .[...]
-
Página 98
ISQL and Tools Index-ii FairCom Corporatio n Formatting ISQL ou tput . . . . . . . . . . . . . . . . . 3 -3 G GET statement . . . . . . . . . . . . . . . . . . . . . . . . 3-3 GET statement syntax . . . . . . . . . . . . . . . . . 3-27 H HELP statement syntax . . . . . . . . . . . . . . . . 3-29 HISTORY statement . . . . . . . . . . . . . . . . . .[...]
-
Página 99
Index Index-iii FairCom Corporation COMPUTE . . . . . . . . . . . . . . 3-4 , 3-7 , 3- 21 COMPUTE syntax . . . . . . . . . . . . . . . . 3-21 DEFINE . . . . . . . . . . . . . . . . . . . . 3-4 , 3-23 DEFINE RECORD . . . . . . . . . . . . . 4-5 , 5-3 DEFINE syntax . . . . . . . . . . . . . . . . . . . 3-23 DISPLAY . . . . . . . . . . . . . . . 3-4 ,[...]