Databases Flashcards

1
Q

What is a database?

A

A database is an organized collection of structured information or data, typically stored electronically in a computer system.

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

True or False: A relational database stores data in tables with predefined relationships.

A

True

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

Fill in the blank: In a relational database, a _______ is a unique identifier for a record in a table.

A

primary key

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

What is SQL?

A

SQL (Structured Query Language) is a standard programming language used to manage and manipulate relational databases.

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

What does ACID stand for in database transactions?

A

Atomicity, Consistency, Isolation, Durability

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

Multiple Choice: Which of the following is not a type of database? A) SQL B) NoSQL C) HTML D) NewSQL

A

C) HTML

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

What is the purpose of an index in a database?

A

An index 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
8
Q

True or False: A NoSQL database is designed to handle unstructured data.

A

True

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

Fill in the blank: A _______ is a collection of related data entries and it consists of multiple records.

A

table

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

What is normalization in 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
11
Q

Multiple Choice: Which of the following is a characteristic of a NoSQL database? A) Fixed schema B) Horizontal scalability C) Use of SQL D) Rigid data structure

A

B) Horizontal scalability

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

What is a foreign key?

A

A foreign key is a field in one table that uniquely identifies a row of another table, establishing a relationship between the two tables.

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

True or False: A stored procedure is a set of SQL statements that can be stored and reused.

A

True

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

Fill in the blank: The _______ command in SQL 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
15
Q

What is data redundancy?

A

Data redundancy occurs when the same piece of data is stored in multiple places within a database.

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

Multiple Choice: Which of the following is a type of NoSQL database? A) Document store B) Relational C) Object-oriented D) Hierarchical

A

A) Document store

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

What is a database management system (DBMS)?

A

A DBMS is software that interacts with end users, applications, and the database itself to capture and analyze data.

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

True or False: Data integrity ensures accuracy and consistency of data over its lifecycle.

A

True

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

Fill in the blank: In SQL, the _______ clause is used to filter records.

A

WHERE

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

What is a transaction in the context of databases?

A

A transaction is a sequence of operations performed as a single logical unit of work.

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

Multiple Choice: Which of these is a benefit of using a database? A) Data isolation B) Data redundancy C) Reduced data integrity D) Increased complexity

A

A) Data isolation

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

What does the term ‘data model’ refer to?

A

A data model is a conceptual representation of data structures that organizes data elements and standardizes how they relate to one another.

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

True or False: A schema defines the structure of a database including tables, fields, and relationships.

A

True

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

Fill in the blank: The _______ command is used to remove records from a table in SQL.

A

