Skip to main content

Why use External Databases over Local Databases

In the world of Minecraft server plugins and mods, data management is crucial for everything from player stats tracking to world state saving. Many developers face the decision of choosing between local databases (e.g., SQLite) and external databases (e.g., MySQL, MongoDB) for storing and accessing this data. While each option has its merits, performance is often the deciding factor. In this article, we’ll focus on the performance implications of using external databases over local databases for Minecraft plugins.

What are external Databases?

External databases are databases hosted outside of the server. Unlike local databases, which are within the files of your server, external databases use a network connection to handle data. Examples of such databases are MySQL, MariaDB and MongoDB. They are designed to handle large amounts of data and concurrent access, making them ideal for applications that need to manage data from multiple sources or handle heavy loads efficiently.

What are local Databases?

Local databases are databases located within your plugins' files. They are often file-based, storing data directly on the local filesystem, and don't require a network connection for access. Common examples include SQLite, H2, YAML, TOML and JSON. They are usually used by default for your plugins, and work well when handling small amount of data. However, they are generally less suited for high concurrency or large-scale data handling when compared to external databases.

Conclusion

It's preferred for you as a server owner to make use of external databases (One will be provided for free for you to use. If you're unfamiliar with creating databases, please refer to this article for guidance).