Easy Oracle SQL: Get Started Fast Writing SQL Reports with SQL*Plus
暫譯: 輕鬆掌握 Oracle SQL:快速入門使用 SQL*Plus 撰寫 SQL 報告

John Garmany

  • 出版商: Rampant Tech Press
  • 出版日期: 2005-06-01
  • 售價: $580
  • 貴賓價: 9.5$551
  • 語言: 英文
  • 頁數: 200
  • 裝訂: Paperback
  • ISBN: 0972751378
  • ISBN-13: 9780972751377
  • 相關分類: OracleSQL
  • 無法訂購

買這商品的人也買了...

相關主題

商品描述

Description

Written by a graduate of West Point, John Garmany leverages his 20+ years of experience into an indispensable guide for any Oracle professional who must quickly implement Oracle reporting. A noted instructor, author and lecturer, John Garmany leverages his ability to explain complex issues in Plain English into a one-of-a-kind book. John Garmany targets his decades of SQL*Plus experience into this must-have book. Intended for anyone who needs to extract Oracle data and format reports, John reveals the secrets of quickly and easily producing stunning reports from Oracle.

Unknown to most Oracle professionals, special SQL extraction techniques and SQL*Plus commands can be used to quickly create complex reports, without buying expensive third-party reporting tools. Best of all, John Garmany shares dozens of working samples in his online code depot. Your time savings from a single script is worth the price of this great book.

Easy Oracle SQL is your introduction to using SQL and SQL*Plus with an Oracle database. Whether you are just learning SQL or just need a handy reference, this book will provide you with proven methods to building queries and reports using SQL.

Each concept is explained in detail with multiple examples and exercises at the end of each section. Also included is a section detailing how to effectively use SQL*Plus to not only create and run queries but also to create quality reports and scripts. This book will have you up and using SQL quickly and efficiently.

 

Table of Contents

1 – Introduction and overview of Oracle

This is an introduction to Oracle relational database and the Oracle architecture. We discuss Oracle data storage architecture, Oracle table and indexes, and how to


1-1: The Oracle Relational Database
• The relational model
• Oracle overview
• One-to-many relationships
• Many-to-many relationships
• Recursive many-to-many relationships

1-2: Inside the Oracle Architecture
• SGA regions
• Background processes
• Disk architectures

1-3: Data storage
• Disk storage
• Solid state disks
• RAM caches
• Flat-file data storage (BFILE, external tables)
• Spreadsheet file access

1-4: Introduction to Oracle Tables
• Standard tables
• Index organized tables
• External tables

1-5: Introduction to Oracle Indexes
• B-tree indexes
• Bitmap indexes
• Bitmap join indexes
• Star indexes

1-6: Database access methods
• SQL*Plus
• SQL Worksheet
• Procedural programs
• ODBC
• SQL*XL


2 – Introduction to Oracle Data Access

This is an introduction to Oracle SQL and SQL*Plus.

2-1: SQL Processing
• Syntax checking
• Semantic processing
• SQL parsing
• Creating the executable
• Inside the library cache


2-2: Oracle data dictionary
• The X$ fixed tables
• The DBA Views
• The v$ views
• Running dictionary scripts

2-3: SQL*Plus
• Entering SQL*Plus
• Using the desc command
• Using the spool command

2-4: Syntax of SQL
• Select, project and join
• WHERE clause
• ORDER BY clause
• GROUP BY clause
• In-line views
• SQL in SELECT clause (Oracle9i new feature)

2-5: Report generation with SQL*Plus
• Entering SQL*Plus
• Running an SQL command
• Building and formatting an SQL command
• Formatting a SQL report
• Spooling a report


2-6: Views
• Logical encapsulation of complex queries
• Using the DBA_VIEWS view
• Problems combining views

3 – Introduction to DDL and DML

This is an introduction to Oracle schema definition and data updating.


3-1: SQL schema navigation
• Schema entity types
• Relationships between schema entities

3-2: Schema components
• Data files
• Tablespaces
• Oracle objects (tables, indexes, IOT, etc.)

