What is PostgreSQL and what are some alternative relational databases?
What are some advantages of learning a relational database?
What is one way to see if PostgreSQL is still running?
What is a database schema?
a collection of tables - defines how the data in a relational database should be organized
What is a table?
What is a row?
a list of attributes that are all the same across each row
What is SQL and how is it different from languages like JavaScript?
How do you retrieve specific columns from a database table?
select “columnName”
How do you filter rows based on some specific criteria?
use a ‘where’ clause - an expression that has to evaluate to true or false - so can use < > = etc..
What are the benefits of formatting your SQL?
it’s easier to read - easier to debug - easier to remove stuff
What are four comparison operators that can be used in a where clause?
, =, !=
How do you limit the number of rows returned in a result set?
use a ‘limit’ clause
How do you retrieve all columns from a database table?
*
How do you control the sort order of a result set?
use ‘order by’ clause
How do you add a row to a SQL table?
What is a tuple?
a list of ordered values ( )
How do you add multiple rows to a SQL table at once?
How do you get back the row being inserted into a table without a separate select statement?
How do you update rows in a database table?
Why is it important to include a where clause in your update statements?
How do you delete rows from a database table?
How do you accidentally delete ALL rows from a table?
delete from “tableName” ; BAD! - needs a where clause after the delete
What is a foreign key?
one column that links one table to another table (exists in both table with the same values)
How do you join two SQL tables?