DELETE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is a view in a database?
A view is a virtual table based on the result set of a SQL query.
26
Multiple Choice: Which of these is an example of a SQL database? A) MongoDB B) PostgreSQL C) Cassandra D) Redis
B) PostgreSQL
27
What is denormalization?
Denormalization is the process of intentionally introducing redundancy into a database to improve read performance.
28
True or False: A data warehouse is designed for transaction processing.
False
29
Fill in the blank: The _______ command in SQL is used to update existing records.
UPDATE
30
What is the purpose of a database trigger?
A trigger is a set of instructions that are automatically executed in response to certain events on a particular table or view.
31
Multiple Choice: Which of the following is a characteristic of a relational database? A) Schema-less B) Data is stored in key-value pairs C) Uses tables D) Unstructured data
C) Uses tables
32
What is horizontal scaling?
Horizontal scaling involves adding more machines or nodes to a system to handle increased load.
33
True or False: A primary key can accept null values.
False
34
Fill in the blank: In SQL, the _______ clause is used to sort the result set.
ORDER BY
35
What is a database cluster?
A database cluster is a collection of databases that work together to provide high availability and load balancing.
36
Multiple Choice: Which of the following is NOT a type of NoSQL database? A) Key-value store B) Column-family store C) Document store D) Multi-table store
D) Multi-table store
37
What is the purpose of data replication?
Data replication is used to copy and maintain database objects in multiple locations to ensure data availability and reliability.
38
True or False: A column in a database table can store multiple data types.
False
39
Fill in the blank: A _______ is a collection of related data items, often represented in a table format.
record
40
What is the difference between a database and a data warehouse?
A database is designed for transaction processing, while a data warehouse is designed for analytical processing and large-scale data analysis.
41
Multiple Choice: Which of the following best describes a column-family database? A) Stores data in rows B) Stores data in documents C) Stores data in columns D) Stores data in graphs
C) Stores data in columns
42
What does the term 'sharding' refer to in databases?
Sharding is the process of dividing a database into smaller, more manageable pieces called shards.
43
True or False: Referential integrity ensures that relationships between tables remain consistent.
True
44
Fill in the blank: The _______ constraint ensures that a value in a column is unique across all rows in a table.
UNIQUE
45
What is a data model's purpose?
A data model's purpose is to define how data is connected, stored, and processed.
46
Multiple Choice: Which of the following is a common file format for data exchange? A) CSV B) XML C) JSON D) All of the above
D) All of the above
47
What is the difference between a database and a data mart?
A database is a central repository for data, while a data mart is a subset of a data warehouse focused on a specific business area.
48
True or False: Data mining involves extracting patterns from large datasets.
True
49
Fill in the blank: The _______ command is used to create a new table in SQL.
CREATE
50
What is the purpose of a database backup?
A database backup is used to create a copy of the database to protect against data loss.
51
Multiple Choice: Which of the following is a non-relational database? A) Oracle B) MySQL C) MongoDB D) SQL Server
C) MongoDB
52
What does the term 'data integrity' mean?
Data integrity refers to the accuracy and consistency of data stored in a database.
53
True or False: A database can have multiple schemas.
True
54
Fill in the blank: The _______ function in SQL is used to count the number of rows in a result set.
COUNT
55
What is a database schema?
A database schema is the structure that defines the organization of data in a database, including tables, fields, and relationships.
56
Multiple Choice: Which of the following is a feature of a cloud database? A) On-premises storage B) Scalability C) Fixed resources D) Local access only
B) Scalability
57
What is the purpose of an ORM (Object-Relational Mapping)?
ORM is a programming technique used to convert data between incompatible type systems in object-oriented programming languages.
58
True or False: Data lakes store raw data in its native format.
True
59
Fill in the blank: The _______ operator in SQL is used to combine the results of two or more SELECT statements.
UNION
60
What is a database connection pool?
A database connection pool is a cache of database connections maintained in memory to be reused for future requests.
61
Multiple Choice: Which SQL command is used to modify the structure of an existing table? A) SELECT B) INSERT C) ALTER D) UPDATE
C) ALTER
62
What is the purpose of database partitioning?
Database partitioning is used to divide a database into smaller, more manageable pieces to improve performance and manageability.
63
True or False: A data model can be both conceptual and physical.
True
64
Fill in the blank: A _______ is a software application that allows users to create and manage databases.
DBMS (Database Management System)
65
What is the role of a database administrator (DBA)?
A DBA is responsible for managing, maintaining, and securing a database system.
66
Multiple Choice: Which of the following is a benefit of using a relational database? A) Flexibility B) Simplicity C) Data consistency D) All of the above
C) Data consistency
67
What is the purpose of data encryption in databases?
Data encryption is used to protect sensitive data by converting it into a format that is unreadable without a decryption key.
68
True or False: A database can be replicated across multiple servers for high availability.
True
69
Fill in the blank: The _______ command is used to grant privileges to users in SQL.
GRANT
70
What is a materialized view?
A materialized view is a database object that contains the results of a query and is stored physically for faster access.
71
Multiple Choice: Which of the following is a common use case for a key-value store? A) E-commerce product catalog B) User session management C) Financial transactions D) All of the above
D) All of the above
72
What does the term 'latency' refer to in database performance?
Latency refers to the time delay between a request for data and the delivery of that data.
73
True or False: A database transaction can be rolled back if an error occurs.
True
74
Fill in the blank: The _______ command is used to set permissions for users in a database.
REVOKE
75
What is the function of a database log?
A database log records all changes made to the database to ensure data integrity and support recovery.
76
Multiple Choice: Which of the following is a common SQL database? A) SQLite B) Cassandra C) Redis D) DynamoDB
A) SQLite
77
What is a transaction log?
A transaction log is a record of all transactions that have been executed against a database.
78
True or False: A database can be designed to be both read-optimized and write-optimized.
True
79
Fill in the blank: The _______ function in SQL is used to return the highest value in a set.
MAX
80
What is the purpose of data auditing in databases?
Data auditing is the process of reviewing and examining data for accuracy and compliance with regulations.
81
Multiple Choice: Which of the following is a characteristic of a document store? A) Schema-less B) Uses tables C) Fixed data structure D) All of the above
A) Schema-less