WikiMatrix
  • Forum
  •  » General
  •  » What are advantages of mySQL database vs Text Files for storage?

#1 2008-11-24 07:40:40

mothra
Member
Registered: 2008-11-24
Posts: 2

What are advantages of mySQL database vs Text Files for storage?

Hi,

I have read a few times that each - mySQL database vs Text Files  - has its advantages as far as dataStorage goes (but have not been able to read what those advantages are). Does anyone know?

Is one better for larger sites and one better for small - medium sized sites?  Is it easy to migrate the data from one to another if i find out after i start taht I should have chosen the other option?

JR

Last edited by mothra (2008-11-24 07:41:51)

Offline

 

#2 2008-11-24 17:58:13

TheSheep
Member
From: PoznaƄ, Poland
Registered: 2007-04-30
Posts: 31
Website

Re: What are advantages of mySQL database vs Text Files for storage?

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.

Offline

 

#3 2008-11-24 22:18:59

mothra
Member
Registered: 2008-11-24
Posts: 2

Re: What are advantages of mySQL database vs Text Files for storage?

I see....so whether to use mySQL database vs Text Filesis a pretty important consideration.  Thanks for the great info.  I will need to reread your entry a few times & think about lots of things.  smile
thanks again.

Offline

 
  • Forum
  •  » General
  •  » What are advantages of mySQL database vs Text Files for storage?

You are not logged in.


Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB