What Is MySQL?

MySQL is used to store data from your application. In this case, the application is probably a website. If your application lets users create accounts, you would use a database like MySQL to store the user’s data (first name, last name, email, address, phone number, etc.).

When I first started learning web development, it took me a while to figure out what a database was. I had the idea that everything was bundled together and easy to set up, but, in web development, that’s not the case. There are a thousand and one ways to do everything. MySQL is one way to store your application’s data. There are many other ways, but MySQL is probably the most popular, especially for PHP applications.

JavaScript was the first language I learned, and it was also confusing that I couldn’t go directly from JavaScript to MySQL. First, I had to figure out what PHP was, and then I realized I had to send data to the server, first. From the server (PHP), the data could be savedĀ  to the database.

There are two different types of databases: SQL and NoSQL. The more common one is SQL. Finding out about NoSQL was also confusing. It’s a completely different way of thinking about data. Personally, I prefer SQL, but it’s good to know both.

It’s also good to know that MySQl is just one type of SQL database. There are a couple others, but MySQl is, again, the most popular.

As you build out an application, you’ll realize that data is complicated. If your application has users, most likely those users have things that belong to them. If you build an application like Facebook, your user’s could have posts (and a million other things) that belong to them. In addition to the actual data being stored in the database, the relationships between the types of data are also stored in the database.

Figuring out how to store your data is known as modeling your data. When you model your data, you give it structure, also known as a Schema.

After modeling and storing your data, there are lots of different ways to retrieve it. SQL stands for structured Query Language. This language is what you use to store and retrieve (query) your data.

Just like with other web technologies, I’d recommend only learning as much as you need to get started. You can always dive deeper if you want, but, most likely, you will only use a small amount of what you learn.