PGT-CS_Question Paper
PGT-CS_Question Paper
Select the degree and cardinality of the cartesian product of the tables STUDENT x TEACHER from the
following options :
a) 30 7500 c) 30 325
b) 200 325 d) 200 7500
53. Which of the following set of functions is a valid set of aggregate functions in MySQL ?
a) AVG(), ROUND(), COUNT() c) COUNT(), MAX(), SUM()
b) MIN(), UPPER(), AVG() d) DATE(), COUNT(), LTRIM()
54. Find the output of the MySQL query based on the given Table-COACH (ignore the output header)
Query :
SELECT COUNT(GAME), AVG(SALARY) FROM COACH;
a) 3 70000 c) 4 70000
b) 4 35000 d) 3 35000
55. Find the output of the MySQL query based on the given Table – STUDENT (ignore the output header)
Query :
SELECT SEC, AVG (MARKS) FROM STUDENT GROUP BY SEC HAVING MIN (MARKS) > 80;
a) B 83
b) A 84
c) A 84
B 83
d) A 83
B 80
56. Following are the two tables in a MySQL database.
Database : COMPARTMENT
Select the command from the following option to display subjects (SUBNAME) and number of students
registered in that subject in table RESULT.
a) SELECT SUBNAME, COUNT(*)
FROM SUBJECTS, RESULT GROUP BY SUBNAME ;
b) SELECT SUBNAME, COUNT(*)
FROM SUBJECTS, RESULT ORDER B SUBNAME;
c) SELECT SUBNAME, COUNT(*)
FROM SUBJECTS NATURAL JOIN RESULT ORDER BY SUBNAME;
d) SELECT SUBNAME, COUNT(*)
FROM SUBJECTS NATURAL JOIN RESULT GROUP BY SUBNAME;
57. To establish the Python-MySQL connection, connect() methods is used with certain parameters or
arguments. Which of the following is not a parameter / argument used with connect() method ?
a) user c) database
b) password d) table
58. commit( ) is required to be used after the execution of certain queries in Python-MySQL connectivity
applications. Identify one such MySQL command out of the following options :
a) CREATE c) SELECT
b) INSERT d) DROP
59. While working on Python-MySQL connectivity, fetchall( ) method is used to get data from table. The
method fetchall( ) returns –
a) a list c) tuple of lists
b) a tuple d) list of tuples
60. The method cursor( ) is used in Python-MySQL connectivity applications. This method is a member of :
a) sql module c) database-connectivity module
b) pickle module d) csv module