Overview

SQL or Structured Query Language is a DSL used to communicate with relational database management systems (RDBMS). Like the name suggests it is particularly good at handling structured data. In addition to querying data, SQL also supports modifying data, and modifying the structure of RDBMSes. It is fairly easy to follow once the syntax is learnt.

Syntax

Todo

Add info for section

Concepts

View

A View is akin to a "virtual table" in an RDBMS. Instead of creating an entirely new table to store to disk a Views are usually defined to do one of the following:

Views are much lighter to store as the only data stored is the definition of the view. By extension this also means the view doesn't need to be explicitly upgraded, only the related tables.

Views can be created with the following syntax:

CREATE VIEW my_view AS
SELECT col1, col3, col5 ...
FROM my_table
WHERE col3 > 10

Any querying conditionals, aggregates etc. can be added to create the needed view.

Resources

Khan Academy

W3 Schools Tutorials

Reference

  1. W3 Schools Reference

Related