Chapter 3 DB Flashcards

(45 cards)

1
Q

What is a relational database?

A

A relational database is a type of database that stores data in tables, which are structured in rows and columns.

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

True or False: In a relational database, each table can have a unique primary key.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
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
4
Q

Fill in the blank: A __________ is a set of related data stored in a table.

A

relation

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

Which of the following is NOT a characteristic of a relational database? (a) Data is organized in tables (b) Data is stored in files (c) Relationships are established using keys

A

b

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

What is a primary key?

A

A primary key is a unique identifier for a record in a table.

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

What is a foreign key?

A

A foreign key is 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
8
Q

True or False: A relational database allows for data redundancy.

A

False

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

What is normalization in the context of relational databases?

A

Normalization is the process of organizing data to minimize redundancy and improve data integrity.

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

Fill in the blank: The process of combining data from multiple tables is known as __________.

A

joining

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

What does the term ‘schema’ refer to in a relational database?

A

A schema is the structure that defines the organization of data, including tables, fields, and relationships.

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

Which SQL 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
13
Q

What is a composite key?

A

A composite key is a combination of two or more columns in a table that can uniquely identify a record.

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

True or False: A table can have multiple primary keys.

A

False

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

What is the purpose of indexing in a relational database?

A

Indexing improves the speed of data retrieval operations on a database table.

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

Fill in the blank: The __________ operation is used to add new records to a table.

A

INSERT

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

What are constraints in a relational database?

A

Constraints are rules enforced on data columns to ensure data integrity.

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

What SQL command is used to update existing records?

A

UPDATE

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

True or False: A relational database can only store one type of data.

20
Q

What is the difference between a primary key and a unique key?

A

A primary key uniquely identifies a record and cannot contain null values, while a unique key also enforces uniqueness but can contain null values.

21
Q

What does the term ‘referential integrity’ mean?

A

Referential integrity ensures that relationships between tables remain consistent.

22
Q

Fill in the blank: The __________ clause is used to filter records in SQL.

23
Q

What is a view in a relational database?

A

A view is a virtual table that is based on the result of a SELECT query.

24
Q

What SQL command is used to delete records from a table?

25
True or False: A relational database can be distributed across multiple servers.
True
26
What is a transaction in the context of databases?
A transaction is a sequence of operations performed as a single logical unit of work.
27
Fill in the blank: The __________ property ensures that a transaction is completed entirely or not at all.
atomicity
28
What is the purpose of the GROUP BY clause in SQL?
The GROUP BY clause is used to arrange identical data into groups.
29
What is a stored procedure?
A stored procedure is a set of SQL statements that can be stored and reused.
30
True or False: Data in a relational database is inherently unstructured.
False
31
What is the ACID property in the context of transactions?
ACID stands for Atomicity, Consistency, Isolation, and Durability, which are properties that guarantee reliable transaction processing.
32
What is a database management system (DBMS)?
A DBMS is software that interacts with end users, applications, and the database itself to capture and analyze data.
33
Fill in the blank: The __________ function is used to calculate the average value of a numeric column.
AVG
34
What does the term 'denormalization' refer to?
Denormalization is the process of intentionally introducing redundancy into a database to improve performance.
35
What is a data model?
A data model is a conceptual representation of data structures and their relationships.
36
True or False: Relationships in a relational database can be one-to-one, one-to-many, or many-to-many.
True
37
What is a data dictionary?
A data dictionary is a centralized repository of information about data, including definitions, relationships, and formats.
38
Fill in the blank: The __________ function is used to count the number of rows in a table.
COUNT
39
What is the purpose of the ORDER BY clause in SQL?
The ORDER BY clause is used to sort the result set of a query by one or more columns.
40
What is the significance of the NULL value in a relational database?
NULL represents the absence of a value or an unknown value.
41
True or False: In a relational database, a table can have multiple foreign keys.
True
42
What does the term 'cardinality' refer to in the context of database relationships?
Cardinality refers to the uniqueness of data values contained in a particular column (attribute) of a database table.
43
Fill in the blank: The __________ operation is used to combine rows from two or more tables based on a related column.
JOIN
44
What is a trigger in a database?
A trigger is a set of instructions that are automatically executed in response to certain events on a particular table.
45
What is the purpose of the HAVING clause in SQL?
The HAVING clause is used to filter records after a GROUP BY operation.