Elixir vs MySQL and Snowflake: What Goes Where
Elixir doesn't store your data. MySQL and Snowflake do. So "elixir vs mysql" or "elixir vs snowflake" aren't really either-or choices. Elixir is the language your application is written in, and the database is where that application keeps things.
I still think the searches make sense. If you're picking a stack, you want to know what Elixir works with, what Phoenix picks by default, and whether your existing database or warehouse is a problem. Here's that, short.
The three layers
- Elixir is a programming language. Phoenix is its web framework.
- MySQL is a relational database. It holds your application's data: users, orders, invoices.
- Snowflake is an analytics platform. Its own docs say "Snowflake tables are ideal for data warehouses". You load data into it for reporting and analysis, not to run the app on.
A typical setup has all three: Elixir runs the app, a relational database stores the live data, and a warehouse like Snowflake gets copies for analysis.
Elixir with MySQL
Elixir talks to databases through Ecto. Ecto ships an adapter for MySQL, so a Phoenix app runs on MySQL fine.
The Phoenix project generator accepts postgres, mysql, mssql and sqlite3 for the database, and defaults to Postgres. That's the path the guides and generators take.
What we did in our accounting SaaS migration: the old system ran on MySQL, and we moved it to PostgreSQL as part of the rebuild. That was our call for that project, not a rule. If your MySQL database is healthy and other systems depend on it, keep it. Changing the language and the database at the same time is more risk than most teams need.
Elixir with Snowflake
You won't run a Phoenix app on Snowflake, but you can read from it and write to it. The Elixir ADBC library has a Snowflake driver, which "provides access to Snowflake Database Warehouses". That's useful for dashboards in your app that show warehouse numbers, or for jobs that push data from the app into Snowflake.
For heavy analysis inside Elixir, there's the Explorer library for dataframes, and Livebook for notebooks, if your team prefers that over SQL in the warehouse console.
Which database for a new Elixir project?
If you're starting from zero, I'd use Postgres. It's the Phoenix default, so you stay on the path the docs describe. Smaller tools can start on SQLite (this website runs on it).
If you already have MySQL, keep it unless you have a concrete reason to move. If you have Snowflake, keep it for analytics and connect the app to it.
One table
| Elixir | MySQL | Snowflake | |
| What it is | Programming language | Relational database | Data platform for warehousing |
| Role | Runs the application | Stores live app data | Stores data for analysis |
| Works with Elixir | Yes, Ecto MyXQL adapter | Yes, ADBC Snowflake driver | |
| Phoenix default | No, Postgres is | No |
Moving an app to Elixir?
The database is usually the easiest part to keep. We start every migration from the schema, because it shows what the system really does. Our legacy modernization page explains how we rebuild module by module, and the Elixir tech stack lists every piece and what it replaces.