postgres Flashcards
What is PostgreSQL and what are some alternative relational databases?
An object-regional database system with active development, reliability, performance, etc.
Other popular relational databases: MySQL, SQL Server by Microsoft, Oracle by Oracle corporation
What are some advantages of learning a relational database?
Most simple, no complex structuring or querying process
Data accuracy / supports good guarantees about data integrity
They can store and modify data in a way that makes data corruption as unlikely as possible
Arguably the most widely used kind of database
Knowing the SQL language is a very portable skill given that there are so many relational databases driven by almost the same language
*but why LEARN? Because it’s used everywhere.
What is one way to see if PostgreSQL is running?
Command - sudo service postgresql status
What is a database schema?
A collection of tables
A schema defines how the data in a relational database should be organized
In relational databases, you typically have to define your schema up front and the database server will make sure that any data being written to the database conforms to that schema.
*description of how the data in a schema should be structured
What is a table?
A list of rows each having the same set of attributes, commonly referred to as columns
A sort of spreadsheet where each row is a record in that spreadsheet
What is a row?
A set of related data, and every row in the table has the same structure
* all of the data that describes one thing
What is SQL and how is it different from languages like JavaScript?
.
How do you retrieve specific columns from a database table?
.
How do you filter rows based on some specific criteria?
.
What are the benefits of formatting your SQL?
.
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?
.
How do you retrieve all columns from a database table?
.
How do you control the sort of a result set?
.