search for books and compare prices
Tables of Contents for Programming Informix SQL/4Gl
Chapter/Section Title
Page #
Page Count
Preface
xv
4
Acknowledgments
xix
 
Chapter 1 Relational Database Design
2
24
What is a Relational Database?
3
1
Elements of a Database: Tables, Columns, and Rows
4
1
Tables
4
1
Columns
4
1
Rows
4
1
Primary Keys
5
1
Foreign Keys
6
1
Types of Relationships
7
3
One-to-One or Zero
7
1
One-to-Many (or Many-to-One)
8
1
Many-to-Many
9
1
What Is Normalization?
10
1
Formal Normalization
10
5
First Normal Form
11
1
Second Normal Form
12
1
Third Normal Form
13
2
Intuitive Normalization
15
4
Indexing Strategies
19
4
Composite Indexes
20
1
Unique Indexes
21
1
Duplicate Indexes
21
1
Shorter Is Better
21
1
Numeric versus Character Indexes
22
1
Clustered Indexes
22
1
Small Tables
22
1
Description of the Sample Database
23
1
Summary
23
3
Chapter 2 The SQL Working Environment
26
22
About Informix's Implementation of SQL
27
1
About DB-Access
27
1
Setting UNIX Environment Variables
28
2
Environment Variables Needed by Informix
30
2
Optional Environment Variables
32
7
Using DB-Access
39
4
DB-Acess Options with Ring Menus
41
1
Getting Around in Informix Ring Menus
42
1
Choosing Options from a List
43
1
Working From the Command Line
43
2
Viewing Error Messages
45
1
Summary
45
3
Chapter 3 Creating the Database
48
50
The Database Administrator
49
1
INFORMIX Database Engines
50
2
Database Statements
52
2
Data Types
54
7
Character and String Data Types
55
1
Numer Data Types
55
2
Date, Time, and Interval Data Types
57
2
Extra data types for INFORMIX-OnLine
59
2
Summary of Data Type Conversions
61
1
Tables
62
13
Creating a New Table
62
9
Changing an Existing Table
71
3
Deleting a Table
74
1
Renaming Tables and Columns
74
1
Privileges
75
8
Granting Database Privileges
75
2
Granting Table Privileges
77
3
Revoking Privileges
80
1
Roles
81
1
Creating Schema Authorization
82
1
Indexes
83
3
Creating the Sample Database
86
2
Viewing the Database
88
3
Summary
91
7
Chapter 4 Maintaining the Database
98
28
Update Statistics
99
3
Checking Database Integrity
102
5
INFORMIX-SE Database Integrity
102
3
INFORMIX-OnLine Database Integrity
105
2
Database Backups
107
4
INFORMIX-SE Backups
108
1
INFORMIX-OnLine Backups
108
3
Logging
111
10
What Is a Transaction?
111
3
Transaction Logging in INFORMIX-SE
114
3
Transaction Logging in INFORMIX-OnLine
117
4
Audit Trails INFORMIX-SE Only
121
2
Summary
123
3
Chapter 5 Data: Adding, Changing, and Deleting
126
26
Insert
127
2
Update
129
2
Delete
131
1
Locking
132
4
Locking a Database
132
1
Locking a Table
133
1
Set Lock Mode
134
1
INFORMIX-OnLine Table Option
135
1
Load and Unload
136
3
Loading Data
136
2
Unloading Data
138
1
dbload
139
6
The Command File
140
3
Examples
143
2
dbexport and dbimport
145
3
dbexport
145
2
dbimport
147
1
Tips for Faster Data Loads
148
1
Summary
149
3
Chapter 6 The Select Statement
152
28
Overview of the Select Statement
153
1
Select
154
2
From
156
1
Where
157
6
Conditional Expressions
158
3
Matches and Like
161
2
Other Conditionals
163
1
Group By
163
2
Having
165
2
Order By
167
2
Into Temp
169
1
Union
170
1
Joins
171
2
Outer Joins
173
3
Output To
176
1
Summary
177
3
Chapter 7 The 4GL Programming Environment
180
16
INFORMIX-4GL Flavors: r4gl and c4gl
181
1
INFORMIX-4GL File Name Suffixes
182
1
Menu Driven Development
183
1
Command Line Development
184
4
Compiling and Running 4GL Code in the Rapid Development System
184
1
Compiling and Running Compiled 4GL Code
185
2
Compiling Informix Screen Forms
187
1
Make Files
188
5
Make Rules
188
1
The Make File
189
4
Prototyping
193
1
Summary
193
3
Chapter 8 4GL Program Structure
196
10
Overview
197
2
Database
199
1
Globals
199
1
Main
200
1
Modules
201
1
Functions
201
2
Exit Program
203
1
Comments
203
1
Summary
204
2
Chapter 9 Data Types and Definitions
206
16
4GL Data Types
207
2
Character and String Data Types
207
1
Numeric Data Types
207
1
Date, Time, and Interval Data Types
208
1
BLOB Data Types
208
1
INFORMIX-4GL Only Data Types and Indirect Typing
208
1
Defining Variables
209
2
Scope of Variables
211
1
Use of Nulls
211
1
Operators in 4GL
212
1
Converting between Data Types
213
4
Character and String Data Types
213
1
Numeric Data Types
214
1
Date, Time, and Interval Data Types
215
2
Formatting Data with the using Clause
217
3
Formatting Dates
217
1
Formatting Numbers
218
2
Summary
320
2
Chapter 10 Menus
222
12
Overview of Menus
223
2
A Simple Ring Menu
225
1
Menu Simplicity and Consistency
226
1
Menu Features
226
7
Command Keys
226
1
Help
227
1
Next Option
227
2
Continue Menu
229
1
Hidden Menu Options
229
1
Hide Option
230
1
Show Option
231
1
Before Menu
232
1
Summary
233
1
Chapter 11 Output and Standard Program Statements
234
16
Overview
235
1
Assignment
235
1
Output
235
6
Display
236
1
Error
237
1
Message
238
1
Prompt
239
1
Sleep
240
1
Conditionals
241
2
If-then-else
241
1
Case
242
1
Looping
243
4
for
244
1
While
245
1
goto-label
246
1
Running UNIX Commands
247
1
Summary
248
2
Chapter 12 Screen Forms
250
26
What Is a Screen Form?
251
1
Screen Form Design
252
1
Screen Form Implementation
253
7
Database
254
1
Screen
254
1
Tables
255
1
Attributes
256
1
Instructions
256
1
Example of an INFORMIX-4GL-Generated Form
257
1
Example of a Modified Generated Form
258
2
Single Record Form
260
1
Multiple Record Form
261
1
Combination Form
262
1
Form Attributes
263
9
upscol
272
1
Summary
273
3
Chapter 13 Adding Forms and Windows & Displaying Data
276
46
Window Handling
277
3
Displaying Forms
280
2
Overview of Display
282
1
Display
282
13
Display Example
283
2
Sample Module
285
10
Display Array
295
11
Display Array Example
297
2
Scroll
299
1
Sample Module
300
6
Display a One-to-Many Relationship
306
13
Summary
319
3
Chapter 14 Setting Options
322
12
Overview of Options
323
1
Output Lines
324
2
Keys
326
1
Help File
327
1
Attributes
328
1
Input Wrap
329
1
Field Order
329
1
Sql Interrupt
330
1
Line or Form Mode
330
1
Example
331
1
Summary
332
2
Chapter 15 Help!
334
6
About Context-Sensitive Help
335
1
Help Files
335
2
mkmessage
337
1
Using Help
337
2
Summary
339
1
Chapter 16 Error Handling
340
10
Defer Interrupt
341
1
Defer Quit
341
1
Whenever
342
2
Error Log
344
2
Sample Main Program and Error Function
346
1
Summary
347
3
Chapter 17 Built-in Functions, Constants, and Variables
350
32
INFORMIX-4GL Functions Called from 4GL
351
23
INFORMIX-4GL Functions Called from C
374
1
INFORMIX-4GL Constants
374
1
INFORMIX-4GL Global Variables
375
3
Summary
378
4
Chapter 18 The Input Statement
382
16
Input Overview
383
3
Editing the Input
386
1
Data Validation
387
3
Adding Changing a Row
390
5
Summary
395
3
Chapter 19 Using SQL in 4GL
398
120
Using Direct SQL in 4GL
399
2
Prepare
401
1
execute
402
1
declare
403
2
foreach
405
1
open
406
3
fetch
409
2
where current of
411
1
put
412
1
flush
413
1
close
413
1
free
414
1
Summary
415
3
Chapter 20 More Sophisticated SQL
518
 
