1) Which of the following does not improve database write times?
a) Normalising data to reduce amount of data to be written
b) Using transactions for every database operation
c) Removing unnecessary constraints
d) Using a hard disk with faster write speeds

Answer(s) : b) Using transactions for every database operation

2) Which of the following will NOT help when a database begins to become too large to keep on one system
a) Setting up a slave database
b) Setting up daily database dump
c) Archiving data
d) Sharding database

Answer(s) : a) Setting up a slave database
            b) Setting up daily database dump

3) In a typical master/slave database system
a) Writes can be made on the master
b) Writes can be made on the slave
c) Reads can be made on the slave
d) Reads can be made on the master

Answer(s) : a) Writes can be made on the master
            c) Reads can be made on the slave

4) A SQL database view
a) Contains data not stored in the database tables
b) Is not computed using a SQL query
c) Is computed using a SQL query
d) Is a way to improve the read time of a table in a database

Answer(s) : c) Is computed using a SQL query

5) Which SQL statement isn’t used to update a database table schema?
a) UPDATE TABLE
b) ALTER TABLE
c) CHANGE TABLE
d) MODIFY TABLE

Answer(s) : 
(a) UPDATE TABLE
(c) CHANGE TABLE
(d) MODIFY TABLE

6) Database normalisation does not typically
a) Reduce data constraints
b) Reduce chances of data anomalies
c) Reduce database size
d) Reduce number of tables

Answer(s) : a) Reduce data constraints 
            d) Reduce number of tables

7) Which of the following are not SQL aggregate functions?
a) SELECT
b) AVG
c) JOIN
d) MIN

Answer(s) : a) SELECT
            c) JOIN

8) A database index
a) Doesn’t increase database size
b) Decreases database size
c) Doesn’t affect database size
d) None of the above

Answer(s) : d) None of the above

9) Which of the following code will create an index named stu_sub on the columns roll_no and subject of the stu_subjects table?

a) create index stu_sub from stu_subjects(roll_no, subject);
b) create index stu_subjects on stu_sub(roll_no, subject);
c) create index stu_sub on stu_subjects(roll_no, subject);
d) create index stu_sub on stu_subject(roll_no, subject);

Answer(s) : c) create index stu_sub on stu_subjects(roll_no, subject);

10) For table EMPLOYEE

The query SELECT ID FROM CUSTOMERS WHERE SALARY > 5000 OR age < 25; will produce result
a) 6 7
b) 3 4 5 6 7
c) 1 2 3 4 5 6 7
d) None of the above

Answer(s) : b) 3 4 5 6 7
Categories: NPTEL solution

8 Comments

Chetan · February 27, 2018 at 6:39 PM

Are u sure about the 10th Answer, I feel its d)None of the above as they are asking SALARY>5000 and age<25

    Yash Sodha · March 1, 2018 at 7:11 AM

    Hey Chetan, they have said SALARY>5000 OR age<25.. so even if one condition is satisfied.. it will come in the query result.

      shrayansh jain · March 2, 2018 at 5:03 PM

      hey! , in the 10th question ,sql query is for CUSTOMERS table but in this question employee named table is given!!

        Yash Sodha · March 2, 2018 at 6:47 PM

        That might be just a typo from their end 🙂

Kenji · February 28, 2018 at 4:51 AM

Answer 5 is wrong the question asks “Which sql statement ISN’T used to update a database table schema?”

Correct options should be: UPDATE, CHANGE, MODIFY.

    Yash Sodha · March 1, 2018 at 7:00 AM

    Thanks a lot Kenji. I have changed the answer.

N · March 2, 2018 at 2:40 PM

I’m unsure about the 10th answer as the query states “SELECT ID FROM CUSTOMERS” but the table displayed is that of EMPLOYEE

    Yash Sodha · March 2, 2018 at 6:47 PM

    That might be just a typo from their end 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *