Challenge - 5 Problems
Database Types Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Identify the database type from description
Which type of database stores data in tables with rows and columns and uses SQL for queries?
Attempts:
2 left
💡 Hint
Think about databases that organize data in rows and columns.
✗ Incorrect
Relational databases organize data in tables with rows and columns and use SQL to query data.
❓ query_result
intermediate2:00remaining
Output of NoSQL document query
Given a NoSQL document database with a collection of user documents, what is the output of this query?
Assuming the collection has three users aged 25, 35, and 40.
db.users.find({"age": {"$gt": 30}})Assuming the collection has three users aged 25, 35, and 40.
Attempts:
2 left
💡 Hint
The query filters users older than 30.
✗ Incorrect
The query finds users with age greater than 30, so it returns users aged 35 and 40.
📋 Factual
advanced2:00remaining
Identify the correct object-oriented database query syntax
Which of the following is a valid way to query objects in an object-oriented database?
Attempts:
2 left
💡 Hint
Object-oriented databases often use method calls on objects.
✗ Incorrect
Option B uses a method call style typical for object-oriented databases to filter objects.
❓ optimization
advanced2:00remaining
Best database type for hierarchical data
You need to store and query hierarchical data like organizational charts efficiently. Which database type is best suited?
Attempts:
2 left
💡 Hint
Think about databases designed for relationships and connections.
✗ Incorrect
Graph databases are optimized for hierarchical and relationship data, making queries efficient.
🔍 Analysis
expert2:30remaining
Why does this NoSQL query fail?
Consider this NoSQL query:
It returns no results even though products with price less than 100 exist as numbers. Why?
db.products.find({price: {$lt: '100'}})It returns no results even though products with price less than 100 exist as numbers. Why?
Attempts:
2 left
💡 Hint
Check the data types used in the query condition.
✗ Incorrect
The query compares price to a string '100' but prices are stored as numbers, so no match occurs.