Database/SQL Flashcards

1
Q

What does SQL stand for?

A

Structured Query Language

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

Which component of SQL architecture receives information from a SQL query and from a Parser + Optimizer?

A

Query Language Processor

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

Which component of SQL architecture receives information from the Queary Language Processor and from a File Manager + Transaction Manager?

A

DBMS Engine

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

Which component of SQL architecture receives information from the DBMS Engine?

A

Physical Database

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

What is a field in a DB table that uniquely identifies each row/record?

A

Primary key

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

Must primary keys contain unique values?

A

Yes

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

Can primary key columns contain NULL values?

A

No

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

Can a table have more than one primary key?

A

No

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

What is the name for multiple fields in a primary key?

A

Composite key

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

If a table has a primary key defined on on any field(s), can there be more than one record with the same value as the field(s)?

A

No

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

Also called a referencing key, what is the name of a key that is used to link two tables together?

A

Foreign key

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

A foreign key is a column or combination of columns whose values match a ____ in a different table.

A

Primary key

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

What are the DDL (Data Definition Language) statements in SQL?

A

CREATE, ALTER, DROP

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

What are the DML (Data Maipulation Language) statements in SQL?

A

SELECT, INSERT, UPDATE, DELETE

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

What are the DCL (Data Control Language) statements in SQL?

A

GRANT, REVOKE

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

What are the TCL (Transaction Control Language) statements in SQL?

A

SAVEPOINT, ROLLBACK, COMMIT

17
Q

What SQL statement is used to fetch data from a database and return this data in the form of a table?

18
Q

What syntax is used to fetch all fields?

A

SELECT * FROM

19
Q

What SQL clause is used to specify a condition while fetching the data from a table or by joining multiple tables?

20
Q

What other statements can WHERE be used in besides SELECT?

A

UPDATE, DELETE

21
Q

What SQL statement is used to add new rows of data to a table in the database?

A

INSERT INTO

22
Q

What clause is used to specify the values being added to their respective columns via INSERT INTO?

23
Q

What clause is used to combine records from two or more tables in a DB?

24
Q

What type of JOIN is used only to combine mutually inclusive data from both tables?

A

INNER JOIN

25
What types of JOIN are used to combine only data from the left table or from the right table, respectively?
LEFT JOIN, RIGHT JOIN
26
What type of JOIN is used to combine all data from both tables?
FULL JOIN