2.2 - Relational Databases & SQL Basics Flashcards

Understand how data is stored and queried conceptually using tables and simple queries. (12 cards)

1
Q

Why are relational databases important in data analysis?

A

They store large datasets in an organized way, allowing you to query and analyze data efficiently.

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

What is SQL and why is it useful?

A

SQL (Structured Query Language) is used to communicate with databases to retrieve, filter, and manipulate data.

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

Name the main components of a relational database.

A

Tables, rows (records), columns (fields), keys

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

A ______ is a collection of related data organized into rows and columns.

A

Table

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

A ______ uniquely identifies each record in a table.

A

Primary key

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

A ______ links a field in one table to a primary key in another table.

A

Foreign key

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

Which of these is an example of a primary key?
A) Customer ID
B) Customer Name
C) City
D) Purchase Amount

A

A) Customer ID

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

What is the purpose of a foreign key?

A

To create a relationship between two tables, allowing data to be linked logically.

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

Name one benefit of using relational databases over spreadsheets.

A

Handles large datasets, enforces data integrity, supports complex queries, avoids redundancy.

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

Which SQL command is used to retrieve data from a table?
A) INSERT
B) SELECT
C) UPDATE
D) DELETE

A

B) SELECT

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

SQL commands like SELECT, WHERE, and JOIN are used to ______ data.

A

Query / retrieve / filter

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

Why is understanding relational concepts important before writing SQL queries?

A

It helps you know how tables are connected and how to retrieve meaningful insights without errors.

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