Professional Documents
Culture Documents
Rdbms
Rdbms
Rdbms
a) Integer
b) Decimal
c) Varchar
d) Char
28. What will be the most suitable data type for the Rollno column in given table?
a) Integer
b) Decimal
c) Varchar
d) Char
29. In SQL, NULL value means:
a) 0 value
b) 1 value
c) None value
d) None of the above
30. Write the name of the clause used with SELECT command to search for a specific pattern in
the strings.
a) Like
b) IN
c) Search
d) Where
31. ___________ is a collection of raw facts which have not been processed
a) Data
b) Information
c) Knowledge
d) Wisdom
32. Select the correct full form of DBMS
a) Direct Base Management System
b) Database Management System
c) Database Managerial System
d) None of above
33 Same information stored in more than one file is called as _________________
a) Data Inconsistency
b) Data Redundancy
c) Data Integration
d) None of above
34. Data type of values in each column is called as ________________
a) Domain
b) Degree
c) Cardinality
d) Relation
35. Number of attributes in a relation is called as ________________
a) Domain
b) Degree
c) Cardinality
d) Relation
36. Number of rows in a relation is called as ___________________
a) Domain
b) Degree
c) Cardinality
d) Relation
37. Which of following is one of commonly used RDBMS?
a) Dbase
b) Python
c) MYSQL
d) Java
38. Which SQL Statement extracts data from table?
a) Select
b) Extract
c) Display
d) Show
39. Which of the following is DML Statements?
a) Create table
b) Alter Table
c) Select
d) Drop table
40. Which statement is used to delete all records from table student?
a) Drop from student;
b) Remove from student;
c) Delete from student;
d) All of above
41. Which statement is used to insert new records into table?
a) Add into
b) Insert into
c) Update into
d) All of above
42. _______________ is uses to store fixed length character string
a) Char
b) Varchar
c) String
d) All of above
43. Select the correct SQL statement to delete a database.
a) Remove database;
b) Drop database;
c) Delete database;
d) All of above
44. Select the correct syntax to assign primary key constraint to teacher_id field while creating
table.
a) teacher_id primary key integer
b) teacher_id integer is primary key
c) teacher_id integer primary key
d) All of above
45. Select the correct syntax to assign not null constraint to first_name field while creating table.
a) first_name char(20) not null
b) first_name varchar(20) not null
c) first_name varchar(20) <> null
d) All of above
46. Select the correct syntax to assign default constraint to salary field while creating table.
a) salary decimal(10,2) default 40000
b) salary decimal(10,2) default is 40000
c) salary decimal(10,2) 40000 default
d) All of above
47. Select the correct syntax to assign check constraint to dept_no field while creating table.
a) dept_no integer check <=110
b) dept_no integer check(dept_no <=110)
c) dept_no integer dept_no:check<=110
d) All of above
48. The ............. command is used to see the structure of the table.
a) Desc
b) Show
c) Display
d) Use
49. Write MySql command that will be used to open an already existing database CONTACTS
a) Open Contacts
b) Use Contacts
c) Show Contacts
d) Desc Contacts
50. A table “Transport” in a database has degree 3 and cardinality 8. How many rows and
columns it has?
a) 8 Rows and 3 Columns
b) 3 Rows and 8 Columns
c) 24 Rows and 24 Columns
d) 3 Rows and 3 Columns
51. Write a query to display names and salaries of those employees whose salary are greater
than 20000.
a) PNO
b) NAME
c) SCORE
d) ALL OF ABOVE
84. _________ is a non-key attribute, whose values are derived from the primary key of some
other table
a) Primary Key
b) Foreign Key
c) Candidate Key
d) Alternate Key
85. ______ command is used to remove primary key from a table in SQL.
a) Update
b) Remove
c) Alter
d) Drop
86. Consider the following table PLAYER, what is the Degree of the given table PLAYER?
a) 6
b) 5
c) 4
d) 3
87. Consider the following table PLAYER, what is the Cardinality of the given table PLAYER?
a) 6
b) 5
c) 4
d) 3
88. What will be cardinality of following SQL Statement Select * from teacher, department;
a) 2
b) 3
c) 4
d) 12
89. What will be cardinality of following SQL Statement Select * from teacher,
department where department.dept_no = teacher.dept_no;
a) 2
b) 3
c) 4
d) 12
90. Consider the below tables, Seema wants to display StoreName and OwnerName of all
stores in Mumbai. Help her select the correct query from the options given below:
a) Select StoreName, OwnerName from STORE, OWNER where
Store.OwnerId=Owner.OwnerId or Location=”Mumbai”;
b) Select StoreName, OwnerName from STORE, OWNER where
store.OwnerId=Owner.OwnerId and Location=”Mumbai”;
c) Select StoreName, OwnerName from STORE, OWNER where Location=”Mumbai”;
d) Select StoreName, OwnerName from STORE, OWNER where OwnerId=OwnerId and
Location=”Mumbai”;
91. Consider a table: COACHING having fields CITY_NAME, ENROLMENTS. Shikhar wants to
display the data of the above table in ascending order of enrolments. Choose the correct
query/queries from the following:
i. Select * from coaching order by enrolments asc;
ii. Select * from coaching order by enrolments desc;
iii. Select * from coaching order by enrolments;
iv. Select * from coaching order by enrolments ascending;
a) Only (i) is correct
b) Both (i) and (ii) are correct
c) Both (i) and (iii) are correct
d) Only (iv) is correct
92. Write SQL command to display details of all items in the STOCK table in descending order of
stkdate.
a) select count(*) from exam where subject not in('english', 'mathematics', 'history',
'geography');
b) select count(*) from exam where subject=‘accounts’ or subject=‘informatics’;
c) select count(*) from exam where subject in(‘accounts’,‘informatics’);
d) all of above
97. Select the correct output of SQL command SELECT MIN(AVERAGE) FROM EXAM WHERE
DIVISION NOT IN('SECOND','THIRD');
a) 35
b) 67
c) 55
d) None of above
98. Select the correct output of SQL command SELECT COUNT(NAME) FROM EXAM WHERE
NAME LIKE '%A%';
a) 1
b) 3
c) 6
d) None of above
99. Consider a table FACTORY given below: Reema wants to calculate the average production of
the years 2008-2012. Help her select the correct SQL command for it:
a) 6
b) 3
c) 1
d) None of above
105. Select the correct output of SQL command SELECT COUNT(NAME) FROM EXAM WHERE
NAME LIKE '%A%';
a) 1
b) 3
c) 6
d) None of above
106. Select the correct output of SQL command SELECT COUNT(DISTINCTDCODE) FROM STOCK;
a) 7
b) 5
c) 3
d) 1
107. Write SQL command to display minimum unit price of items for each dealer individually as
per dealer code from the table stock.
1. b. Domain
2. a. Relation
3. c. Tuple
4. d. Attribute
5. d. Key
6. a. Primary Key
7. c. Candidate Key
8. b. Alternate Key
9. a. Candidate Key, Primary Key
10. d. Foreign Key
11. a. Create Database School;
12. b. Show Databases;
13. c. Use School;
14. d. Select Database();
15. c. Drop Database School;
16. b. Create table teacher(teacher_id integer, first_name varchar(20), salary decimal(10,2));
17. c. Select * from teacher;
18. b. Insert into teacher values(1005,'Srijit',6500.00)
19. d. Delete from teacher where teacher_id=1003;
20. b. Drop table Teacher;
21. a. DML
22. a. DML
23. a. WHERE
24. d. LIKE
25. c. Delete
26. b. DDL
27. d. Char
28. d. Char
29. c. None value
30. a. Like
31. a. Data
32. b. Database Management System
33. b. Data Redundancy
34. a. Domain
35. b. Degree
36. c. Cardinality
37. c. MYSQL
38. a. Select
39. c. Select
40. c. Delete from student;
41. b. Insert into
42. a. Char
43. b. Drop database;
44. c. teacher_id integer primary key
45. b. first_name varchar(20) not null
46. a. salary decimal(10,2) default 40000
47. b. dept_no integer check(dept_no<=110)
48. a. DESC
49. b. Use Contacts
50. a. 8 Rows and 3 Columns
51. c. select name, salary from employee where salary>20000;
52. a. select * from employee where bonus is null;
53. c. select employee_name from employee where employee_name like '%a';
54. b. select employee_name, job_title from employee where age between 26 and 30;
55. d. Single equal sign (=)
56. c. Select tid,name,salary from teachers where salary between 20000 and 30000;
57. a. Select name from teachers where sex=’M’ and age<40;
58. d. IN
59. b. SELECT * FROM STUDENT WHERE MARKS IS NULL;
60. c. Both a and b
61. a. Update employee set salary=40000 where employee_name='Amyra'
62. c. Alter table teachers add date_of_birth date;
63. c. Alter
64. c. Alter
65. a. UPDATE
66. b. Alter Table
67. a. Update
68. c. Not null
69. b. Delete from CUSTOMER where name like “A%”;
70. b. Alter table STUDENT
71. a. Create table teacher(teacher_id integer, first_name varchar(20), dept_id integer,
foreign key(dept_id) references department(dept_no));
72. b. Primary Key
73. c. Foreign Key
74. c. Foreign Key
75. c. Foreign Key
76. d. Self-Referential Table
77. a. A foreign key constraint can reference columns within the same table
78. a. foreign key(dept_no) references department(dept_id) on delete set null on update set null
79. b. foreign key(dept_no) references department(dept_id) on delete cascade on update
cascade
80. d. foreign key(dept_no) references department(dept_id) on delete restrict on update restrict
81. d. Show tables
82. b. DROP TABLE
83. a. PNO
84. b. Foreign Key
85. c. Alter
86. d. 3
87. b. 5
88. d. 12
89. c. 4
90. b. Select StoreName, OwnerName from STORE, OWNER where store.OwnerId =
Owner.OwnerId and Location=”Mumbai”;
91. c. Both (i) and (iii) are correct
92. c. SELECT * FROM STOCK ORDER BY STKDATE DESC;
93. c. ALL OF ABOVE
94. a. Mathematical
95. d. Aggregate Function
96. d. all of above
97. b. 67
98. c. 6
99. d. SELECT AVG(Production) from FACTORY;
100. b. The output of i is 3 and the output of ii is 4.
101. a. Distinct
102. c. Distinct
103. a. Select distinct stream from score;
104. b. 3
105. c. 6
106. c. 3
107. a. SELECT DCODE,MIN(UNITPR) FROM STOCK GROUP BY DCODE;
108. b. SELECT COUNT(City), City FROM STAFF GROUP BY City;
109. b. Having
110. a. Select SUM(noofemployee), Location from STORE group by location HAVING location in
(“Delhi”,”Mumbai”);