The core of OpenNMS uses PostgreSQL. It can be on the same server for smaller deployments, but we recommend using a separate cluster for better performance in larger networks.
Depending on which features you configure, you may require other data stores. Our telemetry/flow collection service requires an Elasticsearch cluster. By default, performance metrics are stored in RRD files, and there is an option to replace those with a Cassandra or ScyllaDB cluster.