Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

Database MCQ Set 1

1. How can a SQL developer add a key on a table?
a) While creating a table
b) With Alter table command
c) With SQL server Properties window
d) All of the Mentioned

View Answer

Answer: d [Reason:] Adding key on a table can be done with all the above mentioned way.

2. A ___ key is a minimal super key
a) Primary
b) Foreign
c) Candidate
d) Non-Prime

View Answer

Answer: c [Reason:] In the relational model of databases, a candidate key of a relation is a minimal superkey for that relation.

3. Which of the following is not a Key in SQL Server?
a) Primary
b) Foreign
c) Alternate
d) Secondary

View Answer

Answer: d [Reason:] Except Secondary all are the types of key in SQL server.

4. What is true about Unique and primary key?
a) Unique can have multiple NULL values but Primary can’t have.
b) Unique can have single NULL value but Primary can’t have even single.
c) Both can have duplicate values
d) None of the Mentioned

View Answer

Answer: b [Reason:] Primary key doesn’t allow Null values and Unique key allows Null value, but only one Null value.

5. By default, which key creates Clustered index?
a) Foreign Key
b) Unique Key
c) Primary Key
d) None of the Mentioned

View Answer

Answer: c [Reason:] Primary Key by default it adds a clustered index.

6. A Key which is a set of one or more columns that can identify a record uniquely is called?
a) Natural key
b) Candidate key
c) Not Null key
d) Alternate key

View Answer

Answer: b [Reason:] A candidate key is a combination of attributes that can be uniquely used to identify a database record without any extraneous data. Each table may have one or more candidate keys. One of these candidate keys is selected as the table primary key.

7. Which key accepts multiple NULL values?
a) Foreign Key
b) Unique Key
c) Primary Key
d) None of the Mentioned

View Answer

Answer: a [Reason:] A foreign key is a key used to link two tables together. This is sometimes called a referencing key.Foreign Key is a column or a combination of columns whose values match a Primary Key in a different table.

8. A Foreign key is combined with a foreign key creates
a) Parent child relationship between the tables that connect them
b) Many-Many relationship between the tables that connect them
c) Network model between the tables that connect them
d) None of the Mentioned

View Answer

Answer: a [Reason:] In a foreign key reference, a link is created between two tables when the column or columns that hold the primary key value for one table are referenced by the column or columns in another table. This column becomes a foreign key in the second table.

9. Which of the following statements is not correct?
a) The primary key must be unique for a given table
b) Specifying a zero (0) for the lower bound for the association multiplicity on a class diagram indicates that the item is required
c) Specifying a one (1) for the lower bound for the association multiplicity on a class diagram indicates that the item is required
d) Most databases allow multiple records that are identical

View Answer

Answer: b [Reason:] A foreign key is a column that references a column (most often the primary key) of another table. The purpose of the foreign key is to ensure referential integrity of the data. In other words, only values that are supposed to appear in the database are permitted.

10. In a database, a foreign key is ?
a) A data element/attribute within a data field of a data record that is not unique, and cannot be used to distinguish one data record in a database from another data record within a database table
b) A data element/attribute within a data field of a data record within a database table that is a secondary key in another database table
c) A data element/attribute within a data field of a data record within a database table that is a primary key in another database table
d) A data element/attribute within a data field of a data record that enables a database to uniquely distinguish one data record in a database from another data record within a database table

View Answer

Answer: c [Reason:] A FOREIGN KEY constraint can reference columns in tables in the same database or within the same table. These are called self-referencing tables. For example, consider an employee table that contains three columns: employee_number, employee_name, and manager_employee_number. Because the manager is also an employee, there is a foreign key relationship from the manager_employee_number column to the employee_number column.

Database MCQ Set 2

1. Database management systems are intended to _______
a) Eliminate data redundancy
b) Establish relationship among records in different files
c) Manage file access
d) All of the Mentioned

View Answer

Answer: d [Reason:] DBMS are most likely to useful in the above mentioned operation.

2. One approach to standardization storing of data ?
a) MIS
b) Structured programming
c) CODASYL specification
d) None of the Mentioned

View Answer

