Resumo do conteúdo contido na página número 1
J2X0-2273-01EN
SymfoWARE(R)Server
RDB User's Guide: Database Definition
Resumo do conteúdo contido na página número 2
Preface Purpose This manual is a user's guide for SymfoWARE Server RDB. The manual explains how to create and define databases. Intended reader This manual is for users who design and define SymfoWARE/RDB databases. Readers should have the following skills and knowledge: · A general understanding of SymfoWARE/RDB functions and databases · A working knowledge of applications to which SymfoWARE/RDB is applied · The ability to develop application programs using C or COBOL · Working kno
Resumo do conteúdo contido na página número 3
Reading this manual The purpose of this manual is to give readers a basic introduction to databases and their creation to make it easier to use SymfoWARE/RDB. Unless otherwise noted, application programs and SQL statement in this manual are written in C. Title Notation of Related Manual The table below lists the manuals related to this manual and their title notation in this manual. Position of this manual Manual system and position of this manual in the system ii
Resumo do conteúdo contido na página número 4
Besides the preceding manuals, SymfoWARE provides an online manual. Command syntax UNIX The man command is used to display the syntax of RDB commands. For details on the man command, refer to AnswerBook2 of the Reference Manual Collection. The copyright of the online manual is the property of UNIX System Laboratories, Inc. and Fujitsu. Follow the items in the written contract to use the product properly. Windows NT/2000/XP The command syntax is included in the Windows NT/2000/XP o
Resumo do conteúdo contido na página número 5
Windows NT/2000/XP Action in response to displayed messages is included in the Windows NT/2000/XP online help. Related manuals The related manuals are as follows: · Reference Manual Collection of AnswerBook 2 · Fujitsu COBOL User's Guide for Windows · COBOL85 User's Guide · Fujitsu COBOL Language Reference Comments on this manual Products covered by this manual UNIX · SymfoWARE Server Enterprise Edition 5.0 or later · SymfoWARE Server Hot Standby Option 5.0 or later Windows N
Resumo do conteúdo contido na página número 6
July 2002 Microsoft, MS, MS-DOS, Windows, and Windows NT are trademarks or registered trademarks of Microsoft Corporation in the United States and other countries. v
Resumo do conteúdo contido na página número 7
UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Limited. Solaris is a trademark of Sun Microsystems, Inc. in the United States. Lotus is a registered trademark of Lotus Development Corporation. SymfoWARE is a registered trademark of Fujitsu Limited. Other company and product names used in this manual are trademarks or registered trademarks of their respective owners. The symbols of (R) and TM are omitted in this manual.
Resumo do conteúdo contido na página número 8
Chapter 1 SymfoWARE/RDB Overview SymfoWARE/RDB provides functions for creating a database, managing a database, and manipulating database data. Before creating a database, the user must design the database structure and define the database based on this database structure design specifications. Then, the user must generate the database based on this database definition. Database management is required for checking database usage conditions and handling database damage. Structured query lang
Resumo do conteúdo contido na página número 9
[Figure: SymfoWARE/RDB functions configuration] Functions for defining table formats (database definition) To create a database, first define the table formats. 2.2 "Designing a Database," explains the kinds of formats used for tables. RDB commands are used to execute database definitions. For information about how to use actual RDB commands to define a database, see Chapter 2 "Database Creation." Functions for maintaining and managing databases (database management) SymfoWARE/RDB ha
Resumo do conteúdo contido na página número 10
Functions for manipulating tables (table manipulation) Data manipulation SQL statements are used to insert, alter, delete, and reference data in tables. These SQL statements are used within application programs. For information about how to develop application programs that use data manipulation SQL statements, refer to the "RDB User's Guide: Application Program Development." For information about how to use data manipulation SQL statements, refer to the "SQL Beginner's Guide." 1.2 Overview
Resumo do conteúdo contido na página número 11
[Figure: Relationship of logical, storage, and physical structures within databases] 1.2.1 Physical structure The physical structure consists of database spaces. Database space Under UNIX, a database space is defined on a raw device created on a magnetic disk; under Windows NT/2000/XP, a database space is defined in a local file created on a magnetic disk. A SymfoWARE/RDB system enables multiple database spaces to be defined so that the hard disk I-O load balance can be adjusted. In
Resumo do conteúdo contido na página número 12
[Figure: Example of correspondence between schemas and database spaces] Base table A base table consists of columns and rows. Figure: Base table format example is a base table format example. In this figure, one row consists of the data for one product. The data of a single row consists of several columns. A column corresponds to a data item. The data for one product (one row) consists of the four data items (columns): ITMNO, PRODUCT, STOCKQTY, and WHCODE. The base table configuratio
Resumo do conteúdo contido na página número 13
updated. Column constraint: A column constraint defines a constraint condition on table creation. One such condition may be "each row must have a value stored in the relevant column." Another condition may be "more than one row cannot have the same value in the relevant column." Table constraint A table constraint enables the user to define whether or not a constraint is to be applied to a table. Such a constraint may be "more than one row cannot have the same values in one or more column
Resumo do conteúdo contido na página número 14
index for each column of a table. Multiple columns also can be combined and specified as a single index. Searching a column for which no index has been created is less efficient than searching a column having an index. Thus, an index must be created for a column used as a data search key. However, whenever an index is created, additional database capacity is required for the storage. Carefully consider the space required for each index when determining the size of a database space. Although
Resumo do conteúdo contido na página número 15
1.2.3 Storage structure The storage structure consists of DSOs and DSIs. DSO A DSO defines the storage structure of the data for a base table. The two types of DSOs are as follows: · Table · Index Table DSO A table DSO defines the type of storage structure for storing data, and, if data is subdivided for storage, the subdivision method. Index DSO An index DSO defines how the index is created for the table. DSI A DSI defines an area for storing base table data so that it can be allo
Resumo do conteúdo contido na página número 16
[Figure: Example in which DSOs and DSIs are associated in a 1:n correspondence] As Figure: Storage structure components shows, the four types of storage structures are SEQUENTIAL, RANDOM, OBJECT, and BTREE. The SEQUENTIAL, RANDOM, and OBJECT structures are used as storage structures for tables. The BTREE structure is used as a storage structure for indexes. Each of these storage structures consists of one or more components as shown in Figure: Storage structure components. [Figure: St
Resumo do conteúdo contido na página número 17
[Figure: Example in which a database space is allocated to each component] 10
Resumo do conteúdo contido na página número 18
[Figure: Example of allocating multiple database spaces to increase the size of each compon ent] 1.3 Overview of Database Creation Tasks A SymfoWARE/RDB database can be created in one of the following two ways: · Using RDB commands · Creating a SQL-embedded program 11
Resumo do conteúdo contido na página número 19
Using RDB commands The user can create databases by executing RDB commands at the command prompt of UNIX or Windows NT/2000/XP. The user can define databases by specifying the file containing various SQLs for defining databases and using the rdbddlex command. The user can also create databases by using the rdbsloader command. This method is suitable for operation in which database logical and storage structures are defined in detail. For details of how to create databases by using the RDB
Resumo do conteúdo contido na página número 20
Chapter 2 Database Creation This chapter covers procedures ranging from the design and creation of a SymfoWARE/RDB database to database operation. 2.1 Overview of Tasks From Database Design To Operation 2.2 Designing a Database 2.3 Creating a Database 2.4 Entering a Database Name 2.5 Creating a Database Space 2.6 Defining a Logical Structure 2.7 Defining a Storage Structure 2.8 Applying a Storage Structure Definition 2.9 Simplifying a Storage Structure Definition 2.10 Defining a Temp