MCQ Bank
Which of the following is the correct syntax for creating a database table?
- A) CREATE MYSQL TABLE name;
- B) TABLE name CREATE;
- C) CREATE TABLE name;
- D) CREATE TABLE;
Which of the following is a correct syntax for creating a Database named employee?
- A) CREATE MYSQL Database employee
- B) CREATE DATABASE employee;
- C) CREATE TABLE employee;
- D) CREATE SQL DATABASE employee;
If the relation is not in 2nd Normal Form, then we need to remove___________.
- A) Full functional dependency
- B) Reflexive dependency
- C) Partial dependency
- D) Transitive dependency
Which of the following is NOT related to CREATE TABLE command?
- A) Records
- B) Attributes
- C) Data types
- D) Constraints
Which of the following is the correct syntax for inserting some values into the employee table?
- A) INSERT into employee (col1, col2, col3) VALUES (val1, val2, val3)
- B) INSERT into (col1, col2, col3) VALUES (val1, val2, val3)
- C) INSERT into employee (col1, col2, col3), (val1, val2, val3)
- D) INSERT into employee COLUMN (col1, col2, col3) VALUES (val1, val2, val3)
___________ in SQL table is used to uniquely identify individual rows of a given table.
- A) Foreign key column
- B) NOT NULL constraints
- C) Secondary key column
- D) Primary key column
If there are two relations X and Y then the difference of these two relations (i.e. X-Y) will be set of tuples that ________________.
- A) Appear in X but do not appear in Y
- B) Appear in Y but not in X
- C) Do not appear in both X and Y
- D) Appear in both X and Y
In a table, column represents __________.
- A) Records
- B) Instances
- C) Attributes
- D) Data
Suppose a relation named STUDENT contains attributes St_name, St_cgpa, cur_semester and st_roll. Which of the following query will be used to SELECT all those student records having cgpa greater than 3.0?
- A) σcgpa>3.0 (STUDENT)
- B) Ωcgpa>3.0 (STUDENT)
- C) σcgpa>3.0 (STUDENT)
- D) €cgpa>3.0 (STUDENT)
In intersection operation, which of the following is selected?
- A) Tuples of single relation only
- B) Tuples of first relation
- C) Tuples common in both relations
- D) Tuples of second relation
Suppose a relation named EMPLOYEE contains attributes Emp_name, Emp_designation, Emp_address and Emp_salary. Which of the following query will be used to SELECT all those employees whose designation is Admin officer?
- A) ϕ designation = ‘Admin officer’(EMPLOYEE)
- B) σ designation = ‘Admin officer’ (EMPLOYEE)
- C) α designation = ‘Admin officer’ (EMPLOYEE)
- D) ռ designation = ‘Admin officer’ (EMPLOYEE)
Consider the following two sets: STD Name = [Ali, Hassan] Course Name = {Eng, Math, Phy} Then the Cartesian product of STD Name and Course Name (i.e. STD Name x Course Name) will be equal to:
- A) {(Ali, Eng), (Ali, Math), (Ali, Phy), (Hassan, Eng), (Hassan, Math), (Hassan, Phy)}
- B) {(Ali, Math), (Ali, Phy), (Hassan, Phy), (Hassan, Eng), (Hassan, Math), (Hassan, Phy)}
- C) {(Ali, Eng), (Ali, Math), (Ali, Phy), (Hassan, Phy), (Ali, Math), (Hassan, Eng)}
- D) {(Ali, Eng), (Hassan, Math), (Ali, Phy), (Hassan, Eng), (Hassan, Math), (Hassan, Phy)}
Which of the following operator is used to select the certain columns from a table?
- A) Conjugate operator
- B) Select operator
- C) Project operator
- D) Cartesian operator
What is the basic component/structure of Relational Data Model?
- A) Schema
- B) Relation
- C) Tuple
- D) Model
Which of the following are unary operators?
- A) UNION and PROJECT
- B) PROJECT and CARTESIAN
- C) SELECT and CARTESIAN
- D) SELECT and PROJECT
In relational database, each cell of a table cannot have __________ .
- A) Numeric values
- B) Unique values
- C) String values
- D) Multiple values
Which of the two data models were used before the relational data model?
- A) Network and Object Oriented Data Model
- B) Hierarchical and Network Data Model
- C) Object Oriented and Flat Data Model
- D) Flat Data model and Hierarchical Data Model
If an entity STUDENT has four attributes named as Roll No., NAME, DATE_OF_BIRTH and ADDRESS then which of the following attribute is most suitable for Primary Key?
- A) Roll No.
- B) NAME
- C) ADDRESS
- D) DATE_OF_BIRTH
A specific record of a relation is accessed through:
- A) Arbitrary Key
- B) Secondary Key
- C) Random key
- D) Primary Key
In many to many relationship, a third table is created for the relationship. It is known as _______.
- A) Associative entity type
- B) Naming entity type
- C) Strong entity type
- D) Regular entity type