Create a New Dataset
Use these steps if you are a PostgreSQL administrator creating a new database, schema, and user for FDSA to connect to.
Important:
- FDSA only supports PostgreSQL databases.
- The maximum size supported for each schema/dataset is 500 MB.
- Do not use the root user’s credentials or the `public` schema when adding a data source in FDSA.
When adding a data source in FDSA, avoid using the root user's credentials and refrain from saving datasets under the 'public' schema. Follow these instructions:
- Login as root user (or whatever admin user you have) to your database server
psql -h <HOST IP/url> -p <PORT> -U <user> postgres - Create a new user (the one we are going to use to add the DB to FDSA)
CREATE USER <username> WITH PASSWORD '<password>';
Note: The <username> and <password> used here are the ones required when adding a Data Source. - Give access to the new user
ALTER USER <username> CREATEDB;ALTER USER <username> CREATEROLE; - Exit and login with the new user:
\qpsql -h <HOST IP/url> -p <PORT> -U <username> postgres - As “<username>”, create the data source DB and switch to it.
CREATE DATABASE <test-database>;\c <test-database> - Then create a schema/dataset and add your research data there:
CREATE SCHEMA <test-dataset>;
To ensure queries and joins work correctly in the Query Builder:
– Add tables with their required columns.
– Define primary keys on each table.
– Configure foreign keys to represent relationships.
– Add appropriate indexes to support performant joins.
What's Next
Next, go to FDSA → Connect Data to add this database as a data source and register your new dataset.