1) Which SQL statement is used to update a database table schema?

a) UPDATE TABLE
b) MODIFY TABLE
c) ALTER TABLE
d) CHANGE TABLE

Answer(s) : 
c) ALTER TABLE

[quads id=1]

2) Database normalisation typically

a) Reduces number of tables
b) Reduces database size
c) Reduces data constraints
d) Reduces chances of data anomalies

Answer(s) : 
b) Reduces database size
d) Reduces chances of data anomalies

3) A SQL database view

a) Contains data not stored in the database tables
b) Is computed using a SQL query
c) Takes up more disk space whenever more data is added to the database
d) Is a way to improve the read time of a table in a database

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

[quads id=1]

4) Which of the following are SQL aggregate functions?

a) MIN
b) AVG
c) SELECT
d) JOIN

Answer(s) : 
a) MIN
b) AVG

5) In a typical master/slave database system

a) Writes can be made on the slave
b) Reads can be made on the slave
c) Writes can be made on the master
d) Reads can be made on the master

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

[quads id=1]

6) A database index

a) Increases database size
b) Decreases database size
c) Doesn’t affect database size
d) Impacts database size differently in different cases

Answer(s) : 
a) Increases database size

7) Which of the following will help when a database begins to become too large to keep on one system

a) Setting up a slave database
b) Sharding database
c) Archiving data
d) Setting up daily database dump

Answer(s) : 
b) Sharding database
c) Archiving data

[quads id=1]

8) Which of the following code will create an index named stu_sub_ind on the columns roll_num and subject of the student_subjects table?

a) create index stu_sub_ind from student_subjects(roll_num, subject);
b) create index stu_sub_ind on student_subjects(roll_num, subject);
c) create index stu_sub_ind (roll_num, subject) on student_subjects;
d) It’s not possible to create an index on two columns

Answer(s) : 
b) create index stu_sub_ind on student_subjects(roll_num, subject);

9) Which of the following will typically improve database write times

a) Using a hard disk with faster write speeds
b) Normalising data to reduce amount of data to be written
c) Using transactions for every database operation
d) Removing unnecessary constraints

Answer(s) : 
a) Using a hard disk with faster write speeds
b) Normalising data to reduce amount of data to be written
d) Removing unnecessary constraints

[quads id=1]

10) For table CUSTOMERS

The query SELECT ID FROM CUSTOMERS WHERE SALARY > 5000 OR age < 25; will produce result

a) 3 4 5 6 7
b) 6 7
c) 3 4 5
d) 1 2 3 4 5 6 7

Answer(s) : 
a) 3 4 5 6 7