postsqul Flashcards
What is PostgreSQL and what are some alternative relational databases?
PostgreSQL is a relational database system. other alternatives are MySQL, SQL Server by Microsoft, and oracle by Oracle Corporation.
What are some advantages of learning a relational database?
be able to make logical connections and make tables
What is one way to see if PostgreSQL is running?
by using the command sudo service PostgreSQL status
What is a database schema?
collection of tables
What is a table?
A table is an arrangement of information or data, typically in rows and columns
What is a row?
represents a single, implicitly structured data item in a table
How do you retrieve specific columns from a database table?
by using the select keyword
How do you filter rows based on some specific criteria?
by using the where keyword
What are the benefits of formatting your SQL?
it makes it easier to catch mistakes and read
What are four comparison operators that can be used in a where clause?
equal, less than and greater than, and not equal
How do you limit the number of rows returned in a result set?
use the limit keyword
How do you retrieve all columns from a database table?
by using the astric selector
How do you control the sort order of a result set?
by using the order by
How do you add a row to a SQL table?
by using the insert statement
What is a tuple?
list of values