
Learning SQL
A Step-By-Step Guide Using Oracle
Pearson (Publisher)
Published on 13. June 2002
Book
Paperback/Softback
368 pages
978-0-201-77363-7 (ISBN)
Description
Learning SQL: A Step-By-Step Guide Using Oracle is a brief, hands-on tutorial covering the basics of using SQL, as well as using the Oracle database engine with SQL. It assumes no previous knowledge of programming or databases.
The book focuses on providing an introduction to beginning SQL tasks. Throughout the chapters, readers are taken through various beginning aspects of SQL. At the end of each chapter, a series of exercises is provided to facilitate the practice of these newly learned skills. Throughout the book, common pitfalls and style tips are called out in margin boxes. With this book, readers learn not only the basics, but also gain insight into how these skills are used by professional Oracle programmers.
This book is appropriate as a main textbook in an Introduction to Oracle/SQL course, or as a supplemental book for an Introduction to Database course for CS, CIS, MIS, or IT students.
The book focuses on providing an introduction to beginning SQL tasks. Throughout the chapters, readers are taken through various beginning aspects of SQL. At the end of each chapter, a series of exercises is provided to facilitate the practice of these newly learned skills. Throughout the book, common pitfalls and style tips are called out in margin boxes. With this book, readers learn not only the basics, but also gain insight into how these skills are used by professional Oracle programmers.
This book is appropriate as a main textbook in an Introduction to Oracle/SQL course, or as a supplemental book for an Introduction to Database course for CS, CIS, MIS, or IT students.
More details
Language
English
Place of publication
United States
Publishing group
Pearson Education (US)
Target group
College/higher education
Dimensions
Width: 233 mm
Thickness: 18 mm
Weight
620 gr
ISBN-13
978-0-201-77363-7 (9780201773637)
Copyright in bibliographic data and cover images is held by Nielsen Book Services Limited or by the publishers or by their respective licensors: all rights reserved.
Schweitzer Classification
Content
(Each Chapter concludes with Exercises.)
Preface.
PART I.
0. The Software Engineering Process and Relational Databases.
What is a Database?
Database Models.
What is the Software Engineering Process?
References.
1. Getting Started with Oracle 8 in the Windows Environment.
Getting Started in Oracle.
Setting Your System Parameters.
Using Oracle Commands.
Editing SQL Statements.
Displaying the "Student-Course" Database.
Introducing the Oracle Data Dictionary.
Using DESC.
Employing a Convention for Writing SQL Statements.
2. More "Beginning" SQL Commands.
An Extended SELECT Statement.
A Simple CREATE TABLE Command.
Inserting Values into a Created Table.
The UPDATE Command.
The DELETE Command.
ROLLBACK, COMMIT, and SAVEPOINT.
The ALTER TABLE Command.
Data Types.
3. The Cartesian Product, the Join, the Aliases.
The Cartesian Product.
The Join.
Column Aliases.
Scripting.
COUNT and Rownum.
References.
4. Functions and Matching (LIKE).
The COUNT Function.
Additional Basic Functions.
The Data Dictionary Revisited.
5. Query Development, Privileges, and Derived Structures.
Query Development.
Parentheses in SQL Expressions.
Derived Structures.
GRANTing and REVOKEing Privileges on Tables and Views.
Query Development and Derived Structures.
6. Set Operations.
Introducing a Set Operation.
The IN and NOT..IN Predicates.
The Difference Operation.
7. Joins versus Subqueries.
The IN Subquery.
The Subquery as a Join.
When the Join Cannot be Turned into a Subquery.
More Examples Involoving Joints and IN.
Subqueries with Operators.
8. GROUP BY and HAVING.
Aggregates/Column Functions.
The GROUP BY Clause.
The HAVING Clause.
Auditing IN Subqueries.
Nulls Revisited.
9. Correlated Subqueries.
Non-Correlated Subqueries.
Correlated Subqueries.
Existence Queries and Correlation.
NOT EXISTS.
SQL Universal and Existential Qualifiers: The "For All" Query.
References.
PART II.
10. CREATE TABLESs and SQLLOADER.
The "Simple" CREATE TABLE.
The NOT NULL Constraint.
PRIMARY KEY Constraints.
The UNIQUE Constraint.
The CHECK Constraint.
Referential Integrity.
More on CONSTRAINT Names.
SQLLOADER.
11. Multiple Commands, START Files, and Reports in SQLPLUS.
Creating a File (a START Table) and STARTing It.
Using the DECODE, GREATEST and LEST Functions.
Adding Reporting Commands to a START File.
Using START Files with ACCEPT and PROMPT.
Using START Files with Positional Input.
12. Beginning PL/SQL Examples: Anonymous Scripts, Procedures, Functions, and Packages.
Anonymous Blocks.
Elementary Procedures with Sequence Structures.
Procedures with Selection and Iteration.
Functions.
Packages.
Defining a PL/SQL INDEX BY Table.
References.
13. Triggers.
What is a Trigger?
Using WHEN.
A Trigger Where One Table Affects Another Trigger.
Mutating Tables.
References.
Appendix 1: Getting Started with Oracle in the UNIX System.
Getting Started on Oracle in UNIX.
Signing onto Oracle in UNIX.
Editing SQL Commands in UNIX.
Some UNIX Commands.
Editors.
Appendix 1 Exercises.
Appendix 2: The Data Dictionary.
Beginning to Explore the Data Dictionary.
A Paradigm for Choosing a View from the Dictionary.
Views of TABLES.
Other Objects: Tablespaces and Constraints.
Views of Tablespaces.
Views of Constraints.
Appendix 2 Exercises.
References.
Appendix 3: The Student Database and Other Tables Used in this Book.
The Student-Course Database.
Other Tables Used in this Book.
Appendix 4: Improvements in Oracle 8i and 9i.
Improvements in Oracle 8i.
Improvements in Oracle 9i.
References.
Glossary of Terms.
Glossary of Important Commands and Functions.
Index of Terms.
Index of Important Commands and Functions.
Preface.
PART I.
0. The Software Engineering Process and Relational Databases.
What is a Database?
Database Models.
What is the Software Engineering Process?
References.
1. Getting Started with Oracle 8 in the Windows Environment.
Getting Started in Oracle.
Setting Your System Parameters.
Using Oracle Commands.
Editing SQL Statements.
Displaying the "Student-Course" Database.
Introducing the Oracle Data Dictionary.
Using DESC.
Employing a Convention for Writing SQL Statements.
2. More "Beginning" SQL Commands.
An Extended SELECT Statement.
A Simple CREATE TABLE Command.
Inserting Values into a Created Table.
The UPDATE Command.
The DELETE Command.
ROLLBACK, COMMIT, and SAVEPOINT.
The ALTER TABLE Command.
Data Types.
3. The Cartesian Product, the Join, the Aliases.
The Cartesian Product.
The Join.
Column Aliases.
Scripting.
COUNT and Rownum.
References.
4. Functions and Matching (LIKE).
The COUNT Function.
Additional Basic Functions.
The Data Dictionary Revisited.
5. Query Development, Privileges, and Derived Structures.
Query Development.
Parentheses in SQL Expressions.
Derived Structures.
GRANTing and REVOKEing Privileges on Tables and Views.
Query Development and Derived Structures.
6. Set Operations.
Introducing a Set Operation.
The IN and NOT..IN Predicates.
The Difference Operation.
7. Joins versus Subqueries.
The IN Subquery.
The Subquery as a Join.
When the Join Cannot be Turned into a Subquery.
More Examples Involoving Joints and IN.
Subqueries with Operators.
8. GROUP BY and HAVING.
Aggregates/Column Functions.
The GROUP BY Clause.
The HAVING Clause.
Auditing IN Subqueries.
Nulls Revisited.
9. Correlated Subqueries.
Non-Correlated Subqueries.
Correlated Subqueries.
Existence Queries and Correlation.
NOT EXISTS.
SQL Universal and Existential Qualifiers: The "For All" Query.
References.
PART II.
10. CREATE TABLESs and SQLLOADER.
The "Simple" CREATE TABLE.
The NOT NULL Constraint.
PRIMARY KEY Constraints.
The UNIQUE Constraint.
The CHECK Constraint.
Referential Integrity.
More on CONSTRAINT Names.
SQLLOADER.
11. Multiple Commands, START Files, and Reports in SQLPLUS.
Creating a File (a START Table) and STARTing It.
Using the DECODE, GREATEST and LEST Functions.
Adding Reporting Commands to a START File.
Using START Files with ACCEPT and PROMPT.
Using START Files with Positional Input.
12. Beginning PL/SQL Examples: Anonymous Scripts, Procedures, Functions, and Packages.
Anonymous Blocks.
Elementary Procedures with Sequence Structures.
Procedures with Selection and Iteration.
Functions.
Packages.
Defining a PL/SQL INDEX BY Table.
References.
13. Triggers.
What is a Trigger?
Using WHEN.
A Trigger Where One Table Affects Another Trigger.
Mutating Tables.
References.
Appendix 1: Getting Started with Oracle in the UNIX System.
Getting Started on Oracle in UNIX.
Signing onto Oracle in UNIX.
Editing SQL Commands in UNIX.
Some UNIX Commands.
Editors.
Appendix 1 Exercises.
Appendix 2: The Data Dictionary.
Beginning to Explore the Data Dictionary.
A Paradigm for Choosing a View from the Dictionary.
Views of TABLES.
Other Objects: Tablespaces and Constraints.
Views of Tablespaces.
Views of Constraints.
Appendix 2 Exercises.
References.
Appendix 3: The Student Database and Other Tables Used in this Book.
The Student-Course Database.
Other Tables Used in this Book.
Appendix 4: Improvements in Oracle 8i and 9i.
Improvements in Oracle 8i.
Improvements in Oracle 9i.
References.
Glossary of Terms.
Glossary of Important Commands and Functions.
Index of Terms.
Index of Important Commands and Functions.