When asked about the advantages of a MySQL database over text files as far as data storage is concerned, Radomir Dopieralski wrote a good summary, which has been included here.
Advantages of database:
- If you have an admin who takes care of the database for you, you don't have to set it up, maintain, backup or migrate to newer versions. This is especially good for large companies or hired hosting.
- It's easy to get platform-independent, at least as far as operating systems go -- the database developers had to take care of all the nasty details already.
- You get a ready search engine and backlinks, tags, categories -- you can even implement them in efficient way.
- Web server doesn't have to have write access to the files on permanent storage -- this may be important in some hosted environments like Sourceforge.
- You can easily write some statistical analysis tools.
- You can have a non-persistent wiki script (cgi, php) and still have efficient caching of data.
Disadvantages of database:
- You have to set up and maintain a database.
- It's a black box, you need special tools to access the data.
- You need special tools to migrate to a different database.
- If it's slow, you need specialized database knowledge to profile and optimize it.
- There is usually some overhead on the data.
Advantages of files:
- You don't have to install and maintain additional software.
- The wiki may be written so that you can inspect and even edit the data with common tools, also backup, gather statistics, export, etc.
- Assuming the above, it's easy to backup, move or copy whole wiki or its parts.
- The data format and access functions is designed precisely for the particular wiki.
Disadvantages of files:
- Differences between filesystems make portability difficult (especially on Windows).
- Wiki script needs write access to the permanent storage.
- Can't do in-memory caching for non-persistent scripts like php or cgi.
- Possibility to run into race conditions, locking issues, data corruption and similar bugs.
Both solutions may or may not scale, depending on the implementation, and may be harder or easier to maintain depending on the implementation and experience and skills of the admin.