Week 4 Flashcards
(189 cards)
What is Amazon RDS?
Amazon Relational Database is a web service that makes it easier to set up, operate, and scale a relational database within AWS cloud.
It provides cost efficient, resizable capacity for an industry standard relational database and manages common database administration tasks.
Why use RDS?
automates expensive and time consuming tasks such as managing backups, software patching, automatic failure detection, and recovery
What is SQL?
Structured Query Language.
A domain-specific language for working with certain databases called relational databases.
What is a relational database?
a type of database that stores information in tables - that is, the data is stored in rows and columns.
What is DDL?
Data Definition Language. These statements are utilized to define the database schema or skeleton. It is how we implement the design structure.
Main keywords in DDL?
CREATE.
ALTER
DROP
TRUNCATE
What does the CREATE keyword do? Which sub language is it used in?
It creates new objects or tables.
DDL
What does the ALTER keyword do? Which sub language is it used in?
It modifies existing objects or tables.
DDL
What does the DROP keyword do? Which sub language is it used in?
It deletes existing objects or tables.
DDL
What does the TRUNCATE keyword do? Which sub language is it used in?
It deletes all the data existing within a table leaving the skeleton of the table only.
DDL
Can changes be made to DDL operations?
No. DDL operations are permanent.
What is DML?
Data Manipulation Language statements are used to perform CRUD operations on the actual data. Operations are normally performed by row in a relational database.
What are the DML keywords?
INSERT.
UPDATE.
DELETE.
SELECT.
What does the INSERT keyword do? Which sub language is it used in?
It inserts a new row into a table.
DML
What does the UPDATE keyword do? Which sub language is it used in?
It updates one or more rows column values of a table that match a specific WHERE clause.
DML
What does the DELETE keyword do? Which sub language is it used in?
It deleetes one or more rows of a table that match a specific WHERE clause.
DML
What does the SELECT keyword do? Which sub language is it used in?
It obtains one or more rows of a table that match a specific WHERE clause. In ORACLE databases this is considered DML. This is how we perform queries in a database.
DML
What is DQL?
Data Query Language. A sub language where only the SELECT statement exists.
Four different DQL Clauses?
GROUP BY
HAVING
WHERE
ORDER BY
Explain the GROUP BY clause. Which sub language is it used in?
This will combine all rows by a column specified in a query and perform any aggregate functions which are stated.
DQL
Explain the HAVING clause. Which sub language is it used in?
This clause will pass another filter similar to the WHERE clause after everything has been filtered and grouped.
DQL
A SQL error will be thrown if you try to perform the ______ clause in a WHERE clause.
HAVING
What are Scalar Functions?
They operate on individual values and will perform some operation per row, and can be used in the SELECT or WHERE clause.
What are Aggregate Functions?
Aggregate functions operate on multiple values (multiple rows). These functions are used to combine (aggregate) the values existing in one column.