Main Content

Object Relational Mapping

Read, write, and update details of objects on relational databases by using object relational mapping

The object relational mapping (ORM) software layer allows MATLAB® to interact directly with relational databases. You can read, write, and update the details of objects which are stored as rows in the database table. Relational databases currently supported by Database Toolbox™ include:

  • JDBC

  • ODBC

  • PostgreSQL Native

  • MySQL Native

  • SQLITE Native


database.orm.mixin.MappableProvide attributes for defining how subclasses map to relational database tables (Since R2023b)


ormwriteInsert mappable objects into database
ormreadRead mappable objects from database
ormupdateUpdate database tables using object relational mapping


orm2sqlConvert object relational mapping class to query (Since R2023b)



Resolve Issues with Object Relational Mapping

Address common errors when using object relational mapping methods.