SQL Flashcards

1
Q

What is Data Manipulation Language (DML)?

A

Works with the values in the database

- Select, insert, update, delete

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

What is Data Definition Language (DDL)?

A

Work with the definition of the database

Create, delete, alter, drop, modify- tables and relationships

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

What is Data Control Language (DCL)?

A

Manipulate permission within the database

Grant, deny, revoke

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

What do these two Special statements do?
Use +
Go

A

Use- switch to a specific database for the following statement
Go- execute the statement since the last go
or the start of a session

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

What is a tuple?

A

a row of data

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

What is an attribute?

A

a column of data

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

What is a determinant?

A

an attribute whose value determines the value of another attribute
usually a primary key

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

SQL Language Element

What is are clauses?

A

Constituent components of statements and queries

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

SQL Language Element

What are Expressions?

A

can produce either scalar values or tables consisting of columns and rows of data
ex- set counter = counter + 1

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

SQL Language Element

What are predicates?

A

They specify conditions that have to be evaluated
ex- where Customer = ‘Bob’
where ‘column name’ (equals) ‘insert value’

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

SQL Language Element

What are queries?

A

They retrieve data based on specific criteria

ex- select * from ‘table name’ where ‘column name’ = ‘insert value’

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

SQL Language Element

What are statements?

A

They have a persistent effect on schemata and data,

or many control transactions, program flow, connections, session, or diagnostics

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

Syntax example for reference

A

Update clause {Update Country
Set clause { set population = population + 1 (expression)
Where clause {where name = USA (predicate)
-Full example is a statement
-All sytax are written in queries

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

Various operators to know

A

= (equals)
<> (not equal)
+,-./,% (arithmetics)
() (groupings)
+ (string concatinations ex ‘Thor’ + ‘Loki’
>,=, not, and, or, between, like, as, is null, is not null

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