What is a database used for?

As the name suggests, you can collect data in a database. Common use cases for a database are:

  • Registrations on a website: If visitors can register and log in on your website, you have to save their login data somewhere, a database is ideal for this
  • CMS (Content Management System): A website that includes a content management system often has a lot of text content. They can easily be stored in a database. Among other things, this has the advantage that the content has been separated from the design of the page. So if a redesign is pending again, you only have to change the design and the texts in the database remain untouched
  • Content in general: If you are working on a questions page (see e.g. gutefrage.net), you can assume that you will have a lot of questions and answers over time. These can be easily stored in a database.

Small portfolio pages or websites with just a few HTML files can of course also do well without a database. But if you have or expect a lot of content, you should consider a database.

And why MySQL? Isn't there anything else?

Yes, MySQL is just one of many databases, but it is widely used on the Internet. It's also free and goes hand in hand with PHP. PHP and MySQL are available with most web hosting packages, so you can achieve great things even with a small budget.

Not yet understood what a database is useful for? Then just ask!