Answer: c [Reason:] A second database type is a network database. Many computer systems have been implemented using the network Database Management System (DBMS) specifications developed by the Conference on Data Systems Languages (CODASYL). Also involved were two subgroups of CODASYL: the Database Task Group (DBTG), and the Data Description Language Committee (DDLC).

3. The language used application programs to request data from the DBMS is referred to as the
a) DML
b) DDL
c) Query language
d) All of the Mentioned

View Answer

Answer: a [Reason:] The effect of a DML statement is not permanent until you commit the transaction that includes it. A transaction is a sequence of SQL statements that Oracle Database treats as a unit.

4. Report generators are used to
a) Store data input by a user
b) Retrieve information from files
c) Answer queries
d) Retrieve information from files and Answer queries

View Answer

Answer: d [Reason:] Report generation used the files to retrieve information and give answer of queries.

5. The management information system (MIS) structure with one main computer system is called a
a) Hierarchical MIS structure
b) Distributed MIS structure
c) Centralized MIS structure
d) Decentralized MIS structure

View Answer

Answer: c [Reason:] Centralized MIS structure is useful in the serving the request and response singly.

6. Which of the following is not true of the traditional approach to information processing
a) There is common sharing of data among the various applications
b) It is file oriented
c) Programs are dependent on the file
d) All of the Mentioned

View Answer

Answer: a [Reason:] In traditional approach, information is stored in flat files which are maintained by the file system under the operating system’s control.Application programs go through the file system in order to access these flat files.

7. Choose the RDBMS which supports full fledged client server application development
a) dBase V
b) Oracle 7.1
c) FoxPro 2.1
d) Ingress

View Answer

Answer: b [Reason:] Oracle 7.1 support the all server-client application development.

8. Which of the following situation requires the use of ID-dependent entities ?
a) Association relationships only
b) Multivalued attributes only
c) Instance relationships only
d) All of the Mentioned

View Answer

Answer: d [Reason:] ID-dependent entities depends on the Association, Multivalued attributes and instance.

9. Which of the following statements concerning business rules is true?
a) It should be complex.
b) It should not be convertible to computer code.
c) It may include restrictions.
d) All of the Mentioned

View Answer

Answer: c [Reason:] According to the business rule it always may include restrictions.

10. In order to use a record management system
a) you need to understand the low level details of how information is stored
b) you need to understand the model the record management system uses
c) you need to understand both information storage and the model of record management system
d) None of the Mentioned

View Answer

Answer: b [Reason:] For get to know the RMS (Record Management System) you should know the flow and of model and record management system.

Database MCQ Set 3

1. What does DLL stand for ?
a) Dynamic Link Library
b) Dynamic Language Library
c) Dynamic Load Library
d) None of the Mentioned

View Answer

Answer: a [Reason:] DLL, linking occurs at run time when the routine is actually used. This results in much smaller executable because routines are pulled in only as needed.

2. POST-BLOCK trigger is also a ?
a) Navigational Trigger
b) Key Trigger
c) Transaction Trigger
d) All of the Mentioned

View Answer

Answer: a [Reason:] Pre- and Post- triggers fire as Form Builder navigates internally through different levels of the object hierarchy.When-New-Instance triggers fire at the end of a navigational sequence that places the input focus in a different item.

3. The system variable that records the select statement that SQL * FORMS most recently used to populate a block is ____
a) SYSTEM.LAST_RECORD
b) SYSTEM.CURSOR_RECORD
c) SYSTEM.CURSOR_FIELD
d) SYSTEM.LAST_QUERY

View Answer

Answer: d [Reason:] SYSTEM.LAST_QUERY system variable represents the query statement used by Forms to populate a data block during run-time.

4. In Oracle, which of the following package procedure is UNRESTRICTED ?
a) CALL_INPUT
b) CLEAR_BLOCK
c) EXECUTE_QUERY
d) USER_EXIT

View Answer

Answer: d [Reason:] A user exit is a C subroutine and called by Oracle Forms to do special-purpose processing.It can display messages on the Oracle Forms status line, get and set field values, do high-speed computations and table look-ups, and manipulate Oracle data.

5. What is SQL * FORMS ?
a) SQL * FORMS is a 4GL tool for developing and executing Oracle based interactive based application
b) SQL * FORMS is a 3GL tool for connecting to a Database
c) SQL * FORMS is a reporting tool
d) None of the Mentioned

