Comparison of lightweight databases: SQLite, H2, and MySQLEmbedded

Source: Internet
Author: User
For PHP programmers, SQLite can quickly build a database development environment and provide a database environment featuring ease, self-container, no configuration, and no independent services. All data is stored in

For PHP programmers, SQLite can quickly build a database development environment and provide a database environment featuring ease, self-container, no configuration, and no independent services. All data is stored in

For PHP programmers, SQLite can quickly build a database development environment and provide a database environment with ease, self-container, no configuration, and no independent services. All data is stored in one file. When MySQL is used as the final production platform, SQLite is an irreplaceable Development Environment solution. But is there really no better choice for compatibility? Well, there are only a few reasons: MySQL compatibility and support for hash indexes!

When looking for an alternative to SQLite, there are two options: H2 and MySQL Embeded. I am concerned that it can be used as conveniently as SQLite, but must be compatible with MySQL.

The following is a simple comparison of the three databases:

Compare items
SQLiteH2 database engineMySQL Embedded

Footprint350KiB <2 MB

Authorization Protocol
Public domainDual: Modified MPL 1.1/EPL 1.0 (commercial friendly) GPL 2.0 (only commercial friendly if not redistributed)

Self-container

Single file

Serverless

Server Mode

Zero Configuration

Transaction Processing

Index (B-tree, R-tree, full-text) (B-tree, tree, hash, full-text) (B-tree, R-tree, hash, full-text)

MySQL compatibility
(But not 100%)

Compatible with other databases such as MySQL, PostgreSQL, Oracle, MSSQL, DB2, HSQLDB and Derby

Encryption

In-Memory Database
(MEMORY storage engine)

It seems that H2 management is the easiest, so I tried some of the limitations found after H2 in PHP: the MySQL driver of Quercus cannot work well with the MySQL compatibility mode of H2, I must use the PDO driver of quercuz instead.

MySQL Embedded is 100% compatible with MySQL. I have not started the test. But there are also some uncertain questions. I don't know if I can distribute applications that contain MySQL Embedded. This may require commercial authorization.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.