Home > Store

Programming Informix SQL/4GL: A Step-By-Step Approach (Bk/CD), 2nd Edition

Register your product to gain access to bonus material or receive a coupon.

Programming Informix SQL/4GL: A Step-By-Step Approach (Bk/CD), 2nd Edition

  • Published Nov 21, 1997 by Pearson.

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 1998
  • Dimensions: 7" x 9-1/4"
  • Pages: 512
  • Edition: 2nd
  • Book
  • ISBN-10: 0-13-675919-X
  • ISBN-13: 978-0-13-675919-5


67591-8

The up-to-date primer for every INFORMIX SQL/4GL database developer! This example-rich primer covers everything you need to know to successfully design, implement, and maintain databases with Informix's version of SQL.

You'll quickly review the basics of database design, with easy-to-understand explanations of normalization, indexing strategies, and more. Then discover the SQL working environment, DB-Access, and the unique capabilities and features of Informix's SQL implementation; and how INFORMIX-SE and INFORMIX-OnLine compare. Walk step by step through creating and maintaining a database, reviewing database statements, data types, insert, update, delete, load/unload, dbexport/dbimport, locking, and select. Then take a close look at the 4GL programming environment, both r4gl and c4gl, including:

  • Program structure
  • Data types and definitions
  • Menus, output, and much more

Programming Informix SQL/4GL presents detailed, end-to-end coverage of screen forms, options, creating context-sensitive help, and error handling. You'll learn how to make the most of advanced Informix capabilities, including user-defined searches, input array statements, complex screen I/O, matrix, and multi-part reporting, stored procedures, and triggers. Discover sophisticated SQL techniques, including views, synonyms, aggregates, subqueries, and query optimization. Learn how and when to mix C with 4GL. This new edition includes a full chapter on the INFORMIX-4GL Interactive Debugger.

If you need an in-depth understanding of the realities of Informix database programming, you don't have to wade through all those huge Informix manuals. All the answers are right here—in Programming Informix SQL/4GL.

Anyone who has used Informix manuals knows their indexes can be difficult to use because there are so many of them and sometimes the references are quite difficult to locate if they are there at all. Programming Informix SQL/4GL includes a comprehensive index making topics easy to find.

Sample Content

Table of Contents



1. Relational Database Design.

What is a Relational Database? Elements of a Database: Tables, Columns, and Rows. Tables. Columns. Rows. Primary Keys. Foreign Keys. Types of Relationships. One-to-One or Zero. One-to-Many (or Many-to-One). Many-to-Many. What Is Normalization? Formal Normalization. First Normal Form. Second Normal Form. Third Normal Form. Intuitive Normalization. Indexing Strategies. Composite Indexes. Unique Indexes. Duplicate Indexes. Shorter Is Better. Numeric versus Character Indexes. Clustered Indexes. Small Tables. Description of the Sample Database. Summary.



2. The SQL Working Environment.

About Informix's Implementation of SQL. About DB-Access. Setting UNIX Environment Variables. Environment Variables Needed by Informix. Optional Environment Variables. Using DB-Access. DB-Access Options with Ring Menus. Getting Around in Informix Ring Menus. Choosing Options from a List. Working From the Command Line. Viewing Error Messages. Summary.



3. Creating the Database.

The Database Administrator. INFORMIX Database Engines. Database Statements. Data Types. Character and String Data Types. Numer Data Types. Date, Time, and Interval Data Types. Extra data types for INFORMIX-OnLine. Summary of Data Type Conversions. Tables. Creating a New Table. Changing an Existing Table. Deleting a Table. Renaming Tables and Columns. Privileges. Granting Database Privileges. Granting Table Privileges. Revoking Privileges. Roles. Creating Schema Authorization. Indexes. Creating the Sample Database. Viewing the Database. Summary.



4. Maintaining the Database.

