database Flashcards
What is PostgreSQL and what are some alternative relational databases?
powerful open source Relational Database Management System. Some alternative relational databases are (MySQL, SQL Server, and Oracle by Oracle Corporation)
What are some advantages of learning a relational database?
if you are storing related data. They can store and modify data in a way that makes data corruption as unlikely as possible.And knowing the SQL language is a very portable skill given that there are so many relational databases driven by almost the same language.
What is one way to see if PostgreSQL is running?
with the top command
What is a database schema?
a collection of tables and defines how the data in a relational database should be organized
What is a table?
where data is stored in relations. They are a list of rows each having the same set of attributes
What is a row?
is the set of attributes
What is SQL and how is it different from languages like JavaScript?
SQL is a declarative programming language. In declarative languages, programmers describe the results they want and the programming environment comes up with its own plan for getting those results
How do you retrieve specific columns from a database table?
with the select keyword, double quotes, and comma to separate them
How do you filter rows based on some specific criteria?
with where clause
What are the benefits of formatting your SQL?
For readability
How do you retrieve all columns from a database table?
The * asterisk is not in quotes
How do you control the sort order of a result set?
with and order by clause
The order by clause comes after the from clause.
The order by clause is followed by a column name in “ double quotes.
How do you limit the number of rows returned in a result set?
with limit clause
The limit clause comes last.
The limit clause includes a literal integer number with no quotes to specify the maximum number of rows that should be returned.
How do you add a row to a SQL table?
execute the command of insert into, and then values
What is a tuple?
a list of values