Member-only story
SQL
Getting Started
What is a database? A database is a collection of computerized data that is organized/structured in a way that allows a database management system (PostgreSQL, Oracle Database, SQLite, MySQL, or others) to access, query, and return information.
SQL = the language we use to talk to the database, structured query language.
There are variations in syntax dependent upon which database management system you are using. For the purposes of this article, I will be using MySQL.
Installing MySQL — local install
Using GoormIDE .
# starts mysql
mysql-ctl cli;A single MySQL server can hold up to 10 databases, and each database is filled with tables.
tables- a collection of related data held in a structured format within a database. — wikipedia’s definition
Important commands to have as a reference.
#Query data from a table
SELECT column1, column2 FROM table1#Select all rows and columns from a table
SELECT * FROM table1SELECT DISTINCT column1 FROM table1
WHERE condition;
Query from multiple tables. Select the columns, from 1 or more tables to join with another table (usually on a condition).
SELECT ____
FROM ____
(INNER, LEFT, RIGHT, CROSS) JOIN ____
ON _____




