A relational database stores data in tables with rows and columns. Each table has a unique key, and tables can be linked using these keys. It is like a spreadsheet where data is organized and easy to find.
Click to reveal answer
beginner
What does NoSQL stand for and what is its main feature?
NoSQL means 'Not Only SQL'. It stores data in flexible ways like documents, key-value pairs, or graphs instead of tables. It is good for handling large or changing data quickly.
Click to reveal answer
intermediate
How does an object-oriented database store data?
An object-oriented database stores data as objects, like in programming. Each object contains data and actions. It is useful when data is complex and related to real-world objects.
Click to reveal answer
beginner
Name one advantage of relational databases.
Relational databases are good at keeping data organized and consistent using rules called constraints. They make it easy to search and join data from different tables.
Click to reveal answer
intermediate
Why might someone choose a NoSQL database over a relational one?
NoSQL databases are chosen when data changes often or is very large. They can handle many users and different data types faster and more flexibly than relational databases.
Click to reveal answer
Which type of database stores data in tables with rows and columns?
ANoSQL database
BRelational database
CObject-oriented database
DGraph database
✗ Incorrect
Relational databases organize data in tables with rows and columns.
What is a key feature of NoSQL databases?
AStrict table structure
BUses only SQL queries
CFlexible data storage formats
DOnly stores numbers
✗ Incorrect
NoSQL databases store data in flexible formats like documents or key-value pairs.
Which database type stores data as objects with both data and actions?
AHierarchical
BNoSQL
CRelational
DObject-oriented
✗ Incorrect
Object-oriented databases store data as objects containing data and methods.
Which database type is best for handling large, changing data quickly?
ANoSQL
BRelational
CObject-oriented
DFlat file
✗ Incorrect
NoSQL databases are designed for large and rapidly changing data.
What is a common use of relational databases?
AOrganizing data with clear relationships
BHandling unstructured data
CStoring complex objects with methods
DStoring data without any structure
✗ Incorrect
Relational databases organize data with clear relationships using tables.
Explain the main differences between relational, NoSQL, and object-oriented databases.
Think about how data is organized and accessed in each type.
You got /3 concepts.
When would you choose a NoSQL database instead of a relational database?
Consider the nature and size of the data.
You got /3 concepts.
Practice
(1/5)
1. Which type of database stores data in tables and uses SQL for queries?
easy
A. Object-oriented database
B. NoSQL database
C. Graph database
D. Relational database
Solution
Step 1: Understand database types
Relational databases organize data in tables with rows and columns.
Step 2: Identify query language
They use SQL (Structured Query Language) to manage and query data.
Final Answer:
Relational database -> Option D
Quick Check:
Tables + SQL = Relational database [OK]
Hint: Tables and SQL mean relational database [OK]
Common Mistakes:
Confusing NoSQL with relational because both store data
Thinking object-oriented databases use SQL
Assuming graph databases are relational
2. Which of the following is the correct way to describe a NoSQL database?
easy
A. Stores flexible data like documents or key-value pairs
B. Stores data only in tables with fixed schema
C. Stores data as objects matching programming languages
D. Uses only SQL for data queries
Solution
Step 1: Recall NoSQL database features
NoSQL databases store data flexibly, often as documents or key-value pairs.
Step 2: Eliminate incorrect options
They do not require fixed schemas or only tables, and do not rely solely on SQL.
Final Answer:
Stores flexible data like documents or key-value pairs -> Option A
Quick Check:
No fixed schema + flexible data = NoSQL [OK]
Hint: Flexible data storage means NoSQL [OK]
Common Mistakes:
Thinking NoSQL uses only tables
Confusing object-oriented with NoSQL
Assuming NoSQL requires SQL queries
3. Given the following description, which database type fits best? Data is stored as objects with properties and methods, similar to programming languages.
medium
A. Relational database
B. NoSQL database
C. Object-oriented database
D. Hierarchical database
Solution
Step 1: Analyze data storage style
The data is stored as objects with properties and methods, matching programming language objects.
Step 2: Match to database type
Object-oriented databases store data as objects, unlike relational or NoSQL databases.
Final Answer:
Object-oriented database -> Option C
Quick Check:
Objects with methods = Object-oriented database [OK]
Hint: Objects with methods mean object-oriented DB [OK]
Common Mistakes:
Confusing object-oriented with NoSQL
Thinking relational databases store objects
Assuming hierarchical is object-oriented
4. Identify the error in this statement: NoSQL databases always use SQL queries to retrieve data.
medium
A. No error, statement is correct
B. NoSQL databases do not use SQL queries
C. NoSQL databases only store data in tables
D. NoSQL databases are a type of relational database
Solution
Step 1: Understand NoSQL query methods
NoSQL databases typically use query methods other than SQL, like JSON queries or key-value lookups.
Step 2: Identify the error
The statement wrongly claims NoSQL always uses SQL, which is false.
Final Answer:
NoSQL databases do not use SQL queries -> Option B
Quick Check:
NoSQL ≠ SQL queries [OK]
Hint: NoSQL means no SQL queries [OK]
Common Mistakes:
Believing NoSQL uses SQL
Confusing NoSQL with relational
Thinking NoSQL stores only tables
5. A company wants to store user profiles with flexible fields that can change often, and also wants to store some complex objects with methods for processing. Which combination of databases should they use?
hard
A. A NoSQL database for flexible data and an object-oriented database for complex objects
B. Only a relational database
C. Only a NoSQL database
D. Only an object-oriented database
Solution
Step 1: Analyze data needs
Flexible fields suggest NoSQL for schema flexibility; complex objects with methods suggest object-oriented database.
Step 2: Choose suitable combination
Using both NoSQL and object-oriented databases fits the requirements best.
Final Answer:
A NoSQL database for flexible data and an object-oriented database for complex objects -> Option A