I've been spending my Saturdays doing tutorials on languages I'm curious about. This week it's MySQL.
What I knew about the language before I started
- Queries are very like English - I couldn't remember enough to put one together but WHERE features in there somewhere
I have used SQL a bit in the past. At work for a bit I was one of the few people with access to an SQL database, and the knowledge that if I broke anything it would be broken for the whole company. Although I learnt the query language I was too scared to use it, and instead viewed all the rows and scrolled through it until I found what I was looking for.
I was quite relieved when it wasn't my job any more - by which I mean I got a new computer that didn't have SQL server installed. I didn't install it and just sent any queries to the person who did know what they doing.
What I did
What I thought about the
I nearly didn't do this one because I was stuck for ages and had 10 tabs open just trying to log in. I had no idea what the root password was - either there was none as it's set when it was installed or I'm pretty sure what I'd have changed it to if I'd changed it. But neither of those worked. And the fix kept giving me errors.
I got there in the end and then pretty much the first thing we do is to create a user - which it turns out I'd already done. With the password I was expecting for root.
Once we got going it was fine. You write queries in a very English-friendly way. You can easily tell that SELECT * from DATABASE will give you everyting from the database.
The end of the video covered using a MySQL database in Node, which all made sense, since I've used it before to get data from an API and this was the same, but you just put an SQL query in where you'd be going to the API.
Last week I thought that I've got a project where I need to use a database and MongoDB seemed like a good idea for it. Now I'm thinking SQL, because it all made sense and a week has been long enough to forget how MongoDB worked...
Back to programming languages: Swift, since I've seen that mentioned a few times recently.
Top comments (0)