Data Flashcards

(81 cards)

1
Q

What is the data structure used in SQL?

A

Tables with rows and columns

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

What type of data structure is used in NoSQL?

A

Document-based, key-value, column-family, or graph-based

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

What type of schema does SQL use?

A

Fixed schema (predefined structure)

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

What type of schema does NoSQL have?

A

Flexible schema (dynamic and adaptable)

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

What is the scalability method for SQL databases?

A

Vertically scalable (upgrading hardware)

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

What is the scalability method for NoSQL databases?

A

Horizontally scalable (adding more servers)

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

What does ACID stand for in SQL?

A

Atomicity, Consistency, Isolation, Durability

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

What does BASE stand for in NoSQL?

A

Basically Available, Soft state, Eventually consistent

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

What is the query language used in SQL?

A

SQL (Structured Query Language)

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

What type of query language is used in NoSQL?

A

Varies (e.g., MongoDB uses its own query language)

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

Which type of database is efficient for complex queries and transactions?

A

SQL

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

Which type of database is better for large-scale data and fast read/write operations?

A

NoSQL

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

What are the best use cases for SQL databases?

A

Transactional systems (banking, ERP, etc.)

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

What are ideal use cases for NoSQL databases?

A

Big data, real-time web apps, and data lakes

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

Name an example of an SQL database.

A

MySQL, PostgreSQL, Oracle, MS SQL Server

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

Name an example of a NoSQL database.

A

MongoDB, Cassandra, CouchDB, Neo4j

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

What is SQL?

A

SQL stands for ‘Structured Query Language’ and is used in managing data in relational database management systems (RDBMS) since the 1970s.

SQL databases focus on reducing data duplication.

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

What type of database is SQL?

A

Relational database

SQL databases store data in rows and tables that are linked in various ways.

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

What are the key characteristics of SQL databases?

A
  • Predefined schemas
  • Relational structure
  • Fast data storage and recovery
  • Ability to handle complex SQL queries

SQL databases can link one record to another or many records to many others.

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

What is a NoSQL database?

A

NoSQL is a non-relational database that allows different structures than a SQL database and offers more flexibility.

The term ‘NoSQL’ was coined in the early 2000s and does not mean that SQL commands are not used.

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

What does NoSQL stand for?

A

Not only SQL

The term emphasizes that NoSQL databases can support some SQL commands.

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

What are the key differences between SQL and NoSQL databases?

A
  • Relational (SQL) vs. non-relational (NoSQL)
  • Predefined schemas (SQL) vs. dynamic schemas (NoSQL)
  • Scaling methods
  • Data types included
  • Fit for multi-row transactions (SQL) vs. unstructured data (NoSQL)

These differences make each type of database suitable for different use cases.

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

Fill in the blank: SQL databases are better suited for _______.

A

