# apress/practical-oracle-sql architecture

> Architecture diagram of the GitHub repository apress/practical-oracle-sql, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/apress/practical-oracle-sql
- Repository: https://github.com/apress/practical-oracle-sql

## Overview

This repository is a companion collection of Oracle SQL examples for *Practical Oracle SQL*. Its conceptual workflow is to prepare the practical schema, then study chapter examples covering SQL decomposition and recursion, reshaping and text, analytic queries, and pattern-oriented problems. The schema scripts and chapter files are represented as distinct components; the supplied README confirms the companion-book role but gives no execution or call relationships. No source excerpts were provided, so edges between components are omitted rather than inferred.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_schema["Practical Schema"]
  node_create_schema["Create schema"]
  node_fill_schema["Fill schema"]
  node_clean_schema["Clean schema"]
  node_drop_schema["Drop schema"]
end

subgraph group_foundations["SQL Foundations"]
  node_ch01["Correlating inline views"]
  node_ch02["Set operation pitfalls"]
  node_ch03["Subquery factoring"]
  node_ch04["Recursive tree calculations"]
  node_ch05["SQL-defined functions"]
  node_ch06["Multidimensional iteration"]
end

subgraph group_reshaping["Reshaping and Text"]
  node_ch07["Unpivot columns"]
  node_ch08["Pivot rows"]
  node_ch09["Split delimited text"]
  node_ch10["Create delimited text"]
end

subgraph group_analytics["Analytic SQL"]
  node_ch11["Analytic windows"]
  node_ch12["Top-N queries"]
  node_ch13["Rolling sums"]
  node_ch14["Activity log analysis"]
  node_ch15["Linear regression forecast"]
  node_ch16["Forecast minimums"]
  node_ch17["Up-down patterns"]
  node_ch18["Pattern grouping"]
end

subgraph group_patterns["Patterns and Models"]
  node_ch19["Merge date ranges"]
  node_ch20["Abnormal peaks"]
  node_ch21["Bin fitting"]
  node_ch22["Count tree children"]
end

click node_create_schema "https://github.com/apress/practical-oracle-sql/blob/master/practical_create_schema.sql"
click node_fill_schema "https://github.com/apress/practical-oracle-sql/blob/master/practical_fill_schema.sql"
click node_clean_schema "https://github.com/apress/practical-oracle-sql/blob/master/practical_clean_schema.sql"
click node_drop_schema "https://github.com/apress/practical-oracle-sql/blob/master/practical_drop_schema.sql"
click node_ch01 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%201/ch01_correlating_inline_views.sql"
click node_ch02 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%202/ch02_pitfalls_of_set_operations.sql"
click node_ch03 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%203/ch03_divide_and_conquer_with_subquery_factoring.sql"
click node_ch04 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%204/ch04_tree_calculations_with_recursion.sql"
click node_ch05 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%205/ch05_functions_defined_within_sql.sql"
click node_ch06 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%206/ch06_iterative_calculations_with_multidimensional_data.sql"
click node_ch07 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%207/ch07_unpivoting_columns_to_rows.sql"
click node_ch08 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%208/ch08_pivoting_rows_to_columns.sql"
click node_ch09 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%209/ch09_splitting_delimited_text.sql"
click node_ch10 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2010/ch10_creating_delimited_text.sql"
click node_ch11 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2011/ch11_analytic_partitions_ordering_and_windows.sql"
click node_ch12 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2012/ch12_answering_top_n_questions.sql"
click node_ch13 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2013/ch13_ordered_subsets_with_rolling_sums.sql"
click node_ch14 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2014/ch14_analyzing_activity_logs_with_lead.sql"
click node_ch15 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2015/ch15_forecasting_with_linear_regression.sql"
click node_ch16 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2016/ch16_rolling_sums_to_forecast_reaching_minimums.sql"
click node_ch17 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2017/ch17_up_and_down_patterns.sql"
click node_ch18 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2018/ch18_grouping_data_with_patterns.sql"
click node_ch19 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2019/ch19_merging_date_ranges.sql"
click node_ch20 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2020/ch20_finding_abnormal_peaks.sql"
click node_ch21 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2021/ch21_bin_fitting.sql"
click node_ch22 "https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2022/ch22_counting_children_in_trees.sql"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_create_schema,node_fill_schema,node_clean_schema,node_drop_schema toneBlue
class node_ch01,node_ch02,node_ch03,node_ch04,node_ch05,node_ch06 toneAmber
class node_ch07,node_ch08,node_ch09,node_ch10 toneMint
class node_ch11,node_ch12,node_ch13,node_ch14,node_ch15,node_ch16,node_ch17,node_ch18 toneRose
class node_ch19,node_ch20,node_ch21,node_ch22 toneIndigo
```

## Components

### Practical Schema

- [Create schema](https://github.com/apress/practical-oracle-sql/blob/master/practical_create_schema.sql): `practical_create_schema.sql`
- [Fill schema](https://github.com/apress/practical-oracle-sql/blob/master/practical_fill_schema.sql): `practical_fill_schema.sql`
- [Clean schema](https://github.com/apress/practical-oracle-sql/blob/master/practical_clean_schema.sql): `practical_clean_schema.sql`
- [Drop schema](https://github.com/apress/practical-oracle-sql/blob/master/practical_drop_schema.sql): `practical_drop_schema.sql`

### SQL Foundations

- [Correlating inline views](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%201/ch01_correlating_inline_views.sql): `Chapter 1/ch01_correlating_inline_views.sql`
- [Set operation pitfalls](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%202/ch02_pitfalls_of_set_operations.sql): `Chapter 2/ch02_pitfalls_of_set_operations.sql`
- [Subquery factoring](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%203/ch03_divide_and_conquer_with_subquery_factoring.sql): `Chapter 3/ch03_divide_and_conquer_with_subquery_factoring.sql`
- [Recursive tree calculations](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%204/ch04_tree_calculations_with_recursion.sql): `Chapter 4/ch04_tree_calculations_with_recursion.sql`
- [SQL-defined functions](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%205/ch05_functions_defined_within_sql.sql): `Chapter 5/ch05_functions_defined_within_sql.sql`
- [Multidimensional iteration](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%206/ch06_iterative_calculations_with_multidimensional_data.sql): `Chapter 6/ch06_iterative_calculations_with_multidimensional_data.sql`

### Reshaping and Text

- [Unpivot columns](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%207/ch07_unpivoting_columns_to_rows.sql): `Chapter 7/ch07_unpivoting_columns_to_rows.sql`
- [Pivot rows](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%208/ch08_pivoting_rows_to_columns.sql): `Chapter 8/ch08_pivoting_rows_to_columns.sql`
- [Split delimited text](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%209/ch09_splitting_delimited_text.sql): `Chapter 9/ch09_splitting_delimited_text.sql`
- [Create delimited text](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2010/ch10_creating_delimited_text.sql): `Chapter 10/ch10_creating_delimited_text.sql`

### Analytic SQL

- [Analytic windows](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2011/ch11_analytic_partitions_ordering_and_windows.sql): `Chapter 11/ch11_analytic_partitions_ordering_and_windows.sql`
- [Top-N queries](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2012/ch12_answering_top_n_questions.sql): `Chapter 12/ch12_answering_top_n_questions.sql`
- [Rolling sums](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2013/ch13_ordered_subsets_with_rolling_sums.sql): `Chapter 13/ch13_ordered_subsets_with_rolling_sums.sql`
- [Activity log analysis](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2014/ch14_analyzing_activity_logs_with_lead.sql): `Chapter 14/ch14_analyzing_activity_logs_with_lead.sql`
- [Linear regression forecast](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2015/ch15_forecasting_with_linear_regression.sql): `Chapter 15/ch15_forecasting_with_linear_regression.sql`
- [Forecast minimums](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2016/ch16_rolling_sums_to_forecast_reaching_minimums.sql): `Chapter 16/ch16_rolling_sums_to_forecast_reaching_minimums.sql`
- [Up-down patterns](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2017/ch17_up_and_down_patterns.sql): `Chapter 17/ch17_up_and_down_patterns.sql`
- [Pattern grouping](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2018/ch18_grouping_data_with_patterns.sql): `Chapter 18/ch18_grouping_data_with_patterns.sql`

### Patterns and Models

- [Merge date ranges](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2019/ch19_merging_date_ranges.sql): `Chapter 19/ch19_merging_date_ranges.sql`
- [Abnormal peaks](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2020/ch20_finding_abnormal_peaks.sql): `Chapter 20/ch20_finding_abnormal_peaks.sql`
- [Bin fitting](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2021/ch21_bin_fitting.sql): `Chapter 21/ch21_bin_fitting.sql`
- [Count tree children](https://github.com/apress/practical-oracle-sql/blob/master/Chapter%2022/ch22_counting_children_in_trees.sql): `Chapter 22/ch22_counting_children_in_trees.sql`
