The SQL

Omar Gonzalez
3 min readOct 26, 2020

--

How I like to imagine databases looking like!

So here we are making databases and hosting them on google cloud. Who would have thought? Not us! (Enter gif video of Paul Rudd) It is insane how we are really starting to bring everything together when about a year ago I couldn’t even tell you what an html tag was. Now I am hosting a database on the google cloud, and I can make you multiple programs that are composed of JavaScript. While those things are great for the front end of a website, you know what the user sees and interacts with, I now have the skills to actually retain the information that users submit. This is useful for a website that requires us to store user membership data or sensitive data related to a specific member. It is pretty neat, because now when I am browsing the web or using an app I can see a map of what technology is being used and how it is being maintained. If you had asked me a year ago how a website was built, I wouldn’t even know where to begin to explain to you. Now I can build you one up from the ground up and even add some cool extras in there just because I can.

When dealing with databases it wouldn’t be uncommon to have a website that stores users email address in the database. You can imagine that some companies have a massive collection of emails so it is important you know how to catch an email that is trying to be used again by a new user, even though the email is already being used by a current user. One way to catch this is when the PUT request to create a new user goes through and it catches that the email is already in use, simply return an error code 409. This means that there is a conflict and you can alert the user that the email or username that they are trying to use, are already taken up by another member!

If you’re in the website making business it is common knowledge that your site will be accessed on an array of devices. So when using images you have to consider that somebody is going to be viewing your site on a 50 inch monitor, or a 5 inch phone. With that in mind you have to be mindful of when using images. One common way to deal with this is to have your stylesheet have media queries that get the screen size from the device. You can then have different sizes for the same image and the correct one will get loaded up depending on the return from the media query.

When I am working on projects with JavaScript, I prefer to use NPM, for my packet manager. It is what I am more familiar with and it is what we have used for the entire time that I have been enrolled in the coding bootcamp. Yarn is another one that you can use, however it is not completely in the way that it uses some of NPM registries. Yarn was made by facebook to improve on the shortcomings of NPM.

When dealing with dependencies it is not uncommon to end up with hundreds or even thousands of them. One way to make sure that they are safe and secure is to always keep everything updated. This is a nice way to ensure that all the bugs are taken care of.

Here recently the class and I have begun working in mySQLworkbench. So far I have enjoyed it, and even gives me a sense of feeling that I work in an office somewhere sorting out users information. Two SQL datatypes are CHAR, and VARCHAR. A difference between the two is that CHAR is a fixed length and VARCHAR has a variable length field. This means that the storage requirements are different.

--

--

Omar Gonzalez
Omar Gonzalez

No responses yet