2-Databases Flashcards

1-Intro to Databases 2-Types of Databases

1
Q

What does SQL stand for?
A) Structured Query Language
B) Simple Query Language
C) Secure Query Language
D) Server Query Language

A

A) Structured Query Language

Explanation: SQL stands for Structured Query Language, which is used to manage and manipulate databases.

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

Which database system is commonly vulnerable to SQL injection?
A) NoSQL
B) MongoDB
C) MySQL
D) All of the above

A

C) MySQL

Explanation: While SQL injection primarily targets SQL databases like MySQL, NoSQL databases can be vulnerable to other types of injection attacks.

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

What is a primary feature of a Database Management System (DBMS)?
A) Data duplication
B) Concurrency
C) Unstructured data handling
D) Manual query operation

A

B) Concurrency

Explanation: Concurrency is a feature of DBMSs that allows multiple users to interact with the database simultaneously without issues like data corruption.

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

How can SQL injections be prevented?
A) By increasing database size
B) By using file-based databases
C) By using parameterized queries
D) By disabling databases

A

C) By using parameterized queries

Explanation: Parameterized queries help prevent SQL injections by separating SQL code from data, thus avoiding the execution of harmful injected code.

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

What could be an impact of a successful SQL Injection attack?
A) Improved database performance
B) Unauthorized data access
C) Enhanced database security
D) Reduction in data storage needs

A

B) Unauthorized data access

Explanation: SQL injection can lead to unauthorized data access, where attackers can view, modify, or delete data they shouldn’t be able to access.

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

What SQL technique involves merging the results of two queries?
A) Join
B) Index
C) Union
D) Group

A

C) Union

Explanation: The UNION SQL operation is used to combine the results of two distinct SELECT queries into a single result set.

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

Which DBMS feature ensures data integrity?
A) Reliability
B) Security
C) Consistency
D) Backup

A

C) Consistency

Explanation: Consistency in a DBMS ensures that data remains accurate and valid across all transactions and at all times.

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

Which is a NOT a method to interact with a DBMS?
A) APIs
B) GUIs
C) Command-line tools
D) Manual recording

A

D) Manual recording

Explanation: DBMS interactions are typically conducted through APIs, graphical interfaces, or command-line tools, not manual recording.

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

What is a common consequence of SQL injection?
A) Faster data retrieval
B) Database corruption
C) Increased security
D) Automated data backups

A

B) Database corruption

Explanation: SQL injection can lead to database corruption as malicious queries alter or damage data structures or content.

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

Which approach helps secure a DBMS?
A) Reducing user permissions
B) Fine-grained security controls
C) Eliminating backups
D) Using outdated software

A

B) Fine-grained security controls

Explanation: Fine-grained security controls, such as user authentication and permissions, help prevent unauthorized access and modifications to the database.

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

What is unique about Relational Databases?
A) They do not use SQL
B) They use a schema to define data structure
C) They do not allow for data retrieval
D) They store data without a defined structure

A

B) They use a schema to define data structure

Explanation: Relational databases use a schema to define how data is structured, which helps maintain data accuracy and organization.

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

Which database type is best suited for handling unstructured data?
A) Relational Database
B) Graph Database
C) NoSQL Database
D) SQL Database

A

C) NoSQL Database

Explanation: NoSQL databases are ideal for unstructured data due to their flexible schema-less architecture, which allows them to handle a variety of data forms easily.

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

Which of these is a key feature of Relational Databases?
A) Lack of schema
B) Key-value storage model
C) Relationship between tables
D) All data stored as single document

A

C) Relationship between tables

Explanation: A key feature of relational databases is the relationship between tables, often managed through foreign keys that help maintain data integrity across different tables.

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

How do NoSQL databases typically store data?
A) In strictly structured SQL tables
B) As JSON or XML in key-value pairs
C) Only in graph formats
D) Using relational models

A

B) As JSON or XML in key-value pairs

Explanation: NoSQL databases often use key-value storage models, where data is stored in formats like JSON or XML, allowing for flexible and scalable data management.

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

What does RDBMS stand for?
A) Real Database Management System
B) Relational Database Management System
C) Rapid Database Management System
D) Reduced Database Management System

A

B) Relational Database Management System

Explanation: RDBMS stands for Relational Database Management System, which is a database management system that supports relational models.

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

Which type of database is known for its scalability?
A) Relational Database
B) NoSQL Database
C) SQL Server
D) Oracle

A

B) NoSQL Database

Explanation: NoSQL databases are well-known for their scalability, largely due to their flexible data models and efficiency in handling large volumes of diverse data.

17
Q

What is the primary method of interaction in a Relational Database?
A) Using NoSQL queries
B) Through direct file manipulation
C) SQL queries
D) Manual entry only

A

C) SQL queries

Explanation: Relational databases primarily interact through SQL queries, allowing for structured and efficient manipulation of stored data.

18
Q

Which of the following is NOT a characteristic of NoSQL databases?
A) Use of schemas
B) Scalability
C) Flexibility in data modeling
D) Handling unstructured data

A

A) Use of schemas

Explanation: NoSQL databases do not use traditional schemas, which is what allows them flexibility and scalability to handle unstructured data efficiently.

19
Q

In a relational database, what does a ‘key’ do?
A) Encrypts the database
B) Connects tables within the database
C) Reduces database size
D) Converts SQL to NoSQL

A

B) Connects tables within the database

Explanation: In relational databases, keys are used to link tables together, enabling quick access to related data across different tables.

20
Q

Which database model is typically used by companies with large, complex data relationships?
A) Key-Value
B) Document-Based
C) Graph
D) Relational

A

D) Relational

Explanation: Companies with large and complex data relationships often use relational databases due to their ability to maintain strong data integrity and support complex queries and relationships.