Views
419
2
Synonyms
421
2
Expressions
423
3
Operators
423
2
Columns
425
1
Literal Constants
425
1
Built-in Functions
426
10
Aggregates
436
3
Using Aggregate Functions
438
1
Subqueries
439
4
Subqueries with Relational Operators
439
1
in and not in
440
1
exists and not exists
441
1
all, any, and some
442
1
insert
442
1
update
443
1
delete
443
1
Self-Joins
443
1
Query Optimization
444
3
Set explain on
444
1
Temp Tables
444
1
or versus union
445
1
Indexes
445
1
Forcing Use of Indexes
445
1
Pattern Matching and Substrings
446
1
Subqueries
447
1
INFORMIX-OnLine Topics
447
3
Accessing Tables in Other Databases on the Same INFORMIX-OnLine System
448
1
Isolation Levels
448
2
Summary
450
4
Chapter 21 Stored Procedures and Triggers
454
32
Stored Procedures
455
20
dbinfo
471
1
Sample Stored Procedures
472
2
Privileges
474
1
Changing and Deleting Existing Stored Procedures
474
1
Update Statistics
475
1
Triggers
475
5
Examples
478
1
Looking at Existing Triggers
479
1
Changing and Deleting Existing Stored Procedures
479
1
Summary
480
6
Chapter 22 User-Defined Searches
486
18
Overview
487
1
From the User's Perspective
487
3
Constructing a where Clause
490
3
Construct Features
493
6
Completing the select Statement
499
1
Sample Function
500
1
Summary
501
3
Chapter 23 The Input Array Statement
504
20
Input Array Overview
505
1
4GL Functions
506
3
Editing the Input
509
1
Data Validation
510
4
Sample Function
514
8
Summary
522
2
Chapter 24 Input of a One-to-Many Relationship
524
22
One-to-Many Input Overview
525
1
Sample Module
525
20
Summary
545
1
Chapter 25 Basic Report Writing
546
32
Report Overview
547
1
Getting the Report Data
548
5
Formatting the Report
553
2
Output
555
1
Order by
556
1
Control Blocks
557
5
On every row
562
1
Headers and Footers
562
3
Aggregates
565
1
Grouping
566
3
Final Totals
569
1
Sample Report
570
6
Summary
576
2
Chapter 26 Complex Reports
578
22
Using Temp Tables, Unions, and Other SQL Tricks
579
1
Matrix Reports
579
7
Multi-Part Reports
586
13
Summary
599
1
Chapter 27 The 4GL Debugger
600
28
Overview
601
1
Get Me Started, Quick!
601
2
Environment
603
3
DBSRC
603
1
Debugger Files (.4db)
604
1
fgldb Command Line Options
604
1
Creating a Custom Debugger Runner
605
1
Debugger Commands
606
17
Summary
623
5
Chapter 28 Mixing C and 4GL
628
14
Calling C Functions from 4GL
629
5
Linking Compiled 4GL Code
632
1
Linking Rapid Development System Code
632
2
Calling 4GL Functions from C
634
5
Linking Compiled 4GL Code
637
1
Linking Rapid Development System Code
638
1
Summary
639
3
Appendix A INFORMIX-4GL Functions Called from C
642
20
Appendix B CD Contents and Contributors
662
8
CD Contents
662
3
Software Contributors
665
5
Bibliography and Other Informix Books from Prentice Hall PTR
670
2
Books on Informix
670
1
Informix Manuals
671
1
General Database
671
1
Index
672