Introduction
This chapter introduces the Data section of Oracle Backend with Supabase APIs. It explains how Oracle Backend with Supabase APIs stores and exposes application data, and how you work with that data through SDKs and REST APIs. It also sets expectations for what is covered later in this section, including security, indexing, and advanced data features.
Overview
The Database section explains how to create tables, read and write rows, query related data, and control access with Deep Data Security (DDS).
The SDK uses a relational client with chainable methods such as from(), select(), insert(), and update(). Start with Data Model, then follow Getting Started and Console Check.
Key Terms
The following terms describe the relational API:
- Table: A database object that stores rows with a defined set of columns.
- Row: One record in a table.
- Column: A named field with a database data type.
- Primary key: A column or combination of columns that uniquely identifies a row.
- Foreign key: A constraint that relates values in one table to a primary or unique key in another table.
- View: A named database query that you can query through
from(). - Relational client: The SDK object returned by
createClient(). - Data Grant: A DDS policy that authorizes operations on database objects for specified Data Roles.
- Index: A database structure used to support data access. Manage indexes with SQL.
Data Models
Application data is stored in relational tables in the project schema. Define columns and constraints in the database, then use the SDK to operate on the corresponding tables and views.
Use projections to select columns, assign aliases, retrieve related rows, and calculate aggregates. Use JSON paths when filtering fields inside JSON columns.
For details, see Data Model.
What You Will Learn in This Section
This part covers the following tasks:
- Create and manage tables with SQL.
- Initialize a relational client and insert and read a row.
- Filter, order, and paginate query results.
- Insert, update, delete, and upsert rows, including arrays of rows.
- Query views and related tables, calculate aggregates, and call stored routines.
- Configure relation-specific offline caching and queued writes.
- Authorize access with DDS Data Roles, Data Grants, and end-user context.
- Inspect database responses and handle request failures.
How to Use This Section
Follow this reading path:
- Read Data Model for tables, keys, relationships, and views.
- Complete Getting Started and Console Check with your registered web app.
- Use Row Operations for everyday queries and writes.
- Read Database Access Control to restrict access to your data.
- Continue with Advanced Features, Indexing and Performance, and Access Data Offline in JavaScript Applications.
- Use Using Database SDK and Errors and Troubleshooting as references.