Database fundamentals
Introduction to SQL
An introduction to SQL, the Structured Query Language used to interact with a database management system like PostgreSQL, MySQL, SQLite, or Oracle.
After we introduced the most popular conceptual Data Model, Entity-Relationship (ER), and the most popular logic data model (the Relational Model), it’s time to talk about SQL.
SQL (Structured Query Language) is the language we use to talk to a Database Management System (DBMS).
As the name suggests, SQL started as a querying language. Over time it grew into a full interface for creating tables, inserting data, changing schemas, and much more than running SELECT statements.
I said “grew”, but SQL is still evolving. It is a standard that was first published in 1986, then updated in 1989, 1992, 1999, 2003, 2006, 2008, 2011, 2016 and as its latest version at the time of writing, 2019.
SQL is implemented in many popular DBMS: PostgreSQL, MySQL, Oracle, SQLite, MicroSoft SQL Server, and many more. Each database implements the standard, or a particular version of it, and adds custom features on top of it, to simplify creating queries or adding a specific functionality.
Unless noted otherwise, every time I talk about SQL I talk about the SQL standard, not a particular implementation of it.
If you’re writing SQL and it gets messy, I built a free SQL formatter that prettifies your queries in the browser.
SQL is a huge subject. I cover many of its topics in different blog posts, including:
SQL, creating a table SQL, adding data to a table SQL, how to use SELECT SQL, how to update a table structure SQL, how to update data SQL, how to delete data and tables SQL, Handling empty cells SQL, Unique and Primary keys SQL Views SQL Joins
Lesson completed