View Answer

Answer: a [Reason:] SQL*Forms is a general-purpose tool for developing and executing forms-based interactive applications. The design component of this tool is specially designed for application developers and programmers.

6. Which of the following statement is false ?
a) Any procedure can raise a error and return an user message and error number
b) Error number is ranging from 20000 to 20999 are reserved for user defined messages
c) Oracle checks Uniqueness of User defined errors
d) Raise_Application_error is used for raising an user defined error

View Answer

Answer: c [Reason:] The UNIQUE constraint uniquely identifies each record in a database table.The UNIQUE and PRIMARY KEY constraints both provide a guarantee for uniqueness for a column or set of columns.

7. What is the result of the following ‘PAN’NULL’KAJ’?
a) Error
b) PAN KAJ
c) PANKAJ
d) NULL

View Answer

Answer: c [Reason:] In Oracle NULL values represent missing unknown data.

8. Below is the EMP table

EMPNO     ENAME     SALARY
A29       PANKAJ    10000	
A23       SAHIL     20000
A48       ABHYUDAY   
A83       KRISHNA   30000 

Select count(SALARY) from EMP; will result in
a) 1
b) 0
c) 3
d) None of the Mentioned

View Answer

Answer: c [Reason:] The COUNT() function returns the number of rows that matches a specified criteria.The COUNT(column_name) function returns the number of values (NULL values will not be counted) of the specified column.

9.

Declare 
	fvar number :=null;
	svar number :=5;
   Begin 
	goto <<>>
		if fvar is null then 
			<<>>
		svar:=svar+5;
		end-if;
		End; 

What will be the value of svar after execution?
a) Error
b) 10
c) 5
d) None of the Mentioned

View Answer

Answer: a [Reason:]Error, line 5 has error.Column 7:PLS-00103: Encountered the symbol “<” when expecting one of the identifier to execute the query.

10. Which of the following queries displays the sum of all employee salaries for those employees not making commission, for each job, including only those sums greater than 2500?
a) select job, sum(Sal) from Emp where sum(Sal) > 2500 and comm is null;
b) select job, sum(Sal) from Emp where comm is null group by job having sum(Sal) > 2500;
c) select job, sum(Sal) from Emp where sum(Sal) > 2500 and comm is null group by job;
d) select job, sum(Sal) from Emp group by job having sum(Sal) > 2500 and comm is not null;

View Answer

Answer: b [Reason:] SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP BY column_name HAVING aggregate_function(column_name) operator value; So base on [select job, sum(Sal) from Emp where comm is null group by job having sum(Sal) > 2500;] this will be the correct answer.

Database MCQ Set 4

1. Where is data dictionary kept?
a) SYSTEM Tablespace
b) Stack Space
c) Data File
d) None of the Mentioned

View Answer

Answer: a [Reason:] The Oracle Database user SYS owns all base tables and user-accessible views of the data dictionary.

2. Which schema object instructs Oracle to connect to remotely access an object of a database?
a) Sequence
b) Remote Link
c) Database Link
d) Data Link

View Answer

Answer: d [Reason:] A DATABASE LINK value references a resource outside the underlying data source through a URL.

3. Which of the following object types below cannot be replicated?
a) Data
b) Trigger
c) View
d) Sequence

View Answer

Answer: d [Reason:] Use the CREATE SEQUENCE statement to create a sequence, which is a database object from which multiple users may generate unique integers. You can use sequences to automatically generate primary key values.

4. How we can force a log switch?
a) By using ALTER SYSTEM LOG
b) By using ALTER SYSTEM SWITCH LOGFILE
c) By using ALTER SYSTEM SWITCH LOGS
d) By using ALTER SYS LOGFILES

View Answer

Answer: b [Reason:] To force a log switch, you must have the ALTER SYSTEM privilege. Use the ALTER SYSTEM statement with the SWITCH LOGFILE clause.

5. In the below given query, which expression is evaluated first?
SELECT id_number, (quantity – 100 / 0.15 – 35 * 20) FROM inventory
a) 0.15-35
b) quantity – 100
c) 35*20
d) 100 / 0.15

