MCQ Bank
In which type of Database relationship, foreign key can be added in any participating table?
- A) One to Many
- B) Many to Many
- C) One to One
- D) None
____________ is an artificial key which is not a part of the system. The purpose of the key is to avoid the complexity of the composite primary keys.
- A) Surrogate Key
- B) Unique Key
- C) Candidate Key
- D) Foreign Key
Which one is relevant for Primary key - foreign key relationship?
- A) Partial Constraints
- B) Referential Integrity Constraints
- C) Integrity constraints
- D) Completeness Constraints
The correct syntax of insert statement is:
- A) Insert into database values(value1, value2, ……)
- B) Insert into tablename values(value1, value2, ….)
- C) Insert values(value1, value2, ……..) into tablename
- D) Insert values(value1, value2,…) into database
Suppose your company has hired a new employee Ahmad and you are required to add his information in the emp table. Which of the following SQL command will you use for this purpose?
- A) Update
- B) Add
- C) Insert
- D) New
Which one is not a type of Anomalies?
- A) Insertion Anomaly
- B) Select Anomaly
- C) Deletion Anomaly
- D) Update Anomaly
Cascading defines the behavior of _______ when the record from the parent table is deleted or updated.
- A) Super key
- B) Foreign key
- C) Secondary key
- D) Primary key
Deletion Anomaly occurs due to __________.
- A) Poor design decision
- B) Poor application program
- C) Poor maintenance
- D) Poor codding decision
First normal forma removes _________
- A) Transitive dependency
- B) Multiple value of an attribute
- C) Functional dependency
- D) Single value of an attribute
In E-R Diagram which one is not possible to show?
- A) Relationships
- B) Attributes
- C) Entities
- D) Foreign key relationships
____________________ combine two or more conditions into a compound condition in order to get the specific required results.
- A) Conditional Operators
- B) Logical Operators
- C) Boolean Operators
- D) Arithmetic Operators
Which clause is used only with Group functions?
- A) WHERE
- B) HAVING
- C) GROUP BY
- D) SELECT
__________________ statement is used to view the data from database.
- A) Create
- B) View
- C) Select
- D) Join
The _____________operator in SQL works like OR operator and allows to search for a value from given list of values.
- A) LIKE
- B) BETWEEN
- C) IN
- D) ANY
Group functions manipulate groups of rows to give ______ result per group of rows.
- A) Three
- B) Four
- C) Two
- D) One
______________ is a Multi Rows/Group function.
- A) INSTR
- B) ROUND
- C) CONCAT
- D) COUNT
What will be displayed after execution of following SQL command?
SELECT ename, job FROM emp;
- A) Whole table
- B) All values of ename and job columns from emp table
- C) Some of the values from ename and job columns of emp table
- D) All the unique values from enmae column of Emp table
________ is a Single Row function.
- A) MAX
- B) AVG
- C) ROUND
- D) MIN
“Where Clause” restricts ____________ returned as a result after execution of select command.
- A) Attributes
- B) Rows
- C) Tables
- D) Columns
_____________ is used to sort the result set in ascending or descending order.
- A) From Clause
- B) Where Clause
- C) Order by Clause
- D) Group by Clause