Software Development Exam  >  Software Development Tests  >  Test: Relational Databases - 1 - Software Development MCQ

Test: Relational Databases - 1 - Software Development MCQ


Test Description

15 Questions MCQ Test - Test: Relational Databases - 1

Test: Relational Databases - 1 for Software Development 2024 is part of Software Development preparation. The Test: Relational Databases - 1 questions and answers have been prepared according to the Software Development exam syllabus.The Test: Relational Databases - 1 MCQs are made for Software Development 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Relational Databases - 1 below.
Solutions of Test: Relational Databases - 1 questions in English are available as part of our course for Software Development & Test: Relational Databases - 1 solutions in Hindi for Software Development course. Download more important topics, notes, lectures and mock test series for Software Development Exam by signing up for free. Attempt Test: Relational Databases - 1 | 15 questions in 30 minutes | Mock test for Software Development preparation | Free important questions MCQ to study for Software Development Exam | Download free PDF with solutions
Test: Relational Databases - 1 - Question 1

Which of the following best describes a relational database?

Detailed Solution for Test: Relational Databases - 1 - Question 1

A relational database organizes data into tables, where each table represents an entity, and the relationships between tables are defined through keys.

Test: Relational Databases - 1 - Question 2

Which of the following is not a valid data type in a relational database?

Detailed Solution for Test: Relational Databases - 1 - Question 2

Array is not a valid data type in a relational database. Common data types include integers, text, boolean, float, etc.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Relational Databases - 1 - Question 3

What is the purpose of a primary key in a relational database table?

Detailed Solution for Test: Relational Databases - 1 - Question 3

A primary key is a column or a set of columns that uniquely identifies each record in a table. It ensures the uniqueness and integrity of the data.

Test: Relational Databases - 1 - Question 4

In a relational database, what is a foreign key?

Detailed Solution for Test: Relational Databases - 1 - Question 4

A foreign key is a column or a set of columns in one table that refers to the primary key of another table. It establishes a relationship between the two tables.

Test: Relational Databases - 1 - Question 5

Which SQL keyword is used to retrieve data from a relational database table?

Detailed Solution for Test: Relational Databases - 1 - Question 5

The SELECT keyword is used to retrieve data from a relational database table. It allows you to specify the columns you want to retrieve and apply filtering conditions.

Test: Relational Databases - 1 - Question 6

Consider the following table "employees":
+----+----------+-----------+
| id | name | salary |
+----+----------+-----------+
| 1 | John | 50000 |
| 2 | Alice | 60000 |
| 3 | Bob | 45000 |
+----+----------+-----------+
Which SQL query will retrieve the names of employees with a salary greater than 50000?

Detailed Solution for Test: Relational Databases - 1 - Question 6

This query selects the names of employees from the "employees" table where the salary is greater than or equal to 50000.

Test: Relational Databases - 1 - Question 7

Consider the following table "orders":
+----+------------+------------+
| id | order_date | total |
+----+------------+------------+
| 1 | 2022-05-01 | 100 |
| 2 | 2022-06-15 | 250 |
| 3 | 2022-07-03 | 75 |
+----+------------+------------+
Which SQL query will retrieve the total revenue earned in June 2022?

Detailed Solution for Test: Relational Databases - 1 - Question 7

This query retrieves the sum of the "total" column from the "orders" table where the order_date is in June 2022. The LIKE operator is used for pattern matching.

Test: Relational Databases - 1 - Question 8

Consider the following table "products":
+----+---------+-------+
| id | name | price |
+----+---------+-------+
| 1 | Laptop | 1000 |
| 2 | Monitor | 300 |
| 3 | Mouse | 25 |
+----+---------+-------+
Which SQL query will retrieve the average price of all products?

Detailed Solution for Test: Relational Databases - 1 - Question 8

This query calculates the average price from the "products" table. The AVG function is used to calculate the average of a numerical column.

Test: Relational Databases - 1 - Question 9

Consider the following table "customers":
+----+----------+-----------+
| id | name | city |
+----+----------+-----------+
| 1 | John | New York |
| 2 | Alice | Chicago |
| 3 | Bob | New York |
+----+----------+-----------+
Which SQL query will retrieve the unique cities from which customers belong?

Detailed Solution for Test: Relational Databases - 1 - Question 9

This query retrieves the unique cities from the "customers" table. The DISTINCT keyword eliminates duplicate values in the result set.

Test: Relational Databases - 1 - Question 10

Consider the following table "employees":
+----+----------+-----------+
| id | name | salary |
+----+----------+-----------+
| 1 | John | 50000 |
| 2 | Alice | 60000 |
| 3 | Bob | 45000 |
+----+----------+-----------+
Which SQL query will retrieve the highest salary from the employees table?

Detailed Solution for Test: Relational Databases - 1 - Question 10

This query retrieves the highest salary from the "employees" table using the MAX function.

Test: Relational Databases - 1 - Question 11

Consider the following table "orders":
+----+------------+------------+
| id | order_date | total |
+----+------------+------------+
| 1 | 2022-05-01 | 100 |
| 2 | 2022-06-15 | 250 |
| 3 | 2022-07-03 | 75 |
+----+------------+------------+
Which SQL query will retrieve the number of orders placed in each month?

Detailed Solution for Test: Relational Databases - 1 - Question 11

This query retrieves the number of orders placed in each month by extracting the month from the "order_date" column and grouping the results by the month.

Test: Relational Databases - 1 - Question 12

Consider the following table "products":
+----+---------+-------+
| id | name | price |
+----+---------+-------+
| 1 | Laptop | 1000 |
| 2 | Monitor | 300 |
| 3 | Mouse | 25 |
+----+---------+-------+
Which SQL query will retrieve the products with a price greater than the average price?

Detailed Solution for Test: Relational Databases - 1 - Question 12

This query retrieves the products with a price greater than the average price calculated from the subquery.

Test: Relational Databases - 1 - Question 13

Consider the following table "employees":
+----+----------+-----------+
| id | name | salary |
+----+----------+-----------+
| 1 | John | 50000 |
| 2 | Alice | 60000 |
| 3 | Bob | 45000 |
+----+----------+-----------+
Which SQL query will retrieve the names of employees with a salary between 50000 and 60000?

Detailed Solution for Test: Relational Databases - 1 - Question 13

This query retrieves the names of employees from the "employees" table whose salary falls between 50000 and 60000 using the BETWEEN operator.

Test: Relational Databases - 1 - Question 14

Consider the following table "orders":
+----+------------+------------+
| id | order_date | total |
+----+------------+------------+
| 1 | 2022-05-01 | 100 |
| 2 | 2022-06-15 | 250 |
| 3 | 2022-07-03 | 75 |
+----+------------+------------+

Which SQL query will retrieve the orders with a total greater than the average total?

Detailed Solution for Test: Relational Databases - 1 - Question 14

This query retrieves the orders with a total greater than the average total calculated from the subquery.

Test: Relational Databases - 1 - Question 15

Consider the following table "employees":
+----+----------+-----------+
| id | name | salary |
+----+----------+-----------+
| 1 | John | 50000 |
| 2 | Alice | 60000 |
| 3 | Bob | 45000 |
+----+----------+-----------+

Which SQL query will retrieve the names of employees whose names contain the letter "o"?

Detailed Solution for Test: Relational Databases - 1 - Question 15

This query retrieves the names of employees from the "employees" table whose names contain the letter "o" using the LIKE operator and wildcard "%".

Information about Test: Relational Databases - 1 Page
In this test you can find the Exam questions for Test: Relational Databases - 1 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Relational Databases - 1, EduRev gives you an ample number of Online tests for practice

Top Courses for Software Development

Download as PDF

Top Courses for Software Development