ACA Week 3

Austin Skrobarczyk
2 min readOct 22, 2020

This week we had to get set up with MySQL and Google Cloud. On the first day, we learned about SELECT, FROM, and WHERE/LIKE (if you did the push yourself further they go over DISTINCT and COUNT()).

Before anyone asks no I don't think in CAPs I am told that its convention to put those parts like that. Either way, this is where I first started looking into different careers. I was working a sales job and realized the data we were working with could be better organized.

Either way what I have learned so far is that SELECT is what you are going to select from the tables in the database. Basically, display the logic or fields that follow SELECT. FROM tells MySQL which database table it's looking to pull from. Then WHERE and LIKE can be used as a filter and you can put conditions such `phone1` LIKE `773%` which basically just says where the fields under column phone1 equal a number that starts with 773 but then is followed by literally anything!

DISTINCT were ways to eliminate multiple instances that a name showed up in a column. Then COUNT() was a way to count how many times something showed up. All in all very basic but we are just scratching the surface.

For the second portion of the week's lesson, it was continuing learning of SELECT, GROUP BY, JOIN and HAVING. As well as what primary keys, unique keys, and foreign keys are.

We used the built-in functions to get the SUM of users id organized by state.

Then with SUBSTR() we get the area code and organize it by the number of users that have said area code. We use this to get the area code with the most users.

Finally, we join some tables together at their Unique Keys for ID. We use GROUP BY county and HAVING count()>10 to see which counties have more than 10 .

The push yourself further portion was to go to databases option select reverse engineer and create a set of charts that was very visual on how all the primary and unique keys relate for the 3 different tables we are working with. This helped me understand how they are related and in the future how messy this can be if there isn't a good organization to the project's database usage.

With that, we are at our first checkpoint and moving quickly. Creating an express CRUD app with what we have learned so far. It is looking good so far but stay tuned in next week and I'm sure I will find something that caught my eye.

--

--