πŸ’» Guide: SQL & Relational Databases

WRITTEN BY: RYAN ZERNACH

SUMMARY β€” What are the building blocks of SQL and how is this language used to manipulate data that’s stored in relational databases?

Some Highly Used Commands

USE β€” from which database should the data be queried (if simultaneously connected to multiple databases)


SELECT β€” from which columns in the table should the data be queried


FROM β€” from which tables within the database should the data be queried


WHERE β€” to filter data being queried using logical operators

β–» AND β€” both conditions are met; higher order of precedence than OR

β–» OR β€” either conditions are met; lower order of precedence than AND

β–» NOT β€” negates the condition by querying for the inverse

β–» IN β€” the list form of “or”; to filter results based on if the query is in the list

β–» BETWEEN/AND β€” to select a range of values where >= x and <= y


ORDER BY β€” the order that the data is displayed

Good reliable databases are a big and hard problem, and while I’m sure there are developments in dataframe frontends for them, the Achilles heel of dataframes is that they generally want all your data in memory at the same time. Relational databases only need the keys/relations in memory, and can scan for the rest on disk, which lets them aggressively optimize queries and have superior performance.

β€”AARON GALLANT

THANKS FOR READING!

CHECK OUT ANOTHER PROJECT OR BLOG POST OF MINE…