If you're looking to start a website you might see references online to databases, MySQL or other types of database like PostgreSQL. For the layman, it can be a bit confusing.
The quick definition of MySQL, in case you were wondering, is:
A relational database that runs as a server providing multi-user access to a number of databases.
Don't worry if that sounds confusing, this article should simplify it for you.
How databases relate to websites
I'm not the definitive expert on MySQL or databases so this isn't going to be a war and peace article that gives you the full breakdown of what MySQL is and how to become an expert at it.
If you've seen MySQL listed as a feature on a popular web host or found software that requires MySQL to run correctly then this article is especially for you to understand the basics and get your website or software up and running.
Don't know what a web host is? Then you should read my guide How to Create a Website: Beginner's Guide for a full explanation.
What is a database?
Put simply, a database is where you (or more precisely, your software) stores information so that it can be found again later. You can also create relationships between the information in the database to link them and it allows the software to retrieve the information more quickly.
So, for example, you might have a list of customers in a database and a list of products as well. You could link those two databases together and find out which customers ordered which product and easily get that info. Pretty cool right?
It sounds hard and I must admit that when I did relational databases in I.T. it was confusing at the best of times. But if you're building websites or installing software onto your website, then you don't really need to understand it all. A basic overview is more than enough.
What is MySQL, SQL and PostgreSQL?
The great thing about databases is that there international standards programming languages used to manipulate them and get the data out. The most popular of these is SQL (Structured Query Language).
It's most commonly pronounced (S-Q-L) in case you were wondering and SQL was designed specifically to be easy to get info out of a database.
Lots of databases support SQL as the programming language and the most popular one, particularly when it comes to website software, is MySQL. So, what is MySQL? It's just a database.
It's very popular with blogging software, web forums and online shopping carts and pretty much any web host worth their salt will offer it to you as standard.
MySQL vs PostgreSQL vs other databases
A lot of people new to websites will debate over which database to use and you'll probably find some hardcore programmers who swear by one or the other.
Me? I keep it simple and stick to software that uses MySQL. It's by far the most popular and to be honest, most software you install will never require you to access the database directly so it's not even worth worrying about.
I've yet to come across a major web host that doesn't provide MySQL and even the most obscure of web applications will probably use it as well so as long as you are choosing the right web host you should be okay.
When do you need MySQL databases?
If you're building a static website by writing HTML and CSS yourself or following along with my Dreamweaver CS6 tutorials then you don't need a database.
Those pages ending .html are static and the information is stored directly in the file, not in a database. It's a very simple way for a beginner to get started online.
However, I always use WordPress for my websites and recommend it to others because it makes the website creation process so much easier. Blogging software like this does store the information in a database and allows you to tag and categorize it in different ways to display it on your website.
You're never aware of the database and if you follow my guide you'll see that most hosts have a one-click installation that creates the database for you. (You can also install WordPress the old fashioned way by first creating your empty database.)
Do I need to learn SQL to use MySQL?
I run dozens of websites and I don't know any more than the bare essentials of SQL. I can log into a database and change various values but I don't write the SQL programming language and you don't need to either.
If you can use a word processor like Microsoft Word, then you'll be fine using software like WordPress without having to get your hands dirty with SQL. If you do want to geek out on the SQL language then you'll need to buy a book or tutorial guide to help you through it.
Even HTML and CSS isn't programming and if you use WordPress or a ready made HTML template, you don't really need to know that either.
Hopefully this article has simplified and demystified MySQL and you have a better understanding of what it is.
If you have any questions about any of this stuff that I haven't already covered then you can get touch via the contact form and as me a question.
Leave a Reply