MySQL, SQLite and Other Engines
Know the other common relational engines and how they differ from PostgreSQL, in case your job uses one.
Beginner · about 6 hours · difficulty 2/5
Learn first: Writing SQL Queries
Relational databases share SQL and core concepts, so once you know one, switching is mostly about learning differences. Pick one of these instead of PostgreSQL only if your team or target job uses it.
- MySQL: hugely popular, especially with PHP and in older web stacks. Use the InnoDB engine (the default) for transactions. Watch for differences in default isolation level (REPEATABLE READ), case sensitivity and older lax modes that silently truncated data; enable strict SQL mode.
- MariaDB: a community fork of MySQL, largely compatible, with its own features.
- SQLite: an embedded database in a single file, no server process. Perfect for local development, tests, mobile apps, CLI tools and even small production sites. Limited concurrent writes.
- Microsoft SQL Server: common in enterprise and .NET shops, uses the T-SQL dialect.
- Oracle Database: common in large enterprises and finance, with its own PL/SQL dialect and licensing costs.
How to switch engines smoothly
Learn the dialect differences: auto-increment syntax, upsert syntax, string functions, date handling and pagination. ORMs smooth over many of these but not all.
Pitfalls
- Assuming behavior is identical. Test migrations and edge cases on the engine you run in production, not just SQLite in tests.
You are ready to move on when you can take a schema written for PostgreSQL and port it to one other engine, noting every change you needed.
Key concepts
- MySQL (InnoDB)
- MariaDB
- SQLite: Great for tests, prototypes and embedded use.
- Microsoft SQL Server
- Oracle Database
- SQL dialect differences
Other options for this step
- PostgreSQL: Run, configure and use PostgreSQL, a powerful open source relational database and our default pick.
Mini project
Port a small PostgreSQL schema and five queries to MySQL and SQLite, documenting each syntax or behavior difference you hit.
Check yourself
When is SQLite a perfectly good production database, and when is it the wrong choice?
Free resources
- MySQL documentation (Oracle)
- SQLite documentation (SQLite)
- SQL Server documentation (Microsoft Learn)