Database
Notes are from a course on Zero to Mastery I am currently doing-->Database⚑
It's a structured set of data which is structured in a certain way so that it can be scaled as and when required.
SQL⚑
SQL is a query language for navigating through a database. SQL is used to create, read, modify and delete records from a database.
Query⚑
A query, in SQL, is a way to make database engines understand user's instructions.
Example: SELECT * FROM Users WHERE role='manager
breakdown of above example:
SELECT
: literal meaning.*
: identifier (can be any column name from a table).*
means select all available fieldsFROM
: literal meaningUsers
: Name of the tableWHERE
: literal meaningrole='manager
: expression.role
is a column name. this essentially means, return record only is columnrole
matches the valuemanager
Comments⚑
In SQL, a line prefixed with ==
will be treated as a comment, and won't be
executed.
SQL is a Declarative Language.
TODO: Learn more about declarative and imperative language.
Original name of SQL is SEQUEL.
SELECT Statement⚑
Used to print/get data from a database.