Thursday 17 June 2021

MCQs in RDBMS

Relational Database Management System is a core subject taught in almost all computer science curriculum. The following 30 multiple-choice questions will help you to check your basic knowledge in this subject. It will also be a useful resource for the teachers to conduct quiz tests in RDBMS.


Choose the best answer (Multiple choice questions)

 

1. A relational database consists of a collection of ____________ .

A) Tables                     B) Fields                     C) Records                  D) Keys

2. A ________ in a table represents a relationship among a set of values.

A) Column                  B) Key                         C) Row                       D) Entry

3. The term attribute refers to a ___________ of a table.

A) Record                   B) Column                  C) Tuple                      D) Key

4. For each attribute in a relation, there is a set of permitted values, called the ________ of that attribute.

A) Domain                  B) Relation                  C) Set                          D) Schema

5. The result of the operation which contains all pairs of tuples from the two relations, regardless of whether their attribute values match.

A) Join                        B) Cartesian product   C) Intersection             D) Set difference

6. The _______operation performs a set union of two “similarly structured” tables

A) Union                     B) Join                         C) Product                  D) Intersect

7. Using which language can a user request information from a database?

A) Query                     B) Relational               C) Structural               D) Compiler

8. Student (ID, name, dept name, tot_cred) In this relation which attributes form the primary key?

A)  name                     B) dept                          C) tot_cred                  D) ID

9.  Which one of the following is a procedural language?

A) Domain relational calculus                  B) Tuple relational calculus

C) Relational algebra                                 D) Query language

10. The_____ operation allows the combining of two relations by merging pairs of tuples, one from each relation, into a single tuple.

A) Select         B) Join                         C) Union                     D) Intersection

11. The most commonly used operation in relational algebra for projecting a set of tuple from a relation          is _____________ .

A) Join             B) Projection               C) Select                      D) Union

12. The _________ provides a set of operations that take one or more relations as input and return a              relation as an output

A) Schematic representation               B) Relational algebra     

C) Scheme diagram                             D) Relation flow

13. A relation schema consists of a list of attributes and their corresponding _________ .

A)    Variables               B) Instances                C) Domains                 D) Tuples

14. Which one of the following is used to define the structure of the relation, deleting relations and    relating schema

A) DML(Data Manipulation Language)         B) DDL(Data Definition Language)

C)  Query                                                        D) Relational Schema

15. Select * from employee. What type of statement is this?

A) DML                      B) DDL                       C) View          D) Integrity constraint

16. The basic data type char(n) is a _____ length character string and varchar(n) is _____ length                     character.

A) Fixed, equal           B) Equal, variable       C) Fixed, variable       D) Variable, equal

17. To remove a relation from an SQL database, we use the ______ command.

A) Delete                    B) Purge                      C) Remove                  D) Drop table

18. Updates that violate __________ are not allowed.

A) Integrity constraints                       B) Transaction control

C) Authorization                                 D) DDL constraints

19. In SQL the spaces at the end of the string are removed by _______ function.

            A) Upper                     B) String                      C) Trim                    D) Lower

 20. Which one of the following sort rows in SQL?

            A) SORTBY               B) ALIGNBY             C) ORDERBY           D) GROUPBY

21. The _______ menu command in SQL * PLUS is used to store the query results in a file.

            A) Save                       B) Spool                      C) Run                      D)  Screen Buffer

22. SQL * PLUS is a ___________________.

            A) editor                     B) query language       C) command-line tool D)  interpreter

23. Which of the following is used to store movie and image files?

A) CLOB                      B) BLOB                       C) Binary                    D) Image

24. To include integrity constraint in an existing relation use :

A) Create table            B) Modify table          C) Alter table              D) Drop table

25.  Which of the following is used to define code that is executed/fired when certain actions or event         occur?

A) Replace                  B) Keyword                C) Trigger                    D) Cursor

26. Which of the following is used to input the entry and give the result in a variable in a procedure?

A) Put and get                        B) Get and put                        C) Out and In             D) In and out

27. The default extension for an Oracle SQL*Plus file is:

A) .txt                         B) .pls                          C) .ora                         D) .sql

28. The variables in the triggers are declared using

A) –                             B) @                           C) /                              d) &

29. Which of the following is not a PL/SQL unit?

A) Table                      B) Type                       C) Trigger                    D) Package

30. Which of the following statements can be used to terminate a PL/SQL loop?

A) GOTO                    B) EXIT WHEN         C) CONTINUE WHEN         D) BREAK

ANSWERS

1.      A               2. C                 3. B                 4.  A                5. B                 6. A    

7.  A                8. D                 9. C                 10. B               11. C               12. B              

13. C               14. B               15. A               16. C               17.  D              18. A  

19. C               20. C               21.  B              22. C               23. B               24. C              

25. C               26. D               27. D               28. B               29. A               30. B

No comments:

Post a Comment