Important
Updated October 2026: apex/f100.sql now installs the app, its data, and your access in one import. If an earlier download gave you "not authorized" or unstyled pages, download it again and see Run Orbit Sales in Three Steps.
The scripts, data files, and code examples of the book Oracle APEX 26.1: The Complete Guide by Vinish Kapoor.
- 📘 About the book, sample pages, and contents: vinish.dev/oracle-apex-26-1-book-the-complete-guide
- 📖 Paperback on Amazon: amazon.com/dp/B0HKWGLMXD
- 📱 Kindle edition on Amazon: amazon.com/dp/B0HKW571TW
828 pages, 48 chapters, from installation to production: pages and reports, forms and grids, security, workflows, REST services with ORDS, and generative AI.
Throughout the book you build Orbit Sales, an order management application for the fictional outdoor-gear retailer Orbit Outfitters. This repository contains everything you need to follow along.
Download it with Code ▸ Download ZIP, or clone it:
git clone https://github.com/devvinish/apex-book-code-examples.gitTo see the finished application first, you need only one file, apex/f100.sql, and an Oracle APEX workspace: your own, or a free one on apex.oracle.com. The import installs the application and its sample data; there are no scripts to run.
- In App Builder, click Import, choose
f100.sql, click Next, and then Import Application. - On the Credentials page, click Next (the AI service of Chapter 44 can wait). Then click Install Supporting Objects.
- Click Run Application, and sign in with your workspace user name and password.
The import creates the Orbit Outfitters tables and sample data in your workspace's schema, and makes you the application's administrator. If the schema already has the Orbit tables, from Chapter 12 for example, they stay as they are and only the application is added.
Who may do what. The import gives you, the developer who imports it, the Administrator role: you can view, change, and administer everything. Other users of your workspace can open the application and view the data, but changing data (the Customer form, for example) needs the Contributor or Administrator role, and the administration pages need Administrator. Give roles in the application's Shared Components ▸ Application Access Control ▸ Add User Role Assignment.
If a page says "Insufficient privileges, user is not a Contributor" or "You are not authorized to view this application", your user has no role in this copy of the application, for example a copy imported by someone else or before this version of f100.sql. Add your user name with the Administrator role in Application Access Control, then sign out of the application and sign in again.
| Folder | Contents |
|---|---|
sql/orbit |
The Orbit Outfitters sample schema (Chapter 12) |
sql/orbit/parts |
The sample data split into six scripts for SQL Workshop ▸ SQL Scripts |
sql/orbit/data |
orbit-stores.csv (Chapter 11) and the product images |
sql/orbit/quicksql |
The data model in Quick SQL shorthand |
sql/examples |
The code examples of the chapters, named chNN-description by chapter |
sql/examples/static |
orbit.js and orbit.css, the static application files of Chapter 32 |
sql/examples/translations |
The German translation file of Chapter 41 |
sql/examples/data |
price-update.csv, the data load file of Chapter 40 |
apex/f100.sql |
The finished Orbit Sales application; its import also installs the sample schema |
api-book |
The API Lab and the JavaScript and PL/SQL examples of the second book, Oracle APEX 26.1 API by Example |
To build Orbit Sales yourself as you read, install the sample schema with these scripts, as Chapter 12 describes. (To run the finished application, the three steps above are enough.)
Requirements: Oracle APEX 26.1 on Oracle AI Database 26ai (the schema uses the BOOLEAN data type and a JSON relational duality view); for Oracle Database 19c, see On Oracle Database 19c below. Chapters 2 to 8 of the book describe the installation.
-
Create a schema, for example
ORBIT, and a workspace that uses it (Chapter 9). -
As
SYS, grant the schema the package that the password checking of Chapter 35 needs:grant execute on sys.dbms_crypto to orbit;
If you can't run this grant, for example on apex.oracle.com or another hosted APEX service, skip it, and skip
06_auth.sqlbelow: only Chapter 35 needs it, and the application works without it. -
Install the schema with SQLcl, connected as the schema owner:
cd sql/orbit sql orbit@localhost:1521/FREEPDB1 @install.sqlWithout SQLcl, upload and run the scripts in SQL Workshop ▸ SQL Scripts instead:
01_tables.sql,02_logic.sql,parts/03_data_part01.sqltoparts/03_data_part06.sqlin order, then06_auth.sqland07_duality.sql.
04_stores.sql creates the ORB_STORES table for readers who skipped the Data Workshop exercise of Chapter 11, and 05_product_images.sql optionally loads the product images. uninstall.sql removes every ORB_ object.
Oracle Database 19c has no SQL BOOLEAN data type and no JSON relational duality views. For 19c, the _19c scripts make the yes/no columns (ORB_SUPPLIERS.IS_ACTIVE, ORB_PRODUCTS.IS_ACTIVE, and ORB_STORES.FLAGSHIP) VARCHAR2(1) with 'Y' and 'N', as Chapter 12 describes, and leave out the duality view of Chapter 40:
cd sql/orbit
sql orbit@localhost:1521/ORCLPDB1 @install_19c.sqlIn SQL Workshop ▸ SQL Scripts, run 01_tables_19c.sql, 02_logic.sql, parts/03_data_part01_19c.sql, parts/03_data_part02.sql to parts/03_data_part06.sql in order, then 06_auth.sql. Use 04_stores_19c.sql instead of 04_stores.sql.
Where the book shows a BOOLEAN column as a switch or check box, set the item's or column's Data Type to VARCHAR2 and its On Value and Off Value to Y and N. The finished application apex/f100.sql was built on Oracle AI Database 26ai, where these columns are BOOLEAN.
The sample data is generated relative to the current date, so the orders always span the two years up to the day you install it. Your numbers therefore differ slightly from the book's screenshots.
apex/f100.sql is the Orbit Sales application as it stands at the end of the book. Its supporting objects install everything it needs, so the three steps above are enough:
- The tables, triggers, package, views, and sample data of the Orbit Outfitters schema, unless the schema already has them. On Oracle Database 19c, the 19c versions of the scripts (see On Oracle Database 19c).
- The Administrator role for you, the developer who imports the application. Other users of the workspace can open the application and view the data; to change data they need the Contributor or Administrator role, which you assign in Shared Components ▸ Application Access Control (see Who may do what).
- The users and password checking of Chapter 35, only if the schema may execute
SYS.DBMS_CRYPTO(often not on hosted APEX). The application doesn't need them.
The Content Security Policy of Chapter 36 is set as Content-Security-Policy-Report-Only in this export: the browser reports violations in its console but blocks nothing, because hosted services such as apex.oracle.com load APEX's own files from another address, which the strict policy would block. To enforce it on your own server, change the header name in Shared Components ▸ Security Attributes ▸ HTTP Response Headers to Content-Security-Policy.
If you skipped Install Supporting Objects during the import, install them later: open the application in App Builder, choose Supporting Objects, and click Install Supporting Objects. If the import offers Auto Assign New Application ID, keep it when application 100 already exists in your instance.
Some features need configuration that an application export cannot carry:
- Generative AI (Chapter 44) needs an AI service in Workspace Utilities ▸ Generative AI. Select it in the application's Shared Components ▸ AI Attributes.
- E-mail (Chapter 43) needs an SMTP server configured by the instance administrator.
- Automations are disabled after an import; enable them in Shared Components ▸ Automations.
- Maps, REST data sources, and AI services need network access for the APEX engine (Chapters 3 and 48).
- Approvals and workflows (Chapter 42) use the Approver role; assign it in Shared Components ▸ Application Access Control.
- The REST services of Chapter 45 are defined in ORDS, not in the application; run
sql/examples/ch45-rest-sales-module.sqlandsql/examples/ch45-autorest-client.sqlto create them.
Each file in sql/examples belongs to the chapter in its name, for example ch31-get-customer-info.sql for the Ajax callback of Chapter 31 or ch44-order-lookup.sql for the AI tool of Chapter 44. The chapters show where each one goes.
The folder api-book belongs to the second book, Oracle APEX 26.1 API by Example: JavaScript and PL/SQL Built-ins with Practical Examples. It holds the API Lab application and a runnable example, with its output, for every method and event of the APEX JavaScript API and every procedure and function of the APEX PL/SQL packages, plus the book's JavaScript recipes. The examples use the same ORBIT schema. See api-book/README.md.
- 📘 About the book: vinish.dev/oracle-apex-26-api-by-example-book
- 📖 Paperback on Amazon: amazon.com/dp/B0HL1R8HLP
- 📱 Kindle edition on Amazon: amazon.com/dp/B0HKZXR17R
If you find an error in the book or the code, please open an issue in this repository or write through vinish.dev. Corrections are listed here and fixed in later printings.
- Saving a customer fails with ORA-54017 (UPDATE operation disallowed on virtual columns). The Create Application wizard (Chapter 13) makes the item
P3_CUSTOMER_NAMEof the Customer form writable, butCUSTOMER_NAMEis a virtual column ofORB_CUSTOMERS. In Page Designer, selectP3_CUSTOMER_NAMEon page 3 and switch on Source ▸ Query Only.apex/f100.sqlincludes this fix.