multi-row transactions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Fill in the blank: NoSQL databases are better suited for _______.
unstructured data
26
What type of data do SQL databases handle?
Structured data with relationships between variables and entities ## Footnote Structured data refers to data that is organized in a defined manner, making it easily searchable and analyzable.
27
What is vertical scalability in SQL databases?
Increasing load on a server by migrating to a larger server with more CPU, RAM, or SSD capability ## Footnote Vertical scalability is the most frequently used method for scaling SQL databases.
28
What is horizontal scalability in SQL databases?
Scaling through sharding or partitioning logic ## Footnote Horizontal scalability is less commonly supported in SQL databases compared to vertical scalability.
29
What organizes data in SQL databases?
A relational, tabular schema using tables with columns and rows of records ## Footnote This structure allows for organized and efficient data management.
30
What does ACID stand for in the context of RDBMS?
Atomicity, Consistency, Isolation, Durability ## Footnote These properties ensure reliable transaction processing in SQL databases.
31
Define Atomicity in SQL databases.
All transactions must succeed or fail completely ## Footnote This ensures that no transaction is left partially complete, even in the event of system failure.
32
What does Consistency ensure in SQL databases?
The database follows rules that validate and prevent corruption ## Footnote Consistency is crucial for maintaining data integrity throughout transactions.
33
What is Isolation in SQL databases?
Concurrent transactions cannot affect each other ## Footnote This property allows for safe execution of transactions simultaneously without interference.
34
What does Durability guarantee in SQL databases?
Transactions are final and cannot be rolled back even after a system failure ## Footnote This ensures that once a transaction is committed, it remains so.
35
What is a significant advantage of SQL databases?
Large communities and stable codebases available for support ## Footnote The long history of SQL databases contributes to their reliability and the availability of experts.
36
Name three examples of SQL databases.
* Db2 * MySQL * PostgreSQL ## Footnote Other examples include YugabyteDB, CockroachDB, Oracle Database, and Azure SQL Database.
37
What is a key feature of NoSQL systems compared to SQL?
NoSQL systems allow you to work with different data structures within a database.
38
What advantage does NoSQL offer regarding data schema?
NoSQL allows a dynamic schema for unstructured data.
39
What does it mean for NoSQL databases to have less need for pre-planning?
It means modifications to data are easier to implement.
40
How do NoSQL databases handle new attributes and fields?
They allow the addition of new attributes and fields.
41
What is the primary scaling advantage of NoSQL databases?
NoSQL databases scale better horizontally.
42
What does horizontal scaling in NoSQL databases involve?
It involves adding additional servers or nodes as needed to increase load.
43
How do NoSQL databases differ in structure from relational databases?
NoSQL databases are not relational and do not solely store data in rows and tables.
44
What are the four types of structures that NoSQL databases generally fall into?
* Column-oriented * Key-value stores * Document stores * Graph databases
45
What is the defining characteristic of column-oriented NoSQL databases?
Data is stored in cells grouped in a virtually unlimited number of columns.
46
What data model do key-value stores use?
Key-value stores use an associative array as their data model.
47
What are document stores in NoSQL databases?
Document stores use documents to hold and encode data in standard formats.
48
Which formats can document stores encode data in?
* XML * YAML * JSON * BSON
49
What is a benefit of using document stores in NoSQL databases?
Documents within a single database can have different data types.
50
What do graph databases represent?
Graph databases represent data on a graph that shows how different sets of data relate to each other.
51
Name two examples of graph databases.
* Neo4j * RedisGraph
52
True or False: NoSQL databases require a fixed schema to store data.
False
53
What properties does SQL call for?
ACID properties ## Footnote ACID stands for Atomicity, Consistency, Isolation, Durability.
54
What theory does NoSQL follow?
CAP theory
55
What does the CAP theorem state?
Distributed data systems can guarantee only two of the following three properties at any one time: Consistency, Availability, Partition tolerance.
56
What is the first property described by the CAP theorem?
Consistency
57
What does Consistency ensure in the context of the CAP theorem?
Every request receives either the most recent result or an error.
58
Which NoSQL database is an example of a strongly consistent system?
MongoDB
59
What does Availability mean in the context of the CAP theorem?
Every request has a non-error result.
60
What is meant by Partition tolerance?
Any delays or losses between nodes do not interrupt the system operation.
61
What is a disadvantage of NoSQL in terms of user support?
Smaller user communities lead to less support.
62
What advantage do NoSQL users benefit from?
Open-source systems
63
List three examples of NoSQL databases.
* Redis * CouchDB * MongoDB
64
Fill in the blank: NoSQL databases can also integrate and follow _______ rules.
ACID
65
True or False: All NoSQL databases prioritize consistency over availability.
False
66
Name two NoSQL databases that offer eventual consistency.
* Cassandra * Others (not specified)
67
Name three more examples of NoSQL databases.
* Elasticsearch * BigTable * Neo4j
68
What is one proprietary aspect of many SQL languages?
They are proprietary.
69
What is the third property described by the CAP theorem?
Partition tolerance
70
When is SQL a good choice?
When working with related data and needing efficient, flexible access ## Footnote SQL is beneficial for data integrity and real-time updates.
71
What is a key benefit of relational databases in SQL?
Automatic refresh of every instance when one user updates a record ## Footnote This ensures real-time data access.
72
What is an advantage of using SQL for data management?
Ease of handling large amounts of information and scaling as necessary ## Footnote Data integrity is also a strong point.
73
Which major tech companies use SQL?
* Uber * Netflix * Airbnb * Google * Facebook * Amazon ## Footnote These companies utilize SQL for querying and analyzing data.
74
When is NoSQL a better choice than SQL?
When fast availability of big data is prioritized and scalability is needed ## Footnote NoSQL is flexible and offers high performance.
75
What types of data are well-suited for NoSQL databases?
* Large amounts of unstructured data * Ever-changing data sets * Flexible data models ## Footnote NoSQL fits needs that do not align with a relational model.
76
What are some examples of document databases in NoSQL?
* CouchDB * MongoDB * Amazon DocumentDB ## Footnote These are effective for working with unstructured data.
77
What is Redis best used for?
Quick access to a key-value store without strong integrity guarantees ## Footnote Ideal for fast data retrieval.
78
What is Elastic Search used for?
Complex or flexible searches across large datasets ## Footnote It offers powerful search capabilities.
79
What scalability benefits do NoSQL databases provide?
Built-in sharding and high availability for horizontal scaling ## Footnote This contrasts with SQL's typical vertical scaling.
80
Which NoSQL database was developed by Facebook?
Cassandra ## Footnote It is designed to handle massive data across many servers.
81
What is a general rule for choosing between SQL and NoSQL?
The more extensive the dataset, the more likely NoSQL is a better choice ## Footnote NoSQL handles large volumes of data more effectively.