MCQ Bank
Which of the following commands is used to create a database table and its structure?
- A) DML
- B) DQL
- C) DDL
- D) DCL
___________ SQL statement is used to enter values into columns.
- A) PUT INTO
- B) INSERT TO
- C) INSERT INTO
- D) ENTER INTO
___________ in SQL table is used to uniquely identify individual rows of a given table.
- A) Foreign key column
- B) NOT NULL constraints
- C) Primary key column
- D) Secondary key column
Which of the following is a correct syntax for creating a Database named employee?
- A) CREATE DATABASE employee;
- B) CREATE MYSQL Database employee
- C) CREATE SQL DATABASE employee;
- D) CREATE TABLE employee;
Which of the following is the correct syntax for creating a database table?
- A) CREATE TABLE;
- B) TABLE name CREATE;
- C) CREATE MYSQL TABLE name;
- D) CREATE TABLE name;
In projection operation, any duplicate values are_________.
- A) Grouped
- B) Copied
- C) Eliminated
- D) Selected
What is the basic component/structure of Relational Data Model?
- A) Relation
- B) Schema
- C) Tuple
- D) Model
In the first semester of a degree program in a university, each student has to study five pre-selected courses. The relationship between student and course is:
- A) One to one
- B) Many to many
- C) Many to one
- D) Recursive relationship
A specific record of a relation is accessed through:
- A) Random key
- B) Arbitrary Key
- C) Secondary Key
- D) Primary Key
Which of the following operator is used to select the certain columns from a table?
- A) Conjugate operator
- B) Cartesian operator
- C) Select operator
- D) Project operator
A cell of a table is the intersection of row and a ________.
- A) Tuple
- B) Degree
- C) Column
- D) Record
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) NAME
- B) DATE_OF_BIRTH
- C) ADDRESS
- D) Roll No.
Which of the following option is true for union commutative?
- A) B∩A=BUA
- B) A∩B=AUB
- C) AUB=A∩B
- D) AUB=BUA
A manufacturer manufactures 100 motor bikes in a month. The relationship between manufacturer and motor bikes is:
- A) One to one
- B) Many to many
- C) One to many
- D) Recursive relationship
Which of the two data models were used before the relational data model?
- A) Flat Data model and Hierarchical Data Model
- B) Object Oriented and Flat Data Model
- C) Hierarchical and Network Data Model
- D) Network and Object Oriented Data Model
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, Math), (Ali, Phy), (Hassan, Phy), (Hassan, Eng), (Hassan, Math), (Hassan, Phy)}
- B) {(Ali, Eng), (Ali, Math), (Ali, Phy), (Hassan, Eng), (Hassan, Math), (Hassan, Phy)}
- C) {(Ali, Eng), (Hassan, Math), (Ali, Phy), (Hassan, Eng), (Hassan, Math), (Hassan, Phy)}
- D) {(Ali, Eng), (Ali, Math), (Ali, Phy), (Hassan, Phy), (Ali, Math), (Hassan, Eng)}
If relation M has C tuples and relation N has D tuples, then their Cartesian product will have _________ tuples.
- A) CUD
- B) C*D
- C) C∩D
- D) C^D
While converting Entity-Relationship Diagram to Relational Data Model, each entity type is converted into:
- A) Attribute
- B) Relation
- C) Relationship
- D) Object
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)
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) Do not appear in both X and Y
- B) Appear in Y but not in X
- C) Appear in X but do not appear in Y
- D) Appear in both X and Y