SQL Flashcards

(44 cards)

1
Q

SQL

A

Structured Query Language

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

DDL

A

Data Definition Language

-AutoCommit-

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

CRUD

A

Create
Read
Update
Delete

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

DDL Commands

A

Create
Alter
Drop
Truncate

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

DML

A

Data Manipulation Language

-NotAutoCommit-

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

DML Commands

A

Insert
Update
Delete

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

DQL

A

Data Query Language

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

DQL Commands

A

Select

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

DCL

A

Data Control Language

-Controls who can see data-

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

DCL Commands

A

Grant

Revoke

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

TCL

A

Transaction Control Language

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

TCL Commands

A

Commit
Savepoint
Rollback

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

Functions (Built-in)

A

Scalar

Aggregate

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

Scalar Function

A

returns a single row for every row queried in a table or row

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

Aggregate Function

A

returns a single result or set for a group of rows/tables

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

Query Makeup

A

SELECT (column list) FROM (table list) WHERE (condition1) AND (condition2) GROUP BY (column list) HAVING (condition) ORDER BY (default(ie assending) or DESC)

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

ResultSet

A

Table of results returned by execution of a SQL Query

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

Sub-queries types

A

Correlated

non-correlated

19
Q

Correlated Sub-Query

A

Inner Query is not independent

20
Q

Non-Correlated Sub-Query

A

Inner Query is independent

21
Q

Sub-Query

A

Nested query in a query

22
Q

Joins

A

Returns a resultset of two or more combined tables

23
Q

Classifications of Joins

A

equi (=)

theta (,!=)

24
Q

Types of Joins

A
Inner
Right/Left
Full Outer
Cross
Self
25
Inner Join
Return only rows that match
26
Right/Left Join
All from the directions side, only matches from the other side
27
Full Outer Join
Returns rows from all tables
28
Cross Join
Cartesian product
29
Self Join
Joins a table with itself
30
Set-Ops
Used for comparing result sets, NOT tables
31
Properties of a Database (ACID)
Atomicity Consistency Isolation Durability
32
Set-Op Commands
UNION ALL UNION INTERSECT MINUS
33
Dirty read
Returns something from a table/column that has not been committed
34
Non-Repeatable Read
Row is edited after being viewed
35
Phantom Read
Query that does not yield the same result when viewed again
36
Sequences
Stores and tracks a number that can be incremented/decremented
37
View
Essentially a saved SELECT query
38
Index
Speeds up searches by enforcing an in-memory order of rows
39
Trigger
Event listener in database
40
Function
Block of Code we can execute
41
Stored Procedure
Cannot produce a resultset | Used in java
42
Cursor
View stored in local variable
43
Prepared Statement
Pre-compiled statement
44
Callable Statement
Used to call a stored procedure