3-3: Referential Integrity
• Implementing Data Integrity
• Types of RI – not null, unique check, foreign key
• Rules for using RI
• System-named constraints (SYSnnn)
• Viewing Constraint Information with dba_constraints

3-4: DDL Introduction
• Create a database
• Create a table
• Create an index
• Altering schema objects


3-5: DML Introduction
• Inserts
• Updates
• Deletes
• RI constraints (restrict, cascade)
• Snapshot too old

3-6: Read consistency, locking & DML
• Why read consistency?
• UNDO segments and read consistency

 

4 – PL/SQL Programming

4-1: Introduction to the PL/SQL Language
• Interpreted language
• Syntax examples
• Procedures, packages and functions

4-2: PL/SQL Language structures
• Looping within PL/SQL
• If testing (if then else syntax)
• Exception conditions
• Array processing

4-3: SQL with PL/SQL
• Using a cursor
• Fetching from a cursor


4-4: PL/SQL Packages and Procedures

4-5: Extending SQL with a user-defined PL/SQL function

4-6: Oracle supplied DBMS packages



5 – Oracle Report Writing

This is an introduction to Oracle reporting tools and techniques. Your will learn how to use the SQL*Plus formatting commands to create easy reports from Oracle, how to join multiple tables together and how to easily aggregate, summarize and analyze Oracle table data. You also learn how Oracle access the tables and indexes and see how to ensure that your SQL uses the fastest methods for accessing your data.


5-1: Formatting commands in SQL*Plus

5-2: Analytical functions in SQL

5-3: Table joins
• Equi-join
• Outer join
• Hiding joins by creating views
• Using IN, NOT IN, EXISTS and NOT EXISTS
• Subqueries
• Exercise – write a subquery
• Correlated subquery
• Non-correlated subqueries

5-4: Subqueries in SQL
• IN and NOT In operators
• Sub-queries
• EXISTS clause

5-5: Aggregation in SQL
• Between operator
• Using wildcards in queries (LIKE operator)
• Count(*)
• Sum
• Avg
• Min and max
• Using the group by clause


5-6: Materialized Views for reports

商品描述(中文翻譯)

描述
由西點軍校畢業的約翰·加曼尼(John Garmany)利用他超過20年的經驗,撰寫了這本對任何需要快速實施Oracle報告的Oracle專業人士來說不可或缺的指南。作為一位著名的講師、作者和演講者,約翰·加曼尼善於用簡單易懂的語言解釋複雜的問題,創作出一本獨一無二的書籍。約翰將他數十年的SQL*Plus經驗集中於這本必備的書籍中。這本書適合任何需要提取Oracle數據並格式化報告的人,約翰揭示了如何快速輕鬆地從Oracle生成驚人的報告的秘密。

對於大多數Oracle專業人士來說,特殊的SQL提取技術和SQL*Plus命令可以用來快速創建複雜的報告,而無需購買昂貴的第三方報告工具。最棒的是,約翰·加曼尼在他的在線代碼庫中分享了數十個可用的範例。從一個腳本中節省的時間就足以彌補這本書的價值。

《Easy Oracle SQL》是您使用SQL和SQL*Plus與Oracle數據庫的入門書籍。無論您是剛學習SQL還是需要一個方便的參考,這本書都將為您提供使用SQL構建查詢和報告的有效方法。

每個概念都詳細解釋,並在每個部分的末尾提供多個範例和練習。此外,還包括一個部分,詳細說明如何有效使用SQL*Plus,不僅創建和運行查詢,還創建高質量的報告和腳本。這本書將幫助您快速高效地使用SQL。

目錄
1 – Oracle的介紹與概述
這是對Oracle關聯數據庫和Oracle架構的介紹。我們將討論Oracle數據存儲架構、Oracle表和索引,以及如何
1-1: Oracle關聯數據庫
• 關聯模型
• Oracle概述
• 一對多關係
• 多對多關係
• 遞歸多對多關係

1-2: Oracle架構內部
• SGA區域
• 背景進程
• 磁碟架構

1-3: 數據存儲
• 磁碟存儲
• 固態硬碟
• RAM快取
• 扁平文件數據存儲(BFILE,外部表)
• 試算表文件訪問

1-4: Oracle表的介紹
• 標準表
• 索引組織表
• 外部表

1-5: Oracle索引的介紹
• B樹索引
• 位圖索引
• 位圖連接索引
• 星型索引

1-6: 數據庫訪問方法
• SQL*Plus
• SQL工作表
• 程序性程序
• ODBC
• SQL*XL

2 – Oracle數據訪問的介紹
這是對Oracle SQL和SQL*Plus的介紹。
2-1: SQL處理
• 語法檢查
• 語義處理
• SQL解析
• 創建可執行文件
• 在庫緩存內部

2-2: Oracle數據字典
• X$固定表
• DBA視圖
• v$視圖
• 運行字典腳本

2-3: SQL*Plus
• 進入SQL*Plus
• 使用desc命令
• 使用spool命令

2-4: SQL語法
• 選擇、投影和連接
• WHERE子句
• ORDER BY子句
• GROUP BY子句
• 行內視圖
• 在SELECT子句中的SQL(Oracle9i新特性)

2-5: 使用SQL*Plus生成報告
• 進入SQL*Plus
• 運行SQL命令
• 構建和格式化SQL命令
• 格式化SQL報告
• 輸出報告

2-6: 視圖
• 複雜查詢的邏輯封裝
• 使用DBA_VIEWS視圖
• 組合視圖的問題

3 – DDL和DML的介紹
這是對Oracle模式定義和數據更新的介紹。
3-1: SQL模式導航
• 模式實體類型
• 模式實體之間的關係

3-2: 模式組件
• 數據文件
• 表空間
• Oracle對象(表、索引、IOT等)

3-3: 參考完整性
• 實施數據完整性
• 參考完整性的類型 – 非空、唯一檢查、外鍵
• 使用參考完整性的規則
• 系統命名約束(SYSnnn)
• 使用dba_constraints查看約束信息

3-4: DDL介紹
• 創建數據庫
• 創建表
• 創建索引
• 修改模式對象

3-5: DML介紹
• 插入
• 更新
• 刪除
• 參考完整性約束(限制、級聯)
• 快照過舊

3-6: 讀取一致性、鎖定與DML
• 為什麼需要讀取一致性?
• UNDO段和讀取一致性

4 – PL/SQL編程
4-1: PL/SQL語言介紹
• 解釋性語言
• 語法範例
• 程序、包和函數

4-2: PL/SQL語言結構
• 在PL/SQL中循環
• If測試(if then else語法)
• 異常條件
• 陣列處理

4-3: PL/SQL中的SQL
• 使用游標
• 從游標中提取數據

4-4: PL/SQL包和程序

4-5: 使用用戶定義的PL/SQL函數擴展SQL

4-6: Oracle提供的DBMS包

5 – Oracle報告撰寫
這是對Oracle報告工具和技術的介紹。您將學習如何使用SQL*Plus格式化命令從Oracle創建簡單報告,如何將多個表連接在一起,以及如何輕鬆聚合、總結和分析Oracle表數據。您還將學習Oracle如何訪問表和索引,並了解如何確保您的SQL使用最快的方法來訪問數據。
5-1: SQL*Plus中的格式化命令
5-2: SQL中的分析函數
5-3: 表連接
• 等值連接
• 外部連接
• 通過創建視圖隱藏連接
• 使用IN、NOT IN、EXISTS和NOT EXISTS
• 子查詢
• 練習 – 編寫子查詢
• 相關子查詢
• 非相關子查詢

5-4: SQL中的子查詢
• IN和NOT IN運算符
• 子查詢
• EXISTS子句

5-5: SQL中的聚合
• BETWEEN運算符
• 在查詢中使用通配符(LIKE運算符)
• Count(*)
• Sum
• Avg
• Min和Max
• 使用GROUP BY子句

5-6: 用於報告的物化視圖