PostgreSQL Flashcards
What is PostgreSQL and what are some alternative relational databases?
PostgreSQL is a powerful, free, open source Relational Database Management System (RDBMS). It is often cited as the most advanced open source database of its kind and is well-liked by the developer community for its robust feature set, standards compliance, and reliability.
Other popular relational databases include MySQL (also free), SQL Server by Microsoft, and Oracle by Oracle Corporation.
What are some advantages of learning a relational database?
Many problem domains can be modeled well using a relational database. If you are storing related data, then a relational database is probably a good first choice!
A quality of many relational databases is that they support good guarantees about data integrity. They can store and modify data in a way that makes data corruption as unlikely as possible.
What is one way to see if PostgreSQL is running?
sudo service postgresql status
What is a database schema?
A collection of data-tables is called a schema.
A plan for your data that is has to follow.
What is a table?
A table is a list of rows each having the same set of attributes.
What is a row?
a single horizontal entry in the database with a set of attributes.
What is SQL and how is it different from languages like JavaScript?
Structured Query Language (SQL) is a declarative programming language to interact with relational databases. It is a powerful way of retrieving, creating, and manipulating data in a relational database.
Declarative programming language like HTML and CSS.
How do you retrieve specific columns from a database table?
select
How do you filter rows based on some specific criteria?
where
What are the benefits of formatting your SQL?
Makes it easier to debug.
What are four comparison operators that can be used in a where clause?
< , >, =, and !=.
How do you limit the number of rows returned in a result set?
limit
How do you retrieve all columns from a database table?
*
How do you control the sort order of a result set?
order by
How do you add a row to a SQL table?
insert
insert into “products” (“name”, “description”, “price”, “category”)
values (‘Ostrich Pillow’, ‘Feel comfy and cozy!’, 99, ‘self care’);