• BackCover
  • Preface
  • How This Book Is Organized
  • Conventions Used in This Book
  • Acknowledgments
  • Part I: SQL Basic Concepts and Principles
  • Chapter 1: SQL and Relational Database Management Systems (RDBMS)
  • Selecting Your Database Software
  • Everything in Details: DBMS Implementations
  • Real-Life Database Examples
  • Database Legacy
  • Relational Databases
  • Object Database and Object-Relational Database Models
  • Brief History of SQL and SQL Standards
  • Summary
  • Chapter 2: Fundamental SQL Concepts and Principles
  • SQL: The First Look
  • Any Platform, Any Time
  • Summary
  • Chapter 3: SQL Data Types
  • No Strings Attached
  • In Numbers Strength
  • Once Upon a Time: Date and Time Data Types
  • Object and User-Defined Data Types
  • Other Data Types
  • NULL
  • Summary
  • Part II: Creating and Modifying Database Objects
  • Chapter 4: Creating RDBMS Objects
  • Tables
  • Indexes
  • Views
  • Aliases and Synonyms
  • Schemas
  • Other SQL99 and Implementation-Specific Objects
  • CREATE Statement Cross-Reference
  • Summary
  • Chapter 5: Altering and Destroying RDBMS Objects
  • Tables
  • Indexes
  • Views
  • Aliases and Synonyms
  • Schemas
  • Other Implementation-Specific Objects
  • ALTER and DROP Statements Cross-Reference
  • Summary
  • Part III: Data Manipulation and Transaction Control
  • Chapter 6: Data Manipulation Language (DML)
  • INSERT: Populating Tables with Data
  • UPDATE: Modifying Table Data
  • DELETE: Removing Data from Table
  • Other SQL Statements to Manipulate Data
  • Summary
  • Chapter 7: Sessions, Transactions, and Locks
  • Sessions
  • Transactions
  • Understanding Locks
  • Summary
  • Part IV: Retrieving and Transforming Data
  • Chapter 8: Understanding SELECT Statement
  • Single Table SELECT Statement Syntax
  • SELECT Clause: What Do We Select?
  • FROM Clause: Select from What?
  • WHERE Clause: Setting Horizontal Limits
  • GROUP BY and HAVING Clauses: Summarizing Results
  • ORDER BY Clause: Sorting Query Output
  • Combining the Results of Multiple Queries
  • Summary
  • Chapter 9: Multitable Queries
  • Inner Joins
  • Outer Joins: Joining Tables on Columns Containing NULL Values
  • Joins Involving Inline Views
  • Multitable Joins with Correlated Queries
  • Improving Efficiency of Multitable Queries
  • Summary
  • Chapter 10: SQL Functions
  • Summary
  • Chapter 11: SQL Operators
  • Arithmetic Operators
  • Logical Operators
  • Operator Precedence
  • Assignment Operator
  • Comparison Operators
  • Bitwise Operators
  • User-defined Operators
  • Summary
  • Part V: Implementing Security Using System Catalogs
  • Chapter 12: SQL and RDBMS Security
  • Defining a Database User
  • Managing Security with Privileges
  • Managing Security with Roles
  • Using Views for Security
  • Using Constraints for Security
  • Using Stored Procedures and Triggers for Security
  • Database Auditing
  • Security Standards
  • Summary
  • Chapter 13: The System Catalog and INFORMATION_SCHEMA
  • Oracle 9i Data Dictionary
  • IBM DB2 UDB 8.1 System Catalogs
  • Microsoft SQL Server 2000 System Catalog
  • Summary
  • Part VI: Beyond SQL--Procedural Programming and Database Access Mechanisms
  • Chapter 14: Stored Procedures, Triggers, and User-Defined Functions
  • Procedural Extension Uses and Benefits
  • Key Elements of a SQL Procedural Language
  • Stored procedures
  • User-Defined Functions
  • Triggers
  • Summary
  • Chapter 15: Dynamic and Embedded SQL Overview
  • SQL Statement Processing Steps
  • Embedded (Static) SQL
  • Dynamic SQL Techniques
  • The Future of Embedded SQL
  • Summary
  • Chapter 16: SQL API
  • Microsoft Open Database Connectivity (ODBC)
  • Java Database Connectivity (JDBC)
  • IBM DB2 UDB Call-Level Interface (CLI)
  • Oracle Call Interface (OCI)
  • Oracle Objects for OLE (OO4O)
  • Microsoft Data Access Interfaces
  • Summary
  • Chapter 17: New Developments--XML, OLAP, and Objects
  • XML
  • OLAP and Business Intelligence
  • Objects
  • Summary
  • Part VII: Appendix
  • Appendix A: What's on the CD-ROM
  • Using the CD with Windows
  • What's on the CD
  • Troubleshooting
  • Appendix B: The ACME Sample Database
  • General Information and Business Rules
  • Naming Conventions
  • Relationships Between Tables
  • Column Constraints and Defaults
  • Indexes
  • SQL Scripts to Create ACME Database Objects
  • Appendix C: Basics of Relational Database Design
  • Identifying Entities and Attributes
  • Normalization
  • Specifying Constraints
  • Pitfalls of Relational Database Design
  • Appendix D: Installing RDBMS Software
  • Installing IBM DB2 UDB 8.1 Personal Edition
  • Installing Microsoft SQL Server 2000
  • Appendix E: Accessing RDBMS
  • Using IBM DB2 UDB 8.1 Command-Line Processor (CLP)
  • Using Microsoft SQL Server Utilities to Access Database
  • Appendix F: Installing the ACME Database
  • Installing the ACME Database on Oracle 9i (Unix/Linux) Using SQL*Plus
  • Installing the ACME Database on DB2 UDB 8.1 (Windows) Using CLP
  • Installing ACME Database on Microsoft SQL Server 2000 Using OSQL Utility
  • Appendix G: SQL Functions
  • Appendix H: SQL Syntax Reference
  • DDL Statements
  • DCL Statements
  • DML Statements
  • DQL Statements
  • Transactional Control Statements
  • Predicates
  • Appendix I: SQL-Reserved Keywords
  • Future Keywords
  • ODBC Reserved Keywords
  • Appendix J: SQL99 Major Features Compliance Across Different RDBMS
  • Appendix K: The Other RDBMS
  • Appendix L: A Brief Introduction to the Number Systems, Boolean Algebra, and Set Theory
  • The Number Systems
  • Logic Elements of Boolean Algebra
  • Set Theory
  • Index
  • Index_A
  • Index_B
  • Index_C
  • Index_D
  • Index_E
  • Index_F
  • Index_G
  • Index_H
  • Index_I
  • Index_J
  • Index_K
  • Index_L
  • Index_M
  • Index_N
  • Index_O
  • Index_P
  • Index_Q
  • Index_R
  • Index_S
  • Index_T
  • Index_U
  • Index_V
  • Index_W
  • Index_X
  • Index_Y
  • Index_Z
  • List of Figures
  • List of Tables
  • List of Code Examples
  • List of Sidebars
  • Previous Section Next Section
    Back Cover

    Here, in one definitive volume, is all the information you need to understand and use SQL and its implementations in accordance with the established SQL99 standard. Whether you want to learn database programming from scratch, you’d like to sharpen your SQL skills, or you need to know more about programming for a heterogeneous database environment, this book provides the complete menu. Tutorials and code examples in each chapter make it an indispensable reference for every level of expertise.

    • Understand the definition and characteristics of relational databases and SQL’s role within RDBMS
    • Recognize vendor-specific implementation variations among Oracle, IBM DB2 UDB, and MS SQL Server
    • Create and modify RDBMS objects like tables, views, indexes, synonyms, sequences, and schemas using Data Definition Language (DDL)
    • Comprehend Data Manipulation Language (DML) from different vendors’ perspectives
    • Master single-table select statements and multitable queries from the ground up
    • Explore in-depth SQL functions, operators, and data types for major RDBMS implementations
    • Discover new SQL developments including XML, OLAP, Web services, and object-oriented features

    About the Authors

    Alex Kriegel, MCP/MCSD, has worked for Pope & Talbot, Inc., in Portland, Oregon, since 2001 as Senior Programmer/Analyst; prior to that, he worked for Psion Teklogix International, Inc., in the same capacity. He received his B.S. in Physics of Metals from Polytechnic Institute of Belarus in 1988, discovered PC programming in 1992, and has never looked back since. He is also the author of Microsoft SQL Server 2000 Weekend Crash Course (Wiley, 2001).

    Boris M. Trukhnov, OCP, has been working as Senior Technical Analyst/Oracle DBA for Pope & Talbot, Inc., in Portland, Oregon, since 1998. His previous job titles include Senior Programmer Analyst, Senior Software Developer, and Senior Operations Analyst. He has been working with SQL and relational databases since 1994. Boris holds a B.S. in Computer Science from the University of Minnesota.


    Previous Section Next Section