Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternatives to MySQL [closed]

I would like to store data persistently for my application, but I don't really need a full blown relational database. I really could get by with a basic "cache"-like persistent storage where the structure is just a (key, value) pair.

In lieu of a database what are my best, scalable options?

like image 324
Dave Andrews Avatar asked Nov 28 '08 16:11

Dave Andrews


People also ask

Can MongoDB replace MySQL?

It's unlikely MongoDB will completely replace MySQL, but it's possible that both structured and unstructured databases will be used for different purposes in one environment. Developers interested in enterprise programming should learn both platforms to stay competitive in the job market.

Do companies still use MySQL?

MySQL Community Edition is the most widely used free database in the industry. Also, its commercial version is used extensively in the industry.

Is MariaDB better than MySQL?

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.


1 Answers

There's always SQLite, a database that's stored in a file. SQLite already has built-in concurrency, so you don't have to worry about things like file locking, and it's really fast for reads.

If, however, you are doing lots of database changes, it's best to do them all at once inside a transaction. This will only write the changes to the file once, as opposed to every time an change query is issued. This dramatically increases the speed of doing multiple changes.

When a change query is issued, whether it's inside a tranasction or not, the whole database is locked until that query finishes. This means that extremely large transactions could adversely affect the performance of other processes because they must wait for the transaction to finish before they can access the database. In practice, I haven't found this to be that noticeable, but it's always good practice to try to minimize the number of database modifying queries you issue.

like image 190
Kyle Cronin Avatar answered Nov 07 '22 05:11

Kyle Cronin