What Is an Object-Relational Database? Extend Relational Tables with Richer Types
An object-relational database management system (ORDBMS) keeps the relational table and SQL model while adding features such as user-defined types, composite values, and functions. PostgreSQL describes itself as an ORDBMS. “Object-relational” here is different from an ORM, which maps application objects to database rows. It means extending how values are represented and processed while still managing data relationally.
What does it add to the relational model?
In the basic relational model, each column has a defined type and each row groups those values. Object-relational features can define a composite type for fields that are often handled together, or add domain-specific types, functions, and operators. PostgreSQL supports composite, enum, and range types and lets functions process such values.
Suppose an application needs to pass customer addresses in a consistent shape. PostgreSQL can define a composite type and use it as a table column:
CREATE TYPE postal_address AS (
city text,
region text,
postal_code text
);
CREATE TABLE customer (
id bigint PRIMARY KEY,
name text NOT NULL,
address postal_address NOT NULL
);
SELECT (address).city, (address).region FROM customer WHERE id = 42;This is an illustrative PostgreSQL example, not executed code. A composite value makes related fields convenient to pass to a function or query, but treating it as one large object can make field-level search and validation less clear. PostgreSQL documents that a composite type itself cannot declare field constraints such as NOT NULL. Decide whether table-column constraints, a domain, or a normalized separate table should enforce the rules.
How is an ORDBMS different from an ORM?
An ORM is an application-side mapping tool or approach that connects program objects to database rows, columns, and keys. An ORDBMS refers to type and function extensions provided by the database engine. You can use object-relational features without an ORM, and an ORM can target a traditional relational database.
The two layers can work together, but define the boundary. Whether an ORM maps a database composite type as one value or expands it into properties depends on the driver and mapping configuration. Check whether the database schema enforces the intended constraints, whether ORM changes share a transaction, and whether existing clients can read the new shape after migration.
When are object-relational extensions useful?
They can help when reusable domain types or database functions recur in one product and relational keys, constraints, joins, and transactions are still needed. Composite types may suit values such as coordinates or addresses that travel together. If fields need independent searches, constraints, or permissions, ordinary columns or a separate table may be clearer.
Custom types and functions can tie an application to product-specific syntax and behavior. If portability across database products matters, or client tools do not understand the new type, consider standard scalar types and tables first. Choose based on where the value is validated, how it is queried, and what compatibility cost changes will create—not just on the feature label.
Sources and scope
[PostgreSQL 19: What Is PostgreSQL?](https://www.postgresql.org/docs/current/intro-whatis.html)
[PostgreSQL 19 Composite Types](https://www.postgresql.org/docs/current/rowtypes.html)
[PostgreSQL 19 CREATE TYPE](https://www.postgresql.org/docs/current/sql-createtype.html)
PostgreSQL 19 documentation checked 2026-11-22 provides the implementation examples. Object-relational features vary by product; PostgreSQL-specific composite-type behavior should not be generalized to every ORDBMS.