did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9781598220636

Practical Guide To Using Sql In Oracle

by
  • ISBN13:

    9781598220636

  • ISBN10:

    1598220632

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2008-09-05
  • Publisher: Jones & Bartlett Learning
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $70.95
We're Sorry.
No Options Available at This Time.

Summary

Structured Query Language has become the standard for generating, manipulating, and retrieving database information. The dramatic increase in the popularity of relational databases, coupled with Oracle’s having the largest market share, has created a demand for programmers who can write SQL code correctly and efficiently. This book provides a systematic approach to learning SQL in Oracle. Each chapter is written in a step-by-step manner and includes examples that can be run using Oracle. Using the sample tables and data provided, readers will be able to perform the examples to gain hands-on experience with Oracle programming.Gain an understanding of basic SQL principles. Learn to generate, store, and edit SQL queries in Oracle. Develop joins, subqueries, and correlated subqueries. Work with XML and Oracle databases. Test your SQL knowledge with the exercises at the end of each chapter!

Author Biography

Dr. Richard Walsh Earp is a former chair of and former associate professor in the Department of Computer Science and former dean of the College of Science and Technology at the University of West Florida in Pensacola Dr. Sikha Saha Bagui is an associate professor in the department of Computer Science at the University of West Florida. She teaches a variety of computer science and database courses, and her research areas of concentration are database design, webdatabases, data mining, and statistical computing

Table of Contents

Prefacep. xiii
Acknowledgmentsp. xvii
Prologue: The Software Engineering Process and Relational Databasesp. 1
What Is a Database?p. 2
Database Modelsp. 3
The Hierarchical Modelp. 3
Other Cardinalitiesp. 6
The Network Modelp. 8
Contemporary Databases: The Relational Modelp. 9
The First, Second, and Third Normal Formsp. 11
The First Normal Formp. 12
Non-1NF to First Normal Form (1NF)p. 13
The Second Normal Formp. 14
Non-2NF to 2NFp. 16
The Third Normal Formp. 18
Non-3NF to 3NFp. 19
What Is the Software Engineering Process?p. 20
Getting Started with Oraclep. 25
Getting Started with Oracle in UNIXp. 26
Signing on to Oracle in UNIXp. 26
Setting Your System Parametersp. 27
Setting the PAUSE Parameterp. 28
Setting the Prompt Parameterp. 28
Showing Timing Statisticsp. 29
Viewing a List of System Parametersp. 29
Oracle's HELP Command in UNIXp. 30
Using Oracle Commandsp. 31
Understanding SQL and Its Sublanguagep. 31
Using SELECT Statement Syntaxp. 32
Re-executing a Commandp. 33
Accessing Tablesp. 34
Adding Comments to Statementsp. 35
A Few More Examples and Further Comments about Casep. 36
Editing SQL Statementsp. 36
Editing SQL Statements Using an Editorp. 37
Defining an Editorp. 37
Editing the Bufferp. 37
Saving the Bufferp. 39
Using GETp. 40
Using a Script File to Save Your Queryp. 40
Editing SQL Statements or Queries Using SQLPLUSp. 41
Using the CHANGE Commandp. 41
Using the LIST Commandp. 42
Using the APPEND Commandp. 43
Using the INPUT Commandp. 45
Using INPUT to Insert a Linep. 47
Using the DELETE Commandp. 49
Displaying the Student-Course Databasep. 50
Displaying the Course Table (the Course Relation)p. 50
Creating a Synonym for the Course Tablep. 51
Deleting a Synonymp. 52
Introducing the Oracle Data Dictionaryp. 52
Using DESCp. 54
Using a Convention for Writing SQL Statementsp. 55
Printing Query Results and Using Hostp. 56
Signing Off from Oraclep. 58
Exercises for Chapter 1p. 59
More "Beginning" SQL Commandsp. 63
An Extended SELECT Statementp. 63
SELECTing Attributes (Columns)p. 65
Using ORDER BYp. 66
SELECTing Rowsp. 70
Using ANDp. 71
Using ORp. 72
Using BETWEENp. 73
A Simple CREATE TABLE Commandp. 75
Inserting Values into an Existing Tablep. 76
INSERT INTO .. VALUESp. 76
INSERT INTO .. SELECTp. 79
The UPDATE Commandp. 82
The DELETE Commandp. 84
Deleting a Tablep. 84
ROLLBACK, COMMIT, and SAVEPOINTp. 85
The ALTER TABLE Commandp. 92
Data Typesp. 94
Common Number Data Typesp. 95
CHAR Data Typep. 97
VARCHAR2 Data Typep. 98
NCHAR and NVARCHAR2 Data Typesp. 98
LONG, RAW, LONG RAW, and BOOLEAN Data Typesp. 99
Large Object (LOB) Data Typesp. 99
Abstract Data Typesp. 100
The XML Data Typep. 100
The DATE Data Type and Type Conversion Functionsp. 101
Entering Four-Digit Yearsp. 105
Exercises for Chapter 2p. 107
Joinsp. 111
The Cartesian Productp. 112
The Joinp. 114
Join Using ANSI Join Syntaxp. 115
Theta Joinsp. 116
Qualifiersp. 116
Table Aliases and an Introduction to Multi-table Joinsp. 118
More on Commentsp. 119
More on Multiple Table Joins and Join Conditionsp. 121
Column Aliasesp. 123
Scriptingp. 126
COUNT and Rownump. 128
Using COUNTp. 129
Using Rownump. 130
Outer Joinsp. 130
Left Outer Joinp. 131
Right Outer Joinp. 132
Handling Full Outer Joinsp. 133
Outer Join with an AND Conditionp. 135
Chaining Outer Joinsp. 136
Self Joinsp. 138
Self Join and Outer Joinp. 139
Exercises for Chapter 3p. 139
Functionsp. 145
The COUNT Functionp. 146
Using SELECT and COUNT with DISTINCTp. 148
More Basic Functionsp. 149
Aggregate Functionsp. 150
Row-level Functionsp. 151
The NVL Functionp. 151
String Functionsp. 152
The SUBSTR and INSTR Functionsp. 153
The RPAD and LPAD Functionsp. 157
The LTRIM and RTRIM Functionsp. 158
The LENGTH Functionp. 158
Matching Substrings Using LIKEp. 159
LIKE as an Existence Matchp. 159
LIKE with a Positioned Match and a Wildcardp. 163
The UPPER and LOWER Functionsp. 164
The Data Dictionary Revisitedp. 165
Exercises for Chapter 4p. 167
Query Development, Privileges, and Derived Structuresp. 175
Query Developmentp. 176
Using SAVE and EDITp. 176
Deleting a Queryp. 181
Parentheses in SQL Expressionsp. 182
Derived Structuresp. 184
Viewsp. 184
Using the CREATE OR REPLACE VIEW Statementsp. 185
Adding ORDER BY to CREATE OR REPLACE VIEW Statementsp. 186
Developing a Query Using Viewsp. 188
Creating Special View Column Namesp. 188
Grating and Revoking Privileges on Tables and Viewsp. 190
Query Development and Derived Structuresp. 191
Developing a Query Step-by-Stepp. 192
Using a Derived Structurep. 195
Make Your Query a Viewp. 195
Create a Temporary Tablep. 196
Use an Inline Viewp. 197
Use a Snapshotp. 199
Exercises for Chapter 5p. 200
Set Operationsp. 205
UNION Operationsp. 206
The IN and NOT..IN Predicatesp. 208
Using INp. 209
Using NOT..INp. 212
The Difference Operationp. 217
Exercises for Chapter 6p. 222
Subqueries versus Joinsp. 227
The IN Subqueryp. 228
The Subquery as a Joinp. 230
When the Join Cannot Be Turned into a Subqueryp. 232
More Examples Involving Joins and INp. 234
p. 234
p. 236
p. 238
Subqueries with Operatorsp. 240
Exercises for Chapter 7p. 242
GROUP BY and HAVINGp. 247
Aggregates/Column Functionsp. 247
The GROUP BY Clausep. 248
GROUP BY and ORDER BYp. 251
The HAVING Clausep. 253
HAVING and WHEREp. 254
GROUP BY and HAVING: Aggregates of Aggregatesp. 256
Auditing IN Subqueriesp. 258
Nulls Revisitedp. 262
Exercises for Chapter 8p. 265
Correlated Subqueriesp. 269
Non-Correlated Subqueriesp. 269
Correlated Subqueriesp. 271
Existence Queries and Correlationp. 274
EXISTSp. 276
From IN to EXISTSp. 282
NOT EXISTSp. 284
SQL Universal and Existential Qualifiers -the "for all" Queryp. 291
p. 291
p. 295
p. 300
Exercises for Chapter 9p. 301
CREATE TABLE and SQLLOADERp. 307
The "Simple" CREATE TABLEp. 308
The NOT NULL Constraintp. 309
PRIMARY KEY Constraintsp. 312
Creating the PRIMARY KEY Constraintp. 313
At the Column Levelp. 313
At the Table Levelp. 313
Using the ALTER TABLE Commandp. 314
Adding a Concatenated Primary Keyp. 314
Another Example of Adding a Concatenated Primary Keyp. 315
The UNIQUE Constraintp. 316
The CHECK Constraintp. 317
Referential Integrityp. 317
Defining the Referential Integrity Constraintp. 320
Adding the Foreign Key after Tables Are Createdp. 321
Using DELETE and the Referential Constraintp. 322
ON DELETE RESTRICTp. 322
ON DELETE CASCADEp. 323
ON DELETE SET NULLp. 324
More on Constraint Namesp. 324
SQLLOADERp. 327
SQLLOADER Example 1p. 327
Another SQLLOADER Examplep. 330
Exercises for Chapter 10p. 331
Multiple Commands, START Files, and Reports in SQLPLUSp. 335
Creating a File (a START Table) and Starting Itp. 336
A START File (Script) with Editing Featuresp. 337
Using the DECODE, GREATEST, and LEAST Functionsp. 342
DECODEp. 342
GREATEST and LEASTp. 345
Adding Reporting Features to a START Filep. 347
A New and Improved Scriptp. 349
Using START Files with ACCEPT and PROMPTp. 354
Using START Files with Positional Inputp. 355
Exercises for Chapter 11p. 357
Beginning PL/SQL: Anonymous Blocks, Procedures, Functions, and Packagesp. 361
Anonymous Blocksp. 363
Elementary Procedures with Sequence Structuresp. 364
A Simple Example of a Procedurep. 365
Reusing a Procedurep. 367
Deleting a Procedurep. 367
Adding a Parameter List to a Procedurep. 368
Performing More than One Action in a Procedurep. 369
Procedures with Selection and Iteration Control Structuresp. 371
Example of a Procedure with Selectionp. 371
Example of a Procedure with Interationp. 372
Functionsp. 374
Example of a Functionp. 374
Deleting a Functionp. 375
Packagesp. 375
Creating a Packagep. 376
Another Approach to Creating This Packagep. 379
Deleting a Packagep. 380
Defining a PL/SQL INDEX BY Tablep. 380
Using a PL/SQL Tablep. 382
Exercises for Chapter 12p. 384
Introduction to Triggersp. 387
What Is a Trigger?p. 387
A Simple Trigger Examplep. 389
How the Trigger Workedp. 391
Row-Level Triggers versus Statement-Level Triggersp. 392
Enabling and Disabling Triggersp. 392
Enabling All Triggers for a Tablep. 393
Deleting Triggersp. 393
Values in the Triggerp. 393
Using WHENp. 394
Performance Issues Using WHENp. 395
A Trigger Where One Table Affects Another Triggerp. 395
Mutating Tablesp. 399
Exercises for Chapter 13p. 400
SQL and XMLp. 405
Overview of XMLp. 406
Oracle and XMLp. 407
XMLFORESTp. 408
Using XMLELEMENTp. 409
Using XMLATTRIBUTESp. 412
Creating a Table Using the XML Type Data Typep. 414
Inserting Values into Tables with an XML Type Data Typep. 415
Extracting Information Using XPATHp. 417
Using EXTRACTIVALUEp. 417
Using EXISTSNODEp. 417
Exercises for Chapter 14p. 418
Some UNIX Commandsp. 421
Commonly Used UNIX Commandsp. 421
Summary Tablep. 424
Other Miscellaneous Commandsp. 424
Editorsp. 425
Using vi as Your Editorp. 425
Other vi Commandsp. 426
Using joe as Your Editorp. 427
The Data Dictionaryp. 429
Beginning to Explore the Data Dictionaryp. 430
Choosing a View from the Dictionaryp. 434
Choosing the View You Want to Seep. 434
Describing the View You Want to Seep. 435
Finding the "Right" Columnsp. 436
Finding out How Many Rows Are in the Viewp. 436
Views of TABLESp. 439
Other Objects - Tablespaces and Constraintsp. 440
Views of Tablespacesp. 441
Views of Constraintsp. 443
Exercises for Appendix Bp. 445
The Student Database and Other Tables Used in This Bookp. 447
The Student-Course Databasep. 447
Entity Relationship Diagram of the Student-Course Databasep. 449
Other Tables Used in This Bookp. 450
Glossary of Termsp. 453
Important Commands and Functionsp. 467
Indexp. 479
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program