PostgreSQL Flashcards
What is PostgreSQL and what are some alternative relational databases?
MySQL, SQL server, and Oracle.
What are some advantages of learning a relational database?
categorizing data, accuracy, ease of use, collaboration, security.
What is one way to see if PostgreSQL is running?
sudo service postgresql status
What is a database schema?
a collection of tables.
What is a table?
objects that contain all data in a database.
What is a row?
a single group of related content within a table.
What is SQL and how is it different from languages like JavaScript?
SQL is where you learn how to work with a database. JavaScript is a full on programming language that is later leveraged to help you write server-sided code.
How do you retrieve specific columns from a database table?
select “column name”
How do you filter rows based on some specific criteria?
where “column name” = ‘specific name
What are the benefits of formatting your SQL?
readability and consistent style.
What are four comparison operators that can be used in a where clause?
=, <, >, or
How do you limit the number of rows returned in a result set?
limit number;
How do you retrieve all column from a database table?
select *
How do you control the sort order of a result set?
desc = descending or asc = ascending
How do you add a row to a SQL table?
insert statement