Introduction: The Fragmentation of Prescriptive Analytics
Modern data science workflows often culminate in "Prescriptive Analytics" (PA), where data management, machine learning (ML) predictions, and optimization solvers are combined to drive decision-making. However, this workflow is currently hindered by extreme fragmentation. Analysts must frequently "ship" data between relational databases, ML libraries like Scikit-learn, and specialized optimization solvers like Gurobi.
This fragmentation creates a "data shipping tax," leading to significant I/O bottlenecks, steep learning curves for multiple languages, and reduced developer productivity. SolveDB+ addresses these issues by bringing predictive modeling and optimization directly into the RDBMS, covering the full spectrum from data collection to optimization.
Methods: Extending SQL for Optimization
SolveDB+ is built on PostgreSQL and introduces several novel extensions to the SQL standard to handle the entire PA lifecycle:
- SOLVESELECT Syntax: A new declarative statement for defining decision variables, objective functions, and constraints directly within a query.
- Predictive Framework & Advisor: An automated in-DBMS pipeline for data preparation, training, validation, and prediction. The advisor can automatically select and tune the best model for a given dataset.
- Common Decision Table Expressions (CDTEs): An extension of standard SQL CTEs that allows for the definition of decision variables as temporary tables, simplifying complex problem specifications.
- Shared Models as UDTs: Optimization models are treated as first-class database citizens using User-Defined Types (UDTs), enabling reusability and "inlining" into larger problems.
Key Insights and Comparative Landscape
The core philosophy of SolveDB+ is that SQL’s declarative nature is inherently suited for optimization. By declaring constraints rather than imperative logic, the database can leverage its internal solver more efficiently and avoid the overhead of transferring data across tool boundaries.
As shown in the comparison above, SolveDB+ is unique in its ability to support the full spectrum of prescriptive analytics—prediction (Pred), estimation (Est), optimization (Opt), and modeling (Mod)—within a unified SQL environment. Traditional systems like Oracle or specialized tools like MADlib only cover fragments of this lifecycle.
Evaluation and Results
The system was evaluated using two primary use cases: Energy Planning (using the NIST dataset) and Supply Chain Management (using the TPC-H dataset).
- Productivity: In usability studies, SolveDB+ required 1.5x to 3.5x less code than traditional stacks (e.g., PostgreSQL + Python + MADlib). For specific PA problems, it achieved up to a 5x reduction in code complexity.
- Performance: The system achieved a 3.5x speedup for end-to-end workflows and was up to 6x faster for specific forecasting tasks.
- Scalability: In supply chain scenarios, SolveDB+ outperformed traditional setups by two orders of magnitude because it handled hyper-parameter optimization and model validation much more efficiently within the database engine.
Limitations and Future Work
While SolveDB+ significantly reduces total code volume, the relational nature of SQL can still lead to verbose mathematical expressions compared to matrix-heavy languages like Python. Future work will focus on supporting distributed processing, integrating "What-If" analysis for hypothetical scenario testing, and adding support for more diverse ML model formats.
Summary updated