Database Schema Explorer
Pricing
from $0.01 / 1,000 results
Database Schema Explorer
This Apify Actor connects to various types of databases (SQLite, PostgreSQL, MySQL, Oracle, Microsoft SQL Server), explores their schemas, provides detailed information about tables and columns, shows row counts, and optionally reads sample data.
Pricing
from $0.01 / 1,000 results
Rating
0.0
(0)
Developer

Balasai Sigireddy
Actor stats
0
Bookmarked
2
Total users
0
Monthly active users
4 days ago
Last modified
Categories
Share
This Apify Actor connects to various types of databases (SQLite, PostgreSQL, MySQL, Oracle, Microsoft SQL Server), explores their schemas, provides detailed information about tables and columns, shows row counts, optionally reads sample data, and can generate visual schema diagrams.
Supported Databases
| Database Type | Connection Method | Status |
|---|---|---|
| SQLite | File upload or connection string | ✅ Fully Supported |
| PostgreSQL | Connection string | ✅ Fully Supported |
| MySQL | Connection string | ✅ Fully Supported |
| SQL Server | Connection string | ✅ Fully Supported |
| Oracle | Connection string | ⚠️ Requires Oracle client |
Database Connection Examples
- SQLite:
sqlite:///path/to/database.dbor upload.dbfile - PostgreSQL:
postgresql://user:password@host:port/database - MySQL:
mysql://user:password@host:port/database - SQL Server:
mssql://user:password@host:port/database
Input Parameters
db_type: Database type (sqlite, postgresql, mysql, oracle, mssql)connection_string: Database connection string (e.g., 'sqlite:///database.db' or 'postgresql://user:pass@host:port/db'). For SQLite, you can alternatively upload a database file.sqlite_file: Upload a SQLite database file (.db) to explore (only for SQLite databases)tables_to_explore: List of specific table names to explore (optional, explores all if empty)include_sample_data: Whether to include sample data (default: true)max_sample_rows: Maximum number of sample rows per table (default: 10)generate_schema_image: Whether to generate a visual diagram of the database schema (default: false)diagram_type: Type of diagram to generate (mermaid, plantuml, graphviz) - required if generate_schema_image is trueoutput_format: Output format for the diagram (png, svg, pdf) - required if generate_schema_image is true
Output
The Actor outputs structured JSON data to a dataset, containing for each table:
- Table name
- Row count
- Column details (name, type, nullable, default)
- Sample data (if requested)
If schema image generation is enabled, a visual diagram is also stored in the key-value store.
Example Output Structure
{"table_name": "users","row_count": 5,"columns": [{"name": "id","type": "INTEGER","nullable": false,"default": null},{"name": "name","type": "TEXT","nullable": false,"default": null}],"sample_data": [{"id": 1,"name": "Alice Johnson","email": "alice@example.com"}]}
Schema Visualization
When generate_schema_image is enabled, the Actor generates a visual diagram of your database schema using one of three supported diagram types:
Diagram Types
- Mermaid: Clean, modern ER diagrams using Mermaid.js
- PlantUML: Traditional UML entity-relationship diagrams
- Graphviz: Record-based table representations using DOT language
Output Formats
- PNG: Raster image format (default)
- SVG: Scalable vector graphics
- PDF: Portable document format
The generated diagram includes all explored tables with their column names, data types, and nullability constraints. The image is stored in the Actor's key-value store and can be accessed via the output schema template.
Quick Start
🚀 Try it now: Run on Apify
For SQLite Testing
- Download the included
dummy.dbfile from this repository - Go to the Actor page
- Upload the
dummy.dbfile as the SQLite file parameter - Run the actor and explore the results!
For Other Databases
- Set your database connection parameters
- Choose the appropriate database type
- Run the actor to explore your database schema
Testing with Dummy Database
A sample SQLite database (dummy.db) is included in the repository for testing purposes. It contains:
- users table: 5 users with id, name, email, age, created_at
- products table: 5 products with id, name, price, category, stock
- orders table: 20 sample orders linking users and products
You can upload this file when testing the Actor with SQLite database type.
Local Development
To run the Actor locally:
$apify run
Deploy to Apify
✅ Already Deployed! This actor is live at: https://console.apify.com/actors/OFPqTSGvR8YnLhU5h
Connect Git repository to Apify
If you've created a Git repository for the project, you can easily connect to Apify:
- Go to Actor creation page
- Click on Link Git Repository button
Push project on your local machine to Apify
You can also deploy the project on your local machine to Apify without the need for the Git repository.
-
Log in to Apify. You will need to provide your Apify API Token to complete this action.
$apify login -
Deploy your Actor. This command will deploy and build the Actor on the Apify Platform. You can find your newly created Actor under Actors -> My Actors.
$apify push
Documentation reference
To learn more about Apify and Actors, take a look at the following resources: