I'm working with unit/integration tests and SQLite doesn't support completely certain SQL features (like RIGHT JOIN and FULL OUTER JOIN). Is there any way to work with MySQL (or MariaDB) where the contents of a database are completely stored in memory?
MySQL has MEMORY table engine, however, this table engine still may generate inconsistency in my tests. What I need is some alternative to :memory: from SQLite but with the same features as MySQL.
Edit:
To be more specific, my problem is related to the performance of the unit/integration tests. Several tutorials indicate using SQLite with database in-memory to speed up the testing process, however, some queries in my application aren't compatible with SQLite. I also do not find it a good practice to do the tests in SQLite if the production database is MariaDB.
My question is whether there is any alternative to testing in MySQL/MariaDB that works the same way as the SQLite :memory: option.
It does not qualify it as in in-memory database. There are other systems that also offer in-memory options; like SQLite.
MariaDB and MySQL both implement standard SQL syntax, including common table expressions and window functions as well as JSON and geospatial functions. However, MariaDB adds the INTERSECT and EXCEPT set operators, linear regression functions and more.
When it comes to performing queries or replication, MariaDB is faster than MySQL. So if you need a high-performance relational database solution, MariaDB is a good choice. In addition, MariaDB also easily supports a high concurrent number of connections without much performance degradation.
MariaDB is an open source relational database management system (DBMS) that is a compatible drop-in replacement for the widely used MySQL database technology.
MariaDB has the MEMORY storage engine:
It is best-used for read-only caches of data from other tables, or for temporary work areas.
That sounds exactly right for quick setup and teardown of a database during automated testing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With