0
0
DBMS Theoryknowledge~10 mins

Types of databases (relational, NoSQL, object-oriented) in DBMS Theory - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select all columns from a relational database table named 'employees'.

DBMS Theory
SELECT [1] FROM employees;
Drag options to blanks, or click blank then click option'
AALL_COLUMNS
BALL
CEVERY
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like ALL or EVERY instead of the symbol *.
Trying to write the column names manually when all columns are needed.
2fill in blank
medium

Complete the code to insert a document into a NoSQL database collection named 'users'.

DBMS Theory
db.users.insertOne({ name: 'Alice', age: [1] });
Drag options to blanks, or click blank then click option'
A'25'
B25
C"25"
Dtwentyfive
Attempts:
3 left
💡 Hint
Common Mistakes
Putting numbers inside quotes, which makes them strings.
Writing age as a word instead of a number.
3fill in blank
hard

Fix the error in the object-oriented database query to retrieve all objects of class 'Car'.

DBMS Theory
SELECT * FROM [1];
Drag options to blanks, or click blank then click option'
ACar
Bcar
CCAR
Dcars
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase class names which may cause errors.
Using plural form instead of the class name.
4fill in blank
hard

Fill both blanks to create a NoSQL query that finds users older than 30.

DBMS Theory
db.users.find({ age: { [1]: [2] } });
Drag options to blanks, or click blank then click option'
A$gt
B$lt
C30
D25
Attempts:
3 left
💡 Hint
Common Mistakes
Using $lt which means 'less than' instead of 'greater than'.
Using the wrong number for the age condition.
5fill in blank
hard

Fill all three blanks to create an SQL query that selects the 'name' and 'price' columns from the 'products' table where price is less than 100.

DBMS Theory
SELECT [1], [2] FROM products WHERE price [3] 100;
Drag options to blanks, or click blank then click option'
Aname
Bprice
C<
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using the greater than operator > instead of less than.
Swapping the column names or missing one.