Automate AI Model Building in SkySQL: MariaDB & MindsDB Collaboration
Tags: datascience, mariadb, machinelearning, mindsdb
Published: 2022-06-08 09:27:33

_By Jags Ramnarayan (VP & General Manager, SkySQL) and Jorge Torres (CEO, MindsDB)_

Your GPS navigation service uses machine learning to analyze traffic data and predict high-congestion areas on your road trips. Facebook uses machine learning to personalize users’ news feeds, populating it with posts by people whose previous posts you’ve consistently “liked” (and conversely, reducing the appearance of posts by people with whom you interact with less). And Netflix uses it to make recommendations of shows and movies to enjoy. 

AI will fuel a potential 26% boost in local economies and a predicted $15.7 Trillion in global economy by 2030, [according to PWC](https://www.pwc.com/gx/en/issues/data-and-analytics/publications/artificial-intelligence-study.html). The bottom line improves for organizations that leverage Machine Learning (ML) and Artificial Intelligence (AI) as they experience new business efficiency and process improvement. Machine learning increasingly has become a key part of organizations in every industry’s IT portfolio. Successful ML implementations boost revenue, cut costs, and automate operations. Machine learning is a fundamental part of artificial intelligence, it quite literally will teach itself and your business processes to get smarter. It starts with the data. 

Until now, customers who wished to apply machine learning (ML) on data in SkySQL had to extract data out of the database (ETL) and then use third-party libraries or services to train a model or make a prediction. In addition to being onerous, time-consuming and expensive, this process also has the potential to proliferate data outside of the database, causing security and governance issues. Bringing machine learning benefits to market more readily and faster are the key benefits of the collaboration between MariaDB and MindsDB. MindsDB brings the vast world to MariaDBby augmenting the SQL language so that users can, train, and use machine learning models as if they were  database tables.

Given the exponential growth of data, in-SkySQL machine learning speeds decision making at the point of data. MariaDB and MindsDB gets you closer to your data to ask predictive questions about it and get the essential answers you need. And business benefit by working in SkySQL to take advantage of available cloud computing and storage infrastructure as well as enhanced collaboration and access to larger data sets - not to mention data replication, security, scale, availability, and portability of models from one application to another. MindsDB models explore SkySQL data in an interactive, iterative manner while leveraging the cloud to speed customers execution of digital transformation journeys.  

With [MindsDB](https://mindsdb.com/?utm_medium=referral&utm_source=devto&utm_campaign=mariadb-skysql-blog-2022-06) and [MariaDB](https://mariadb.com/?utm_medium=referral&utm_source=devto&utm_campaign=mariadb-skysql-blog-2022-06) businesses can quickly and automatically produce models that analyze any data, no matter its complexity or type, and deliver faster, more accurate results – even on a very large scale. By building precise models, an organization has a better chance of identifying profitable opportunities – or avoiding unknown risks.

## Your SQL Skills & Machine Learning

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gnyp4dorz3njycqig657.png)

MindsDB brings data-centric machine learning to SkySQL. Patterns in your data are used to make predictions on your business through simple queries. Developers and Data scientists build models in MindsDB and score data faster and at scale with no need to extract data from MariaDB to separate analytics engines. This efficiently lets you test, build and deploy predictive models for business results. The value of this relationship lies in the simplicity of model development. The ubiquity of ML and now developers of all strides - don’t need to pick up ML frameworks and concepts. Just SQL is enough.

Computation of joins and aggregations can be done where the data is located, and you can leverage decades of database innovations (leveraging indexes—clustered and non-clustered, in-memory tables, column stores, high-availability and so on).  MariaDB and MindsDB simplify your entry into machine learning. Accelerating your time to value. Utilizing your data for machine learning allows your SQL skills to be utilized so your business acts smarter. When your flight gets canceled, but the airline calls you to let you know they have already re-booked you and got your luggage on the correct flight—that’s data-driven innovation between machine learning and analytics. 

## Why In-Database Machine Learning: Simplicity & Results 

**Simplicity & Time:** You and your team know your data. You know how it’s managed and the security protocols. And you don’t have to procure another database application for ML or migrate data from MariaDB. Leveraging MindsDB allows you to create models directly from your data in SkySQL, leverage your protocols and utilize Xpand’s distributed sql functionality that leverage established security protocols, data availability, replication, and scale. 

By minimizing the number of steps you need to take for more efficient, faster, easier-to-operationalize machine learning. MindsDB models can be executed as data lands in SkySQL, providing both the raw data point and the ML results in the same row in the same table. Using a real-time approach, scoring occurs on the way in, with no second phase needed to run and build scoring. Since the score is there all the time, application complexity is significantly reduced with fewer overall processes to manage.

**Results:** By leveraging MindsDB you will get ML deployed and in production and used by business analysts faster. Users gain an operationalized model with business benefits that you can show to your executive team quickly. You’ll be able to tell them that you have actually improved the business, through machine learning, with results that anyone can point to as proof of something to be proud of.  When combined with a distributed SQL database like Xpand, the system can easily scale to handle the largest incoming workloads from global applications. Additional benefits accrue from high-performance parallel connectors to message queues such as Kafka and execution engines, such as Spark.

Companies either build data science teams within their organizations or leverage external resources and tools for business analytics and data science. ML and AI distill data assets into nuggets of gold that can help them proactively deliver personalized customer experiences (personalized Web sites, product recommendations, customer lifetime value and so on), reduce downtime for equipment (predicting remaining useful lifetime) and more. Leveraging an analytics platform allows MindsDB powered models to continually build insight and value based on interactions between users, models and SkySQL. This human-machine collaboration creates a multiplier effect, where complex business problems can be solved with a human’s perspective, aided by valuable, context-aware insight suggestions.

## Accelerate Machine Learning with SkySQL & MindsDB

AI creates new data-layer challenges for organizations, including handling the proliferation and complexity of inference data. MariaDB SkySQL allows you to run the MindsDB inference engine where the data lives, decreasing latency and increasing simplicity—all coupled with core SkySQL features. Benefits include the ability to:

- Deploy new models with no downtime or performance penalties
- Serve AI over a robust, scalable, and production-proven data platform
- Superior data and model performance, scalability, security
- Leverage existing cloud infrastructure

Data with MindsDB models can be distributed across any MariaDB instance and queried in parallel to increase query performance and support massive datasets. This speeds analysis and model performance for greater AI/ML project success. Leveraging data in the database also means using MariaDB’s extensive security protocols and reduces application development time. And you avoid performance issues during data preparation, model building, and data scoring using the built-in parallelism and scalability of SkySQL.

## Simplify data-driven apps and analytics and get the most out of your data

MindsDB’s open source framework allows ML models to be identified and developed quickly using AutoML and then deployed at speed and scale with AI Tables. By automating model training and deploying workflows while leveraging the data directly at the data layer, MindsDB helps companies increase prediction capabilities and reduce the cost and complexity of model selection, training iteration, and testing. MindsDB enables database users to get predictions as database tables, using simple queries to unlock the value in the data they already have.

Application development teams adopt MindsDB and MariaDB for the simplicity of in-database machine learning, which results in ease of development, integration, and deployment. No-code user interfaces increase accessibility for a broader range of users, including citizen data scientists. Keeping data in the database increases security, scalability, and architectural simplicity.

MindsDB and MariaDB move machine learning projects into production more rapidly and keep them there successfully over time -x3 ensuring continuous value of data to inform business decisions.

Customers can see it live at our webinar on June 21st. Register here [https://mindsdb.com/webinar/getting-to-machine-learning-faster-with-mariadb-skysql-and-mindsdb/](https://mindsdb.com/webinar/getting-to-machine-learning-faster-with-mariadb-skysql-and-mindsdb/?utm_medium=referral&utm_source=devto&utm_campaign=mariadb-skysql-blog-2022-06)