DPSQLStudio DPSQLStudioOracleSQLhierarchycomparetutorial

DPSQLStudio — Hierarchy Explorer & Compare Datasets

T
TechnoPKG
2026-06-29 📖 3 min read 👁 6 views

Two ways to make sense of a result set

Some questions aren’t about which rows but about shape and change. DPSQLStudio’s Data menu has a tool for each: Hierarchy Explorer turns a parent/child query into an expandable tree, and Compare Datasets diffs two snapshots and tells you exactly what moved. This post shows both on a real EMPLOYEES table — every screenshot is the live app (v0.1.0 Beta) on Oracle as ADMIN@dpsqltest_high.

1. Hierarchy Explorer — an org chart from a flat table

The EMPLOYEES table is flat: each row has an EMP_ID and a MANAGER_ID. Data ▸ Hierarchy Explorer reads that self-reference and rebuilds the tree. You point it at a parent column and a child column, pick a label, and a direction (top-down).

The Hierarchy Explorer dialog — parent column, child column, a label column, and direction (top-down / descendants). Rows whose parent has no match become the roots.

Run it and the grid gains LEVEL and PATH columns, with names indented to show depth — a proper org chart you can read top to bottom:

The exploded hierarchy: Sarah Chen (CEO) at the root, VP Engineering and VP Sales beneath, then managers and engineers. The status bar reads “11 rows, max level 4, 1 start node.”

The PATH column (e.g. /1/2/4/7) is the materialised path from the root — handy for sorting the tree or spotting how deep a branch runs. This is the same idea as Oracle’s CONNECT BY, but built from any result with two clicks.

2. Compare Datasets — what changed between two snapshots

Now a different question: how did salaries change from one year to the next? Save two sheets — EMP_SALARY_2023 and EMP_SALARY_2024 — then Data ▸ Compare Datasets. You choose the two datasets, the key to match on, and which value column to diff.

The Compare Datasets dialog — Dataset A vs Dataset B, a key column to align rows, and the value column(s) to compare.

The result lines them up by EMP_ID and computes the difference, percent variance, and a total — including a row that exists in A but not B:

EMP_IDSALARY (A)SALARY (B)DIFF%VAR
101120,000132,000+12,00010%
10395,00099,000+4,0004.21%
10685,00090,000+5,0005.88%
10772,00078,000+6,0008.33%
10865,000(no match)−65,000−100%
TOTAL725,000691,000−34,000
Compare output: per-employee DIFF and %VAR with a TOTAL row. Employee 108 is “(no match)” in B — they left — flagged as −100%. The status bar: “7 matched, 1 A-only.”
Why this beats eyeballing two grids: Compare classifies every key as matched, A-only, or B-only and quantifies the change, so a departure (108) and a raise (101) are both impossible to miss.

Coming up

Next: the BLOB image viewer and Chart tools — viewing images stored in the database and turning a result column into a bar chart.


DPSQLStudio v0.1.0 (Beta) — a free Oracle SQL client for Windows. Screenshots are from the live app; demo data is fictional.

Tags: DPSQLStudioOracleSQLhierarchycomparetutorial

Comments (0)

💬
No comments yet. Be the first to share your thoughts!
Sign in to leave a comment.
Table of Contents
Generating...
Share