Informix Guide to SQL : Tutorial

Informix Guide to SQL : Tutorial

by Inc. Informix Software, Mary Ludloff, Signe Haugen, Catherine Lyman
     
 

View All Available Formats & Editions

The Informix Guide to SQL: Tutorial, Second Edition is the authoritative, complete tutorial for learning the Informix Implementation of SQL - completely updated for Informix Dynamic Server. 2000 and Informix Enterprise Decision Server. Starting with the simplest SELECT statements, this complete course walks you through everything you need to know to succeed with… See more details below

Overview

The Informix Guide to SQL: Tutorial, Second Edition is the authoritative, complete tutorial for learning the Informix Implementation of SQL - completely updated for Informix Dynamic Server. 2000 and Informix Enterprise Decision Server. Starting with the simplest SELECT statements, this complete course walks you through everything you need to know to succeed with SQL. Learn how to build and optimize queries, both simple and advanced. Use SQL statements to insert, delete, or update data, while you maintain data integrity and security. Learn how to call the database server, retrieve rows, embed data, and create and implement efficient data models, step-by-step.

Product Details

ISBN-13:
9780131003712
Publisher:
Prentice Hall Professional Technical Reference
Publication date:
08/18/1994
Edition description:
Older Edition
Pages:
496
Product dimensions:
7.04(w) x 9.14(h) x 0.81(d)

Read an Excerpt

PREFACE:

Introduction

In This Introduction

This introduction provides an overview of the information in this book and describes the conventions it uses.

About This Book

This book shows how to use basic and advanced structured query language (SQL) to access and manipulate the data in your databases. It discusses the data manipulation language (DML) statements as well as triggers and stored procedure language (SPL) routines, which DML statements often use.

This book is one of a series of books that discusses the Informix implementation of SQL. The Informix Guide to SQL: Reference and Syntax, Second Edition provides reference information for aspects of SQL other than the language statements and contains all the syntax descriptions for SQL and SPL. The Informix Guide to Designing Databases and Data Warehouses shows how to use SQL to implement and manage your databases.

Types of Users

This book is written for the following users:

  • Database users
  • Database administrators
  • Database-application programmers

This book assumes that you have the following background:

  • A working knowledge of your computer, your operating system, and the utilities that your operating system provides
  • Some experience working with relational databases or exposure to database concepts
  • Some experience with computer programming

If you have limited experience with relational databases, SQL, or your operating system, refer to the Getting Started manual for your database server for a list of supplementary titles.

SoftwareDependencies

This book assumes that you are using one of the following database servers:

  • Informix Enterprise Decision Server, Version 8.3
  • Informix Dynamic Server 2000, Version 9.2

Assumptions About Your Locale

Informix products can support many languages, cultures, and code sets. All culture-specific information is brought together in a single environment, called a Global Language Support (GLS) locale.

This book assumes that you use the U.S. 8859-1 English locale as the default locale. The default is en_us.8859-1 (ISO 8859-1) on UNIX platforms or en_us.1252 (Microsoft 1252) for Windows NT environments. This locale supports U.S. English format conventions for dates, times, and currency, and also supports the ISO 8859-1 or Microsoft 1252 code set, which includes the ASCII code set plus many 8-bit characters such as e, e, and n.

If you plan to use nondefault characters in your data or your SQL identifiers, or if you want to conform to the nondefault collation rules of character data, you need to specify the appropriate nondefault locale.

For instructions on how to specify a nondefault locale, additional syntax, and other considerations related to GLS locales, see the Informix Guide to GLS Functionality.

Demonstration Databases

The DB-Access utility, which is provided with your Informix database server products, includes one or more of the following demonstration databases:

  • The stores_demo database illustrates a relational schema with information about a fictitious wholesale sporting-goods distributor. Many examples in Informix manuals are based on the stores_demo database.
  • The sales_demo database illustrates a dimensional schema for data-warehousing applications. For conceptual information about dimensional data modeling, see the Informix Guide to Database Design and Implementation.
  • The superstores_demo database illustrates an object-relational schema. The superstores_demo database includes examples of extended data types, type and table inheritance, and user-defined routines.
For information about how to create and populate the demonstration databases, see the DB-Access User's Manual. For descriptions of the databases and their contents, see the Informix Guide to SQL: Reference. The scripts that you use to install the demonstration databases reside in the $INFORMIXDIR/bin directory on UNIX and in the %INFORMIXDIR%\bin directory in Windows.

New Features

For a comprehensive list of new database server features, see the release notes. This section lists new features relevant to this book.

New Features in Version 8.3

This book describes new features in Version 8.3 of Enterprise Decision Server. The features fall into the following areas:

  • Performance enhancements
  • New SQL functionality
  • Version 8.3 features from Dynamic Server 7.30

Performance Enhancements

This book describes the following performance enhancements to Version 8.3 of Enterprise Decision Server:

  • Coarse-grain index locks
  • Updates with subquery in SET clause

New SQL Functionality

This book describes the following new SQL functionality in Version 8.3 of Enterprise Decision Server:

  • DELETE ... USING statement to delete rows based on a table join
  • Load and unload simple large objects to external tables
  • TRUNCATE statement

Version 8.3 Features from Version 7.30

