Categories
Technology

What is SQL?

SQL (Structured Query Language) is a programming language used for relational databases. According to db-engines.com, the top ranking database engines use some form or variation of the language for performing database operations like creating, updating, deleting, or reading data.

Using SQL to Control Your Data

I wanted to get more familiar with using SQL this weekend so I followed some basic tutorials that helped me refresh on some of the older material I had previously learned as well as pick up a few new tricks.

If you are confused as to what SQL is still and how it is used, I’ll give you a quick example. When Mark Zuckerburg created The Facebook in 2004, he used a LAMP stack architecture to build the beginnings of the platform. The LAMP stack consists of –

In order for user data to be stored in Facebook’s databases, there needs to be business logic at the core that allows users to create profiles, update, read (view other people’s personal pages and information) and delete personal profile information on the site. This includes keeping track of how every user on the site spends their time, from joining groups, to sending Facebook messages to friends and family, and even playing games on Facebook. The social platform tracks all of this information as soon as a user is logged in and creates a profile.

Here’s an interesting video of Mark talking about the beginnings of Facebook at a CS50 Lecture at Harvard

It’s incredible that at 21 he had such composure and deep understanding of web application architecture, load balancing traffic optimally through limited hardware, and minimizing time required for I/O operations to increase user engagement on the social platform.

But at the very core of the social media platform is their data. It is the core that drives advertisement revenue for the platform. And once you get to the very core of Facebook’s (and many other social media platform’s) values, it’s the data. And the data has to be stored somewhere, and done so in a very efficient manner that optimizes costs and operational efficiency. That’s where SQL comes in. SQL is a way for creating a database, creating tables, defining relationships between data, and manipulating the data through database operations and queries.

I really enjoyed these articles from ladvien.com:

They were great introductory articles on how to get setup with MySQL Workbench 8.0 CE, create a database with the query editor, create a table within the query editor, and insert data into the table all from the query editor.

I also had some fun with the MySQL Shell –

By typing the command you see here – \sql I was able to start writing SQL commands via the MySQL Shell. It was really cool. I could add a new connection, SHOW all of my databases after I created a localhost connection –

And start running database operations and queries with my data. I’m a big fan of using my windows terminal for everything I can, so this was right up my alley!

Resources mentioned in this article:

Dale Yarborough

By Dale Yarborough

I am a Software Engineer at General Motors and Appalachian State University Alum. Previously: Whole Foods Market IT, Charles Schwab