Modern applications increasingly use a polyglot database architecture, combining the structured reliability of MySQL with the flexibility of MongoDB, the analytical capabilities of PostgreSQL, or the enterprise features of Oracle and MSSQL. While this approach supports better scalability and data modeling, querying and joining related data across multiple databases remains one of the biggest challenges in multi-database environments.
API Maker’s Find & Join feature addresses this challenge by enabling real-time, cross-database joins and advanced filtering between MySQL and other databases—all through REST APIs, without writing custom backend code, SQL joins, or sync scripts.
Many organizations use MySQL alongside other specialized databases to meet diverse data needs:
However, joining data across these databases especially in real time has historically been difficult. Developers often face challenges such as:
These traditional methods are time-consuming, brittle, and difficult to scale. As data ecosystems grow more complex, the need for a simpler, more unified approach to cross-database joins becomes critical.
API Maker’s Find & Join feature is designed to simplify cross-database queries by enabling seamless, schema-based joins between MySQL and a wide range of other databases—including MongoDB, PostgreSQL, MariaDB, MSSQL, Oracle DB, TiDB, Percona XtraDB, and even multiple MySQL or MongoDB instances.
With Find & Join, you can:
To enable cross-database joins between MySQL and another supported engine, define the relationship directly in your schema using API Maker’s table schema configuration. This schema acts as the blueprint for resolving joins dynamically at runtime.
Let’s say you have:
orders
table in MySQLcustomers
collection in MongoDBEach order record in MySQL includes a customer_id
that references a customer in MongoDB.
In your API Maker schema for the MySQL orders
table, define the relationship like this:
customer_id: {
__type: EType.string, // Match the target field type
instance: "Mongo", // Target database engine
database: "crm", // Target database name
table: "customers", // Target table or collection
column: "_id" // Field in the target table or collection}
}
This tells API Maker how to fetch and link related records automatically during query execution.
When you call the orders
API, the platform will automatically join and return the linked customer data from MongoDB—without requiring any custom backend code or manual joins. The same approach works across any supported combinations, including MySQL → PostgreSQL, MySQL → MSSQL, or even MySQL → MySQL (across instances).
Once your schema is configured, you can immediately perform cross-database joins using standard GET or POST API requests. API Maker automatically resolves relationships across databases—so you can filter, sort, and paginate using joined fields, with no backend logic required.
Suppose you want to retrieve all orders from MySQL where the associated MongoDB customer has a "premium"
tier:
GET /api/orders?find={"customer_id.tier":"premium"}
Here, customer_id.tier
uses dot notation to reference a field inside the related MongoDB document. API Maker will automatically join and merge the relevant customer data into the MySQL response.
Want to fetch recent orders placed by active customers who signed up after January 1, 2024—and limit results to the top five?
POST /api/orders/query
Content-Type: application/json
{
"find": {
"customer_id.created_at": { "$gte": "2024-01-01" },
"customer_id.status": "active"
},
"limit": 5,
"sort": {
"customer_id.created_at": -1
}
}
This will return the five most recent MySQL orders placed by MongoDB customers who are active and joined after the specified date, sorted in descending order by creation time.
API Maker supports deep, N-level nested joins—across both SQL and NoSQL systems. For example, if:
orders
reference MongoDB customers
customers
reference PostgreSQL distributors
You can query distributor fields (from PostgreSQL) through the customer (from MongoDB), while querying orders (from MySQL)—all in a single request. Just extend your schema and use dot notation like:
"find": {
"customer_id.distributor_id.region": "Europe"
}
API Maker will automatically resolve all joins in real time, across databases.
API Maker’s Find & Join feature works across all major SQL and NoSQL databases, making it ideal for modern, distributed data architectures.
Supported databases include:
You can define unlimited cross-database relationships—even within a single table. For example:
Joins are fully flexible:
All joins are resolved dynamically at runtime, with no data replication or sync scripts required. Learn more in the Find & Join documentation.
Building cross-database joins using traditional methods often requires:
API Maker’s Find & Join feature eliminates these complexities by offering a declarative, no-code approach to joining data across MySQL and any supported database engine—instantly, and at runtime.
Comparison with Other Backend Platforms
Capability | API Maker | Appwrite | Supabase | Firebase |
---|---|---|---|---|
Cross-Database Joins (e.g., MySQL ↔ MongoDB) | Supported | Not Supported | Not Supported | Not Supported |
Unlimited Nested Joins | Fully Supported | Not Supported | Basic Joins Only | Not Supported |
Real-Time REST APIs | Full Support | Partial Support | Supported | Firestore Only |
Declarative, Schema-Based Configuration | Yes | No | Limited | No |
Works with MySQL and All Supported Engines | Yes | No | No | No |
API Maker stands apart as the only platform designed for true cross-database querying, delivering:
Maximize the efficiency and reliability of your cross-database joins by following these guidelines:
customer_id
in MySQL or _id
in MongoDB) are indexed to improve join performance and query speed.select
) and targeted filters (find
) to reduce data transfer and speed up responses—especially when dealing with deeply nested or multi-way joins.These practices ensure your APIs remain fast, scalable, and maintainable—even as your schema and data complexity grow.
Yes. You can create joins from MySQL to any supported database (e.g., MongoDB, PostgreSQL, MSSQL) or vice versa. Just configure the relationships in your schema, API Maker will handle the rest at query time.
Use dot notation based on your schema relationships.
For example: { "customer_id.status": "active" }
This will filter MySQL orders based on the status
field in the related MongoDB customers
collection.
Absolutely. You can define multiple cross-database relationships for a single table (e.g., orders linked to MongoDB customers, PostgreSQL invoices, etc.). API Maker dynamically resolves all joins at runtime.
No. API Maker’s Find & Join feature requires zero backend development, no Node.js, Java, Python, or custom SQL logic. Everything is configured declaratively through the visual schema editor.
API Maker is designed for flexibility. If your architecture changes (e.g., migrating from PostgreSQL to MongoDB), simply update the schema configuration, no code changes required.
Explore how API Maker simplifies cross-database joins and accelerates your development workflow: