# PostgreSQL

This Integration requires Fides Cloud or Fides Enterprise. For more information, [talk to our solutions team. (opens in a new tab)](/content/speak-with-us?utm_source=docs-site/index.html)

[PostgreSQL (opens in a new tab)](https://www.postgresql.org/) is a powerful open-source object-relational database management system (ORDBMS) known for its robustness, extensibility, and adherence to SQL standards.

## Prerequisites [Permalink for this section](/content/docs/integrations/databases/postgresql#prerequisites/index.html)

In order to integrate with PostgreSQL, you'll need to collect the following information from the database administrator:

- `Host`: The hostname or IP address of the server where the database is running.
- `Port`: The network port number on which the server is listening for incoming connections (default: 5432).
- `Username`: The user account used to authenticate and access the database.
- `Password`: The password used to authenticate and access the database.

You may optionally configure the following information:

- `Database`: The name of the specific database within the database server that you want to connect to.
- `Schema`: The default schema to be used for the database connection (defaults to public).

## Integrating with PostgreSQL [Permalink for this section](/content/docs/integrations/databases/postgresql#integrating-with-postgresql/index.html)

To integrate an existing system with PostgreSQL:

1. Navigate to **Data map** → **View Systems** and choose the system that you want to connect to
2. Click on the **Integrations** tab.
3. Pick the vendor or system type that you want to integrate with from the **Connection type** drop-down menu.
4. Complete the required fields for the integration and click **Save**.

You may confirm your connection is working using the **Test connection** button, if desired.

To learn more, please see our guide for [Managing Integrations](/content/docs/integrations/guides/manage-integrations/index.html).

## Configuring a dataset [Permalink for this section](/content/docs/integrations/databases/postgresql#configuring-a-dataset/index.html)

A dataset is required to configure an integration to this database. A dataset is a configuration file that tells Fides how to query and update data in the database. To learn more about how to create and manage datasets, please see our [Managing datasets](/content/docs/integrations/guides/datasets/index.html) guide.

An example PostgreSQL dataset can be viewed in [Github (opens in a new tab)](https://github.com/ethyca/fides/blob/main/data/dataset/postgres_example_test_dataset.yml).

### Dataset Namespace [Permalink for this section](/content/docs/integrations/databases/postgresql#dataset-namespace/index.html)

PostgreSQL datasets support namespaces. This means that the dataset can contain the **database name** and **schema** that will be used when accessing or masking data from a given PostgreSQL table. If namespace information is not included, the dataset will use the default database and the `public` schema from the associated integration.

```
dataset:
  - fides_key: postgres_example_test_dataset
    name: Postgres Example Test Dataset
    description: Example of a Postgres dataset containing a variety of related tables like customers, products, addresses, etc.
    fides_meta:
      namespace:
        database_name: my_database
        schema: public
    ...
```

[MySQL](/content/docs/integrations/databases/mysql "MySQL"/index.html) [Snowflake](/content/docs/integrations/databases/snowflake "Snowflake"/index.html)