View Answer

Answer: d [Reason:] According to BODMAS rule that will be getting applied to the expression first brackets should get off but as there is no bracket in expression it will look for the division. As 100/0.15 is a division expression so in this expression will be getting evaluated first.

6. The ORDER BY clause can only be used in _____
a) SELECT queries
b) INSERT queries
c) GROUP BY queries
d) HAVING queries

View Answer

Answer: a [Reason:] An ORDER BY clause allows you to specify the order in which rows appear in the result set.

7. Which of the following rule below are categories of index?
a) Column and Functional
b) Multiple Column and Functional
c) To create an index in another schema
d) None of the Mentioned

View Answer

Answer: a [Reason:] An index is an optional structure, associated with a table or table cluster, that can sometimes speed data access.

8. What is the purpose of SMON (System Monitor Process) background process?
a) Performs crash recovery when a failed instance starts up again
b) Performs recovery when a user process fails
c) Writes redo log entries to disk
d) All of the Mentioned

View Answer

Answer: a [Reason:] SMON process of one instance can perform instance recovery for a failed CPU or instance.

9. Recycle bin can be turned on or off this. This parameter is stored in which of the below file?
a) PARAMETER FILE
b) PARFILE
c) DATAFILES
d) PFILE

View Answer

Answer: a [Reason:] A parameter file is a file that contains a list of initialization parameters and a value for each parameter.

10. When a transaction modifies the database, Oracle copies the original data before modifying it. The original copy of the modified data is called
a) Undone Data
b) Archive Data
c) Redo Data
d) Undo Data

View Answer

Answer: d [Reason:] Before transaction happen the Oracle kept the files in Undo Data to overcome form any failure.

Database MCQ Set 5

1. DCL stands for :
a) Data Control Language
b) Data Console Language
c) Data Console Level
d) Data Control Level

View Answer

Answer: a [Reason:] DCL stands for Data Control Language.

2. TCL stands for:
a) Transaction control languages
b) Transaction command languages
c) Transaction connect languages
d) None of the Mentioned

View Answer

Answer: a [Reason:] TCL for Transaction control languages.

3. ___commands in SQL allow controlling access to data within database.
a) Database
b) Data
c) Data control
d) All of the Mentioned

View Answer

Answer: c [Reason:] Data control is used for the controlling the access to database.

4. In an SQL statement, which of the following parts states the conditions for row selection?
a) Where
b) From
c) Order By
d) Group By

View Answer

Answer: a [Reason:] In an SQL statement where clause states the conditions for row selection.

5. A transaction completes its execution is said to be
a) Committed
b) Aborted
c) Rolled back
d) Failed

View Answer

Answer: a [Reason:] A transaction the completes its execution is said to be Committed.

6. Which of the following keyword is used with Data Control Language (DCL) statements?
a) SELECT
b) INSERT
c) DELETE
d) GRANT

View Answer

Answer: d [Reason:] GRANT is the keyword which is used with Data Control Language statements.

7. DCL Provides Commands To Perform Actions Like _______
a) Change The Structure Of Tables
b) Insert, Update Or Delete Records And Data Values
c) Authorizing Access And Other Control Over Database
d) None of the Mentioned

View Answer

Answer: c [Reason:] DCL is used to perform the action like authorization, Access and other control over database.

8. The Database Language That Allows You To Access Or Maintain Data In A Database
a) DCL
b) DML
c) DDL
d) All of the Mentioned

View Answer

Answer: a [Reason:] DCL command like Grant and Revoke is used for to give access on the database.

9. A Database Language Concerned With The Definition Of The Whole Database Structure And Schema Is ________
a) DCL
b) DML
c) DDL
d) All of the Mentioned

View Answer

Answer: c [Reason:] Data Definition Language is used for the to define the data structure of the Table.

10. To obtain the structure of an Oracle table, the command to use is:
a) STRUCTURE [TableName].
b) DESCRIBE [TableName].
c) DESCRIBE STRUCTURE [TableName].
d) DESC TABLE [TableName].

View Answer

Answer: b [Reason:] DESCRIBE command is used to get the structure of the Oracle Table.

.woocommerce-message { background-color: #98C391 !important; }