Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering, what kind of database does Minecraft use? Is it a relational database, maybe something common like MySQL? Do we even know what he's using?

And maybe even a better question, SHOULD he be doing it that way? What type of database should be used?

share|improve this question

closed as off-topic by Byte56 Feb 19 '14 at 14:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are about "which tech to use" are outside the scope of the site. For more information, see this meta post" – Byte56
If this question can be reworded to fit the rules in the help center, please edit the question.

The format currently used for level data is described at – Michael Madsen Apr 15 '11 at 18:59
I love the "should" question. As if Notch is wrong. Hah. :-P – Ricket Apr 15 '11 at 21:22
Do you mean the database on the client, or the database on the server that's managing authentication, etc. – Tim Holt Apr 15 '11 at 21:50
Managing authentication is not a database. It's a plain text file with account names, called Whitelist ;) – Marco Apr 15 '11 at 23:03
@Ricket What are you suggesting? Notch is a god amongst men! ;) – The Communist Duck Apr 16 '11 at 16:23
up vote 11 down vote accepted

Minecraft saves the world data and the player data. Saving the world data is done in multiplayer and singleplayer with the same method. It saves everything in a single .mcr file.
Previous versions of minecraft saved the data in a file structure with many files, which was slower, I think.
I don´t know this exactly, but I guess that a database for world saving would be not the best, because the data is saved in intervals of 15 minutes or so and a database is not designed for saving all data at the same time.

The player data on multiplayer servers is saved in a .dat file. I don´t think that this player data is saved in a SQLite database or something similar, because using a database for requesting once and saving every 5 minutes or so is also not the best.

To sum it up:
I think Notch doesn´t even use any database, because it does not make sense since every data is kept in memory and only saved in intervals of minutes.

share|improve this answer
Notch uses a straight up binary format that's been compressed. His reason? Performance and space probably. – Michael Coleman Apr 16 '11 at 1:28
I am pretty sure the .dat is used in singleplayer too, for player positions and data. – The Communist Duck Apr 16 '11 at 16:24
@The Communist Duck: I looked into my savegames and could only find a .mcr. A .dat would make more sense, but maybe it is bundled with the .mcr. – Marco Apr 16 '11 at 16:47
There is a level.dat for every level; I use it with the level tools site (URL forgotten) to find seeds and do the random-teleport thing. – The Communist Duck Apr 16 '11 at 17:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.