What problem does it solve?
Working with relational databases from MATLAB involves many subtle API rules—positional arguments, pushdown filtering, transaction handling, and ORM conventions—that are easy to get wrong, leading to slow queries, broken transactions, or accidental data loss. This Skill gives an AI agent the correct patterns for the full database lifecycle so generated MATLAB code follows Database Toolbox best practices.
Core Features & Use Cases
- Reading with pushdown filtering: Import tables with
sqlread or run SQL queries with fetch, using RowFilter and databaseImportOptions so filtering happens on the database server instead of in MATLAB.
- Writing, updating, and transactions: Insert with
sqlwrite, update rows with sqlupdate, and wrap multi-step operations in transactions using AutoCommit, commit, and rollback with proper error handling.
- ORM and advanced workflows: Map MATLAB classes to tables with
Mappable and ormwrite/ormread/ormupdate, run stored procedures and prepared statements, and scale to multithreaded I/O with parfeval (R2026a+).
- Use Case: Connect to a PostgreSQL production database, read only active orders placed after a date using server-side filtering, update prices in place, and commit both changes atomically—all with securely stored credentials via
setSecret/getSecret.
Quick Start
Ask the agent to connect to your database and read rows from a table filtered by a column condition using MATLAB Database Toolbox.