DB Connection
How to connect databases and analyze data with AI
What is DB Connection?
Loom can connect directly to databases, allowing you to query and analyze data using natural language without SQL.
Supported Databases
- PostgreSQL
- MySQL
Connecting a Database
- Open the Tools > Database menu in Settings
- Select the database type (PostgreSQL or MySQL)
- Enter the connection URL:
- PostgreSQL:
postgres://user:password@host:5432/database - MySQL:
mysql://user:password@host:3306/database
- PostgreSQL:
- Click Save
Schema Documentation
Add schema documentation to help AI better understand your database structure. Describe tables, column meanings, and relationships in natural language for more accurate query generation.
Query Data with Natural Language
Query data with natural language without knowing SQL:
"Tell me the number of users who signed up this month"
"Show me the top 10 products by revenue"
"Summarize orders by region"
AI converts natural language to SQL, executes it, and shows the results.
Data Analysis
Analyze queried data immediately:
"Show monthly sales trends as a chart"
"Analyze customer churn rate"
"Analyze characteristics of customers with high repurchase rates"
Combining Files and DB Data
Use local files and database data together:
"Compare DB order data with this Excel budget file"
"Extract VIP customers from the customer DB and create email drafts using the marketing template"
Analyzing File Data Directly
You can analyze data files like CSV, Excel, and JSON directly without a database connection. Open a data file in the file viewer and ask the AI your questions:
"Show me total sales by region from this CSV file"
"What was the best-selling product in March from this Excel file?"
"Merge these two CSV files by customer ID and compare them"
Team Sharing
Use DB connections shared by your team. Shared connections appear in the settings screen and can be applied with one click.
Security
- Connection information is encrypted and stored locally
- Using read-only accounts is recommended