Generates MATLAB Object Relational Mapping (ORM) code using Database Toolbox.
SkillScore100Maintained
Automatic
◆Coding pack
Last verified 8/16/2026
What it changes
Passed 24 of 24 test cases with the skill, and 11 of 24 without it.
Without skill46%
With skill100%
Checks it passed that the model alone missed
Uses the orm2sql function.
Calls ormread with RowFilter.
Pushes updates using ormupdate.
and 15 more in the full report
13 fixed11 passed either way0 still failing0 broke
Pass-rate lift
+54 pp
Tokens
+127%
Agent turns
0%
Response time
-52%
Model gemini-3.6-flashMeasured 8/16/2026v124 of 24 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 13 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 13
Prompt
Write the MATLAB code statement to refresh an existing mapped object instance named empObj with current values from database connection conn.
What was checked, without and with the skill
Checked
Without skill
With skill
Re-reads object state using ormread(conn, empObj).
Missed
Passed
case-10 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md383 linessingle file
MATLAB Object Relational Mapper
Use when mapping MATLAB classes to relational database tables using the Object Relational Mapping (ORM) layer in Database Toolbox. Defines Mappable classes with property-to-column mappings and uses ormread, ormwrite, and ormupdate for CRUD operations on objects. Available since R2023b.
When to Use This Skill
Mapping MATLAB classes to database tables
Reading database rows as MATLAB objects
Writing MATLAB objects to database tables
Updating database rows from modified objects
Generating SQL CREATE TABLE from a class definition
Object-oriented database workflows
User mentions keywords: ORM, object relational mapping, Mappable, ormread, ormwrite, ormupdate, orm2sql, class mapping, property mapping, object database
When NOT to Use
Ad-hoc queries or data exploration — use sqlread/fetch with RowFilter instead
Bulk imports/exports of thousands of rows — ORM is slower than sqlwrite/sqlread for bulk operations
MongoDB, Cassandra, or Neo4j — ORM only works with relational databases (JDBC, ODBC, native MySQL/PostgreSQL/SQLite)
MATLAB releases before R2023b — ORM is not available
Critical Rules
ORM Requirements
ALWAYS inherit from database.orm.mixin.Mappable — this is required for ORM functionality.
ALWAYS define at least one PrimaryKey property — ORM requires it for identity.
ALWAYS use class-level attribute TableName to specify the database table name.
ALWAYS include a constructor that handles nargin == 0 (allows preallocation by ORM).
ORM requires R2023b or later.
Supported Connections
ORM works with: JDBC, ODBC, PostgreSQL native, MySQL native, SQLite native, DuckDB native.
ORM does NOT work with: MongoDB (mongoc), Cassandra (apacheCassandra), or Neo4j.