Update Statistics. Checking Database Integrity. INFORMIX-SE Database Integrity. INFORMIX-OnLine Database Integrity. Database Backups. INFORMIX-SE Backups. INFORMIX-OnLine Backups. Logging. What Is a Transaction? Transaction Logging in INFORMIX-SE. Transaction Logging in INFORMIX-OnLine. Audit Trails-INFORMIX-SE Only. Summary.



5. Data: Adding, Changing, and Deleting.

Insert. Update. Delete. Locking. Locking a Database. Locking a Table. Set Lock Mode. INFORMIX-OnLine Table Option. Load and Unload. Loading Data. Unloading Data. dbload. The Command File. Examples. dbexport and dbimport. dbexport. dbimport. Tips for Faster Data Loads. Summary.



6. The Select Statement.

Overview of the Select Statement. Select. From. Where. Conditional Expressions. Matches and Like. Other Conditionals. Group By. Having. Order By. Into Temp. Union. Joins. Outer Joins. Output To. Summary.



7. The 4GL Programming Environment.

INFORMIX-4GL Flavors: r4gl and c4gl. INFORMIX-4GL File Name Suffixes. Menu Driven Development. Command Line Development. Compiling and Running 4GL Code in the Rapid Development System. Compiling and Running Compiled 4GL Code. Compiling Informix Screen Forms. Make Files. Make Rules. The Make File. Prototyping. Summary.



8. 4GL Program Structure.

Overview. Database. Globals. Main. Modules. Functions. Exit Program. Comments. Summary.



9. Data Types and Definitions.

4GL Data Types. Character and String Data Types. Numeric Data Types. Date, Time, and Interval Data Types. BLOB Data Types. INFORMIX-4GL Only Data Types and Indirect Typing. Defining Variables. Scope of Variables. Use of Nulls. Operators in 4GL. Converting between Data Types. Character and String Data Types. Numeric Data Types. Date, Time, and Interval Data Types. Formatting Data with the using Clause. Formatting Dates. Formatting Numbers. Summary.



10. Menus.

Overview of Menus. A Simple Ring Menu. Menu Simplicity and Consistency. Menu Features. Command Keys. Help. Next Option. Continue Menu. Hidden Menu Options. Hide Option. Show Option. Before Menu. Summary.



11. Output and Standard Program Statements.

Overview. Assignment. Output. Display. Error. Message. Prompt. Sleep. Conditionals. If-then-else. case. Looping. for. while. goto-label. Running UNIX Commands. Summary.



12. Screen Forms.

What Is a Screen Form? Screen Form Design. Screen Form Implementation. Database. Screen. Tables. Attributes. Instructions. Example of an INFORMIX-4GL-Generated Form. Example of a Modified Generated Form. Single Record Form. Multiple Record Form. Combination Form. Form Attributes. upscol. Summary.



13. Adding Forms and Windows & Displaying Data.

Window Handling. Displaying Forms. Overview of Display. Display. Display Example. Sample Module. Display Array. Display Array Example. Scroll. Sample Module. Display a One-to-Many Relationship. Summary.



14. Setting Options.

Overview of Options. Output Lines. Keys. Help File. Attributes. Input Wrap. Field Order. Sql Interrupt. Line or Form Mode. Example. Summary.



15. Help!

About Context-Sensitive Help. Help Files. mkmessage. Using Help. Summary.



16. Error Handling.

Defer Interrupt. Defer Quit. Whenever. Error Log. Sample Main Program and Error Function. Summary.



17. Built-in Functions, Constants, and Variables.

INFORMIX-4GL Functions Called from 4GL. INFORMIX-4GL Functions Called from C. INFORMIX-4GL Constants. INFORMIX-4GL Global Variables. Summary.



18. The Input Statement.

Input Overview. Editing the Input. Data Validation. Adding/Changing a Row. Summary.



19. Using SQL in 4GL.

Using Direct SQL in 4GL. prepare. execute. declare. foreach. open. fetch. where current of. put. flush. close. free. Summary.



20. More Sophisticated SQL.

Views. Synonyms. Expressions. Operators. Columns. Literal Constants. Built-in Functions. Aggregates. Using Aggregate Functions. Subqueries. Subqueries with Relational Operators. in and not in. exists and not exists. all, any, and some. insert. update. delete. Self-Joins. Query Optimization. Set explain on. Temp Tables. or versus union. Indexes. Forcing Use of Indexes. Pattern Matching and Substrings. Subqueries. INFORMIX-OnLine Topics. Accessing Tables in Other Databases on the Same INFORMIX-OnLine System. Isolation Levels. Summary.



21. Stored Procedures and Triggers.

Stored Procedures. dbinfo. Sample Stored Procedures. Privileges. Changing and Deleting Existing Stored Procedures. Update Statistics. Triggers. Examples. Looking at Existing Triggers. Changing and Deleting Existing Stored Procedures. Summary.



22. User-Defined Searches.

Overview. From the User's Perspective. Constructing a where Clause. Construct Features. Completing the select Statement. Sample Function. Summary.



23. The Input Array Statement.

Input Array Overview. 4GL Functions. Editing the Input. Data Validation. Sample Function. Summary.



24. Input of a One-to-Many Relationship.

One-to-Many Input Overview. Sample Module. Summary.



25. Basic Report Writing.

Report Overview. Getting the Report Data. Formatting the Report. Output. Order by. Control Blocks. On every row. Headers and Footers. Aggregates. Grouping. Final Totals. Sample Report. Summary.



26. Complex Reports.

Using Temp Tables, Unions, and Other SQL Tricks. Matrix Reports. Multi-Part Reports. Summary.



27. The 4GL Debugger.

Overview. Get Me Started, Quick! Environment. DBSRC. Debugger Files (.4db). fgldb Command Line Options. Creating a Custom Debugger Runner. Debugger Commands. Summary.



28. Mixing C and 4GL.

Calling C Functions from 4GL. Linking Compiled 4GL Code. Linking Rapid Development System Code. Calling 4GL Functions from C. Linking Compiled 4GL Code. Linking Rapid Development System Code. Summary.



Appendix A. INFORMIX-4GL Functions Called from C.


Appendix B. CD Contents and Contributors.

CD Contents. Software Contributors.



Bibliography and Other Informix Books from Prentice Hall PTR.

Books on Informix. Informix Manuals. General Database.



Index.

Preface

Preface Conventions used in this book.

About This Book.

Are you tired of wading through all those Informix manuals? This book will take you step-by-step from database design to working with Informix's implementation of SQL, and finally, to implementing programs in INFORMIX(-4GL.

  • Topics are discussed in the order in which you will need to know the material.
  • There are plenty of examples.
  • The index is comprehensive.
  • The chapter summaries provide a useful reference.
  • The CD-ROM included with the book includes code examples from this book, and more. The book has been revised and updated to cover the most recent Informix product features, plus a whole new chapter on the INFORMIX-4GL Interactive Debugger.

    This book takes on the broad task of describing how to design and develop a database application using Informix's implementation of SQL and INFORMIX-4GL.
  • The first chapter of the book contains an overview of relational database design.
  • The next few chapters (2-6) show you how to create and maintain an Informix database, and explains the use of all the basic commands in Informix's implementation of SQL.
  • Chapters 9-19 cover basic INFORMIX-4GL in an order designed to get you up and working quickly.
  • Chapter 19 explains how to use Informix's version of SQL in INFORMIX-4GL and is followed by two chapters of advanced SQL topics.
  • The rest of the book includes more advanced INFORMIX-4GL topics, including user defined searches, more complex screen input/output, report writing, the debugger and using INFORMIX-4GL with C.

    Going through this book chapter by chapter will allow you to design, create, maintain, and write applications for your own database system. The subjects are covered in the order in which you will typically need them when building a new system. A comprehensive table of contents and index allow quick reference to specific topics. A summary at the end of each chapter provides a quick reference for all the syntax and information covered in each chapter.

    Please feel free to e-mail any comments about this book to the author, Cathy Kipp (ckipp@verinet.com).

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020