Database Management System (DBMS) MCQs with answers Page - 158

Here, you will find a collection of MCQ questions on Database Management System (DBMS). Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 802.91K Points
Coach

Q. What is the default order of Order by clause?

  • (A) Descending
  • (B) Ascending
  • (C) Random
  • (D) UNION ALL

A

Admin • 802.91K Points
Coach

Q. View the Exhibit and examine the structure of the EMPLOYEES and DEPARTMENTS tables.
Which SET operator would you use in the blank space in the following SQL statement to list the departments where all the employees have managers?
SELECT department_id FROM departments ____ SELECT department_id FROM employees WHERE manager_id IS NULL;

  • (A) UNION
  • (B) MINUS
  • (C) INTERSECT
  • (D) The statement would not execute because the ORDER BY clause should appear only at the end of the SQL statement, that is, in the last SELECT statement.

A

Admin • 802.91K Points
Coach

Q. View the Exhibit and examine the data in the EMPLOYEES tables. Evaluate the following SQL statement: SELECT employee_id, department_id FROM employees WHERE department_id= 50 ORDER BY department_id UNION SELECT employee_id, department_id FROM employees WHERE department_id= 90 UNION SELECT employee_id, department_id FROM employees WHERE department_id= 10; What would be the outcome of the above SQL statement?

  • (A) The statement would execute successfully and display all the rows in the ascending order ofDEPARTMENT_ID.
  • (B) The statement would execute successfully but it will ignore the ORDER BY clause and display the rows in random order.
  • (C) The statement would not execute because the positional notation instead of the column name should be used with the ORDER BY clause.
  • (D) CREATE TABLE ord_details (ord_no NUMBER(2), item_no NUMBER(3), ord_date date DEFAULT SYSDATE NOT NULL, CONSTRAINT ord_pk PRIMARY KEY (ord_no, item_no));

A

Admin • 802.91K Points
Coach

Q. Which CREATE TABLE statement is valid?

  • (A) CREATE TABLE ord_details (ord_no NUMBER(2) PRIMARY KEY, item_no NUMBER(3) PRIMARY KEY, ord_date date NOT NULL); 50
  • (B) CREATE TABLE ord_details (ord_no NUMBER(2) UNIQUE, NOT NULL, item_no NUMBER(3), ord_date date DEFAULT SYSDATE NOT NULL);
  • (C) CREATE TABLE ord_details (ord_no NUMBER(2) , item_no NUMBER(3), ord_date date DEFAULT NOT NULL, CONSTRAINT ord_uq UNIQUE (ord_no), CONSTRAINT ord_pk PRIMARY KEY (ord_no));
  • (D) iii and iv

A

Admin • 802.91K Points
Coach

Q. Pick entities from the following: I. vendor II. student III. attends IV. km/hour

  • (A) i, ii, iii
  • (B) i, ii, iv
  • (C) i and ii
  • (D) number of entity sets which may be related to a given entity

A

Admin • 802.91K Points
Coach

Q. By relation cardinality we mean

  • (A) number of items in a relationship
  • (B) number of relationships in which an entity can appear
  • (C) number of items in an entity
  • (D) a N:M relationship

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