database 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

True or False: SQL is a programming language.

A

True

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

Fill in the blank: A _______ is a collection of data organized in a structured way.

A

database

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

What command is used to retrieve data from a database?

A

SELECT

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

Which SQL statement is used to update existing records in a table?

A

UPDATE

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

What is the purpose of the WHERE clause in SQL?

A

To filter records based on a specified condition.

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

True or False: The DELETE statement in SQL is used to remove records from a table.

A

True

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

What is the default sorting order of the ORDER BY clause?

A

Ascending

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

Which SQL statement is used to create a new table?

A

CREATE TABLE

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

What keyword is used to prevent duplicate values in a column?

A

UNIQUE

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

Fill in the blank: A _______ key uniquely identifies each record in a table.

A

primary

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

What is the purpose of the JOIN clause in SQL?

A

To combine rows from two or more tables based on a related column.

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

Which type of JOIN returns all records from the left table and matched records from the right table?

A

LEFT JOIN

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

What is a foreign key?

A

A field in one table that uniquely identifies a row of another table.

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

True or False: The COUNT function in SQL can be used to count rows in a table.

A

True

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

What SQL function is used to find the highest value in a column?

17
Q

Fill in the blank: The _______ function is used to calculate the average value of a numeric column.

18
Q

What command is used to remove a table from a database?

A

DROP TABLE

19
Q

What does the GROUP BY clause do in SQL?

A

It groups rows that have the same values in specified columns into summary rows.

20
Q

Which SQL clause is used to filter groups based on a specified condition?

21
Q

What is the purpose of the DISTINCT keyword in SQL?

A

To return only unique values.

22
Q

True or False: An index in SQL can improve the speed of data retrieval.

23
Q

What SQL command is used to add a new column to an existing table?

A

ALTER TABLE

24
Q

What is the purpose of the NULL value in SQL?

A

To represent missing or unknown data.

25
Fill in the blank: The _______ function is used to concatenate two or more strings in SQL.
CONCAT
26
What is normalization in the context of databases?
The process of organizing data to minimize redundancy.