This book describes the following features from Version 7.3 of Dynamic Server in Version 8.3 of Enterprise Decision Server:

  • Ability to retain update locks
  • COUNT function
  • Insert from SPL procedures
  • NVL and DECODE functions
  • REPLACE, SUBSTR, LPAD, and RPAD functions for string manipulation
  • Slow ALTER TABLE
  • TO_CHAR and TO_DATE functions for date conversion
  • Triggers
  • UPDATE SET clause subqueries
  • UPPER, LOWER, and INITCAP functions for case-insensitive search
  • Violations table

New Features in Version 9.2

This book describes new features in Version 9.2 of Dynamic Server. The features fall into the following areas:

  • Extensibility enhancements
  • Performance improvements
  • Special features

Extensibility Enhancements

This book describes the following extensibility enhancements to Version 9.2 of Dynamic Server:

  • Enhancements to the database server: dynamic lock allocation
  • General enhancements to SQL:
    • Embedded newline characters in quoted strings
    • Nested dot expressions
  • Triggers on SELECT statements
  • Enhancements to collections:
    • Collection constructors that use arbitrary expression elements
    • Collection-derived tables
    • Collection subqueries

Performance Improvements

This book describes the following performance improvements to Version 9.2 of Dynamic Server:

  • SQL statement cache
  • For UDRs:
    • Expensive-function optimization
    • Parallel UDRs

Special Features

This book describes the following special features in Version 9.2 of Dynamic Server:

  • n Long identifiers:
    • q 128-character identifier
    • q 32-character user names
  • n Ability to retain update locks

Additional Documentation

For additional information, you might want to refer to the following types of documentation:

  • On-line manuals
  • Printed manuals
  • On-line help
  • Error message documentation
  • Documentation notes, release notes, and machine notes
  • Related reading

On-Line Manuals

An Answers OnLine CD that contains Informix manuals in electronic format is provided with your Informix products. You can install the documentation or access it directly from the CD. For information about how to install, read, and print on-line manuals, see the installation insert that accompanies Answers OnLine.

Informix on-line manuals are also available on the following Web site:

www.informix.com/answers

Printed Manuals

To order printed manuals, call 1-800-331-1763 or send email to moreinfo@informix.com. Please provide the following information when you place your order:

  • The documentation that you need
  • The quantity that you need
  • Your name, address, and telephone number

On-Line Help

Informix provides on-line help with each graphical user interface (GUI) that displays information about those interfaces and the functions that they perform. Use the help facilities that each GUI provides to display the on-line help.

Error Message Documentation

Informix software products provide ASCII files that contain all of the Informix error messages and their corrective actions.

To read error messages and corrective actions on UNIX, use one of the following utilities.

Utility Description
finderr Displays error messages on line
rofferr Formats error messages for printing

To read error messages and corrective actions in Windows environments, use the Informix Find Error utility. To display this utility, choose Start->Programs->Informix from the Task Bar.

Instructions for using the preceding utilities are available in Answers OnLine. Answers OnLine also provides a listing of error messages and corrective actions in HTML format.

Documentation Notes, Release Notes, Machine Notes

In addition to printed documentation, the following sections describe the on-line files that supplement the information in this book. Please examine these files before you begin using your database server. They contain vital information about application and performance issues.

On UNIX platforms, the following on-line files appear in the $INFORMIXDIR/release/en_us/0333 directory. Replace x.y in the filenames with the version number of your database server.

On-Line File Purpose
SQLTDOC_x.y The documentation notes file for your version of this manual describes topics that are not covered in the manual or that were modified since publication.
SERVERS_x.y The release notes file describes feature differences from earlier versions of Informix products and how these differences might affect current products. This file also contains information about any known problems and their workarounds.
IDS_x.y or IDS_EDS_x.y The machine notes file describes any special actions that you must take to configure and use Informix products on your computer. Machine notes are named for the product described.

The following items appear in the Informix folder. To display this folder, choose Start->Programs->Informix from the Task Bar.

Program Group Item Description
Documentation Notes This item includes additions or corrections to manuals and information about features that might not be covered in the manuals or that have been modified since publication.
Release Notes This item describes feature differences from earlier versions of Informix products and how these differences might affect current products. This file also contains information about any known problems and their workarounds.

Related Reading

For a list of publications that provide an introduction to database servers and operating-system platforms, refer to your Getting Started manual.

Compliance with Industry Standards

The American National Standards Institute (ANSI) has established a set of industry standards for SQL. Informix SQL-based products are fully compliant with SQL-92 Entry Level (published as ANSI X3.135-1992), which is identical to ISO 9075:1992. In addition, many features of Informix database servers comply with the SQL-92 Intermediate and Full Level and X/Open SQL CAE (common applications environment) standards.

Informix Welcomes Your Comments

Let us know what you like or dislike about our books. To help us with future versions of our books, we want to know about any corrections or clarifications that you would find useful. Include the following information:

  • The name and version of the book that you are using
  • Any comments that you have about the manual
  • Your name, address, and phone number

Send electronic mail to us at the following address:

doc@informix.com

The doc alias is reserved exclusively. The doc alias is reserved exclusively for reporting errors and omissions in our documentation.

We appreciate your suggestions.

Read More

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >