> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ideaboxai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Working with structured data

> Connect a database, explore the schema, and enrich metadata with AI for structured knowledge bases.

After creating a structured knowledge base, you connect it to a database and explore the imported schema. This guide walks you through entering connection credentials, browsing tables, and enriching metadata.

## Connect your database

Enter the connection credentials for your database.

| Field             | Description                                         |
| ----------------- | --------------------------------------------------- |
| **Host**          | Database server address.                            |
| **Port**          | Connection port, for example `5432` for PostgreSQL. |
| **Database Name** | The specific database to connect.                   |
| **Username**      | Authentication username.                            |
| **Password**      | Authentication password.                            |
| **SSL Mode**      | Security settings for the connection.               |

<img src="https://mintcdn.com/ideabodxai/cNlvJ38WQc9bYQcY/images/knowledge-bases/connect-external-data-source.png?fit=max&auto=format&n=cNlvJ38WQc9bYQcY&q=85&s=d396c5d69893cb638352a8f0e4662934" alt="Connect External Data Source dialog showing database type selector and credential fields for Host, Port, Database Name, Username, Password, and SSL Mode." className="rounded-xl border border-gray-200 shadow-md hover:shadow-2xl transition-all duration-300" width="1917" height="955" data-path="images/knowledge-bases/connect-external-data-source.png" />

<img src="https://mintcdn.com/ideabodxai/cNlvJ38WQc9bYQcY/images/knowledge-bases/enter-credentials.png?fit=max&auto=format&n=cNlvJ38WQc9bYQcY&q=85&s=6f7464cacc2a4e3c82b8a5ea9f81e287" alt="Database credential entry form with fields for Host, Port, Database Name, Username, Password, and SSL Mode, along with connection test and submit buttons." className="rounded-xl border border-gray-200 shadow-md hover:shadow-2xl transition-all duration-300" width="1917" height="955" data-path="images/knowledge-bases/enter-credentials.png" />

After a successful connection, IdeaBoxAI imports the database schema automatically.

## Explore the Datasets view

Once connected, the Datasets view displays a schema visualization of your database.

* **Data Sets sidebar**: Lists all imported database tables.
* **Table relationships**: Shows joins and foreign key relationships between tables.
* **AI enrichment**: Options to enhance metadata with AI, add semantic definitions, and define relationships.

<img src="https://mintcdn.com/ideabodxai/0pAPZ_aPFgZJqHZJ/images/knowledge-bases/datasets-view.png?fit=max&auto=format&n=0pAPZ_aPFgZJqHZJ&q=85&s=b99e9241c87e04a5de1d94220ee4328b" alt="Datasets view showing database tables in the sidebar, table relationships in the main panel, and options to enhance with AI, add semantics, and define relationships." className="rounded-xl border border-gray-200 shadow-md hover:shadow-2xl transition-all duration-300" width="1918" height="983" data-path="images/knowledge-bases/datasets-view.png" />

From this view you can:

* Browse all database tables and their columns.
* Define joins and relationships between tables.
* Enhance schema metadata using AI assistance.
* Document business logic for columns and tables.

**Best practices**

* Validate relationships against source database constraints.
* Avoid circular or ambiguous joins.
* Document semantic definitions clearly so agents can reason about your data.

The result is a semantically enriched data model ready for analytics and AI queries through cubes.
