postgres Flashcards

1
Q

What is PostgreSQL and what are some alternative relational databases?

A

An object-regional database system with active development, reliability, performance, etc.
Other popular relational databases: MySQL, SQL Server by Microsoft, Oracle by Oracle corporation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some advantages of learning a relational database?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is one way to see if PostgreSQL is running?

A

Command - sudo service postgresql status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a database schema?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a table?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a row?

A

A set of related data, and every row in the table has the same structure
* all of the data that describes one thing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is SQL and how is it different from languages like JavaScript?

A

.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you retrieve specific columns from a database table?

A

.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you filter rows based on some specific criteria?

A

.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the benefits of formatting your SQL?

A

.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are four comparison operators that can be used in a where clause?

A

.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you limit the number of rows returned in a result set?

A

.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you retrieve all columns from a database table?

A

.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you control the sort of a result set?

A

.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly