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
Q

What is a view in a database?

A

A view is a virtual table based on the result set of a SQL query.

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

Multiple Choice: Which of these is an example of a SQL database? A) MongoDB B) PostgreSQL C) Cassandra D) Redis

A

B) PostgreSQL

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

What is denormalization?

A

Denormalization is the process of intentionally introducing redundancy into a database to improve read performance.

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

True or False: A data warehouse is designed for transaction processing.

A

False

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

Fill in the blank: The _______ command in SQL is used to update existing records.

A

UPDATE

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

What is the purpose of a database trigger?

A

A trigger is a set of instructions that are automatically executed in response to certain events on a particular table or view.

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

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

A

C) Uses tables

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

What is horizontal scaling?

A

Horizontal scaling involves adding more machines or nodes to a system to handle increased load.

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

True or False: A primary key can accept null values.

A

False

34
Q

Fill in the blank: In SQL, the _______ clause is used to sort the result set.

A

ORDER BY

35
Q

What is a database cluster?

A

A database cluster is a collection of databases that work together to provide high availability and load balancing.

36
Q

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

A

D) Multi-table store

37
Q

What is the purpose of data replication?

A

Data replication is used to copy and maintain database objects in multiple locations to ensure data availability and reliability.

38
Q

True or False: A column in a database table can store multiple data types.

A

False

39
Q

Fill in the blank: A _______ is a collection of related data items, often represented in a table format.

A

record

40
Q

What is the difference between a database and a data warehouse?

A

A database is designed for transaction processing, while a data warehouse is designed for analytical processing and large-scale data analysis.

41
Q

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

A

C) Stores data in columns

42
Q

What does the term ‘sharding’ refer to in databases?

A

Sharding is the process of dividing a database into smaller, more manageable pieces called shards.

43
Q

True or False: Referential integrity ensures that relationships between tables remain consistent.

A

True

44
Q

Fill in the blank: The _______ constraint ensures that a value in a column is unique across all rows in a table.

A

UNIQUE

45
Q

What is a data model’s purpose?

A

A data model’s purpose is to define how data is connected, stored, and processed.

46
Q

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

A

D) All of the above

47
Q

What is the difference between a database and a data mart?

A

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
Q

True or False: Data mining involves extracting patterns from large datasets.

A

True

49
Q

Fill in the blank: The _______ command is used to create a new table in SQL.

A

CREATE

50
Q

What is the purpose of a database backup?

A

A database backup is used to create a copy of the database to protect against data loss.

51
Q

Multiple Choice: Which of the following is a non-relational database? A) Oracle B) MySQL C) MongoDB D) SQL Server

A

C) MongoDB

52
Q

What does the term ‘data integrity’ mean?

A

Data integrity refers to the accuracy and consistency of data stored in a database.

53
Q

True or False: A database can have multiple schemas.

A

True

54
Q

Fill in the blank: The _______ function in SQL is used to count the number of rows in a result set.

A

COUNT

55
Q

What is a database schema?

A

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

56
Q

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

A

B) Scalability

57
Q

What is the purpose of an ORM (Object-Relational Mapping)?

A

ORM is a programming technique used to convert data between incompatible type systems in object-oriented programming languages.

58
Q

True or False: Data lakes store raw data in its native format.

A

True

59
Q

Fill in the blank: The _______ operator in SQL is used to combine the results of two or more SELECT statements.

A

UNION

60
Q

What is a database connection pool?

A

A database connection pool is a cache of database connections maintained in memory to be reused for future requests.

61
Q

Multiple Choice: Which SQL command is used to modify the structure of an existing table? A) SELECT B) INSERT C) ALTER D) UPDATE

A

C) ALTER

62
Q

What is the purpose of database partitioning?

A

Database partitioning is used to divide a database into smaller, more manageable pieces to improve performance and manageability.

63
Q

True or False: A data model can be both conceptual and physical.

A

True

64
Q

Fill in the blank: A _______ is a software application that allows users to create and manage databases.

A

DBMS (Database Management System)

65
Q

What is the role of a database administrator (DBA)?

A

A DBA is responsible for managing, maintaining, and securing a database system.

66
Q

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

A

C) Data consistency

67
Q

What is the purpose of data encryption in databases?

A

Data encryption is used to protect sensitive data by converting it into a format that is unreadable without a decryption key.

68
Q

True or False: A database can be replicated across multiple servers for high availability.

A

True

69
Q

Fill in the blank: The _______ command is used to grant privileges to users in SQL.

A

GRANT

70
Q

What is a materialized view?

A

A materialized view is a database object that contains the results of a query and is stored physically for faster access.

71
Q

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

A

D) All of the above

72
Q

What does the term ‘latency’ refer to in database performance?

A

Latency refers to the time delay between a request for data and the delivery of that data.

73
Q

True or False: A database transaction can be rolled back if an error occurs.

A

True

74
Q

Fill in the blank: The _______ command is used to set permissions for users in a database.

A

REVOKE

75
Q

What is the function of a database log?

A

A database log records all changes made to the database to ensure data integrity and support recovery.

76
Q

Multiple Choice: Which of the following is a common SQL database? A) SQLite B) Cassandra C) Redis D) DynamoDB

A

A) SQLite

77
Q

What is a transaction log?

A

A transaction log is a record of all transactions that have been executed against a database.

78
Q

True or False: A database can be designed to be both read-optimized and write-optimized.

A

True

79
Q

Fill in the blank: The _______ function in SQL is used to return the highest value in a set.

A

MAX

80
Q

What is the purpose of data auditing in databases?

A

Data auditing is the process of reviewing and examining data for accuracy and compliance with regulations.

81
Q

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

A) Schema-less