SQL Flashcards

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
Q

Inner Join

A

Return only rows that match

26
Q

Right/Left Join

A

All from the directions side, only matches from the other side

27
Q

Full Outer Join

A

Returns rows from all tables

28
Q

Cross Join

A

Cartesian product

29
Q

Self Join

A

Joins a table with itself

30
Q

Set-Ops

A

Used for comparing result sets, NOT tables

31
Q

Properties of a Database (ACID)

A

Atomicity
Consistency
Isolation
Durability

32
Q

Set-Op Commands

A

UNION ALL
UNION
INTERSECT
MINUS

33
Q

Dirty read

A

Returns something from a table/column that has not been committed

34
Q

Non-Repeatable Read

A

Row is edited after being viewed

35
Q

Phantom Read

A

Query that does not yield the same result when viewed again

36
Q

Sequences

A

Stores and tracks a number that can be incremented/decremented

37
Q

View

A

Essentially a saved SELECT query

38
Q

Index

A

Speeds up searches by enforcing an in-memory order of rows

39
Q

Trigger

A

Event listener in database

40
Q

Function

A

Block of Code we can execute

41
Q

Stored Procedure

A

Cannot produce a resultset

Used in java

42
Q

Cursor

A

View stored in local variable

43
Q

Prepared Statement

A

Pre-compiled statement

44
Q

Callable Statement

A

Used to call a stored procedure