Software Development Exam  >  Software Development Tests  >  Database Management System (DBMS)  >  Test: Relational Databases - 2 - Software Development MCQ

Test: Relational Databases - 2 - Software Development MCQ


Test Description

15 Questions MCQ Test Database Management System (DBMS) - Test: Relational Databases - 2

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

What is a primary key in a relational database?

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

A primary key is a column or a set of columns that uniquely identifies each row in a table.

Test: Relational Databases - 2 - Question 2

What is a foreign key in a relational database?

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

A foreign key is a column or a set of columns that references the primary key of another table.

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

Which normal form deals with the elimination of transitive dependencies?

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

Third Normal Form (3NF) deals with the elimination of transitive dependencies.

Test: Relational Databases - 2 - Question 4

Which of the following is not a benefit of using a relational database?

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

Using a relational database helps reduce data redundancy by organizing data into tables and establishing relationships between them.

Test: Relational Databases - 2 - Question 5

Which of the following is not a part of the database design process?

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

Transaction design is not a part of the database design process. It focuses on managing and ensuring the atomicity, consistency, isolation, and durability of database transactions.

Test: Relational Databases - 2 - Question 6

Consider the following SQL code:

CREATE TABLE employees (
  emp_id INT PRIMARY KEY,
  emp_name VARCHAR(50),
  salary DECIMAL(10, 2)
);

INSERT INTO employees (emp_id, emp_name, salary)
VALUES (1, 'John Doe', 5000.00);

SELECT emp_name FROM employees;

What will be the output of the SELECT statement?

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

The SELECT statement retrieves the value of the emp_name column from the employees table, which is 'John Doe'.

Test: Relational Databases - 2 - Question 7

Consider the following SQL code:

CREATE TABLE customers (
  cust_id INT PRIMARY KEY,
  cust_name VARCHAR(50),
  city VARCHAR(50)
);

INSERT INTO customers (cust_id, cust_name, city)
VALUES (1, 'Alice Smith', 'New York');

SELECT * FROM customers;

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

The SELECT statement retrieves all columns (*) from the customers table, which includes the values inserted into the table.

Test: Relational Databases - 2 - Question 8

Consider the following SQL code:

CREATE TABLE orders (
  order_id INT PRIMARY KEY,
  cust_id INT,
  order_date DATE
);

INSERT INTO orders (order_id, cust_id, order_date)
VALUES (1, 1, '2023-05-01');

SELECT cust_id FROM orders WHERE order_date = '2023-05-01';

What will be the output of the SELECT statement?

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

The SELECT statement retrieves the value of the cust_id column from the orders table where the order_date is '2023-05-01'.

Test: Relational Databases - 2 - Question 9

Consider the following SQL code:

CREATE TABLE products (
  prod_id INT PRIMARY KEY,
  prod_name VARCHAR(50),
  price DECIMAL(10, 2)
);

INSERT INTO products (prod_id, prod_name, price)
VALUES (1, 'iPhone', 999.99),
       (2, 'Samsung Galaxy', 799.99),
       (3, 'Google Pixel', 699.99);

SELECT COUNT(*) FROM products;

What will be the output of the SELECT statement?

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

The SELECT statement counts the number of rows in the products table, which is 3.

Test: Relational Databases - 2 - Question 10

Consider the following SQL code:

CREATE TABLE employees (
  emp_id INT PRIMARY KEY,
  emp_name VARCHAR(50),
  salary DECIMAL(10, 2)
);

INSERT INTO employees (emp_id, emp_name, salary)
VALUES (1, 'John Doe', 5000.00);

SELECT COUNT(*) FROM employees WHERE salary > 10000.00;

What will be the output of the SELECT statement?

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

The SELECT statement counts the number of rows in the employees table where the salary is greater than 10000.00, which is 0.

Test: Relational Databases - 2 - Question 11

Consider the following SQL code:

CREATE TABLE students (
  student_id INT PRIMARY KEY,
  student_name VARCHAR(50),
  marks INT
);

INSERT INTO students (student_id, student_name, marks)
VALUES (1, 'Alice', 85),
       (2, 'Bob', 92),
       (3, 'Charlie', 78);

SELECT student_name FROM students WHERE marks > 80;

What will be the output of the SELECT statement?

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

The SELECT statement retrieves the student_name from the students table where the marks are greater than 80, which includes 'Alice' and 'Bob'.

Test: Relational Databases - 2 - Question 12

Consider the following SQL code:

CREATE TABLE books (
  book_id INT PRIMARY KEY,
  book_name VARCHAR(50),
  author VARCHAR(50),
  price DECIMAL(10, 2)
);

INSERT INTO books (book_id, book_name, author, price)
VALUES (1, 'Book1', 'Author1', 10.99),
       (2, 'Book2', 'Author2', 20.99),
       (3, 'Book3', 'Author1', 15.99);

SELECT COUNT(DISTINCT author) FROM books;

What will be the output of the SELECT statement?

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

The SELECT statement counts the number of distinct authors from the books table, which is 2 ('Author1' and 'Author2').

Test: Relational Databases - 2 - Question 13

Consider the following SQL code:

CREATE TABLE orders (
  order_id INT PRIMARY KEY,
  order_date DATE,
  total_amount DECIMAL(10, 2)
);

INSERT INTO orders (order_id, order_date, total_amount)
VALUES (1, '2023-01-01', 100.00),
       (2, '2023-01-02', 200.00),
       (3, '2023-01-03', 300.00);

SELECT SUM(total_amount) FROM orders;

What will be the output of the SELECT statement?

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

The SELECT statement calculates the sum of the total_amount column from the orders table, which is 600.00.

Test: Relational Databases - 2 - Question 14

Consider the following SQL code:

CREATE TABLE products (
  prod_id INT PRIMARY KEY,
  prod_name VARCHAR(50),
  price DECIMAL(10, 2)
);

INSERT INTO products (prod_id, prod_name, price)
VALUES (1, 'Product1', 10.00),
       (2, 'Product2', 20.00),
       (3, 'Product3', 30.00);

SELECT AVG(price) FROM products;

What will be the output of the SELECT statement?

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

The SELECT statement calculates the average (mean) of the price column from the products table, which is 20.00.

Test: Relational Databases - 2 - Question 15

Consider the following SQL code:

CREATE TABLE students (
  student_id INT PRIMARY KEY,
  student_name VARCHAR(50),
  marks INT
);

INSERT INTO students (student_id, student_name, marks)
VALUES (1, 'Alice', 80),
       (2, 'Bob', 85),
       (3, 'Charlie', 90);

SELECT student_name FROM students ORDER BY marks DESC LIMIT 2;
What will be the output of the SELECT statement?

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

The SELECT statement retrieves the student_name from the students table ordered by marks in descending order and limits the result to 2 rows, which includes 'Alice' and 'Charlie'.

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

Top Courses for Software Development

Download as PDF

Top Courses for Software Development