0% found this document useful (0 votes)
37 views

Unit 5 - Database Operations (22619 WBP)

The document provides a 20 question quiz on database operations in PHP and MySQL. It covers topics like MySQL data types, SQL statements for table creation, selecting databases, and error handling. The questions are multiple choice and include concepts like SQL being case insensitive, using DELETE without a WHERE clause, and closing database connections in PHP.

Uploaded by

Pritam Mundhe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Unit 5 - Database Operations (22619 WBP)

The document provides a 20 question quiz on database operations in PHP and MySQL. It covers topics like MySQL data types, SQL statements for table creation, selecting databases, and error handling. The questions are multiple choice and include concepts like SQL being case insensitive, using DELETE without a WHERE clause, and closing database connections in PHP.

Uploaded by

Pritam Mundhe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

13/09/2020 Unit 5: Database Operations (22619 WBP)

Unit 5: Database Operations (22619 WBP)


Total points 20/20

Online Quiz to help you in preparing for Online Exams, It covers Multiple Choice Questions
(MCQs) for 20 Marks
imp Links:
All Theory tutorials: https://bit.ly/3ihW2zX

contact us on [email protected]

All Chapter MCQs: https://www.cwipedia.in/p/msbte-mcqs.html

1. Which one of the following databases has PHP supported almost since 1/1
the beginning? *

a) Oracle Database

b) SQL

c) SQL+

d) MySQL

2. The updated MySQL extension released with PHP 5 is typically referred 1/1
to as _______________ *

a) MySQL

b) mysql

c) mysqli

d) mysqly

https://docs.google.com/forms/d/e/1FAIpQLScBmZAvIqTbLzgQbtGoH1rrp3-Wb8ZEpffCYtle3o3gFgu-vQ/viewscore?viewscore=AE… 1/8
13/09/2020 Unit 5: Database Operations (22619 WBP)

3. Which is the second largest integer range/ * 1/1

(a) BIGINT

(b) MEDUMINT

(c) INT

d) SMALLINT

4. Which is the fourth-largest integer rang? * 1/1

a) BIGINT

(b) INT

(c) MEDUMINT

(d) SMALLINT

5. Which is the double-precision floating point number? * 1/1

(a) semi-double

(b) float

(c) single

(d) double

https://docs.google.com/forms/d/e/1FAIpQLScBmZAvIqTbLzgQbtGoH1rrp3-Wb8ZEpffCYtle3o3gFgu-vQ/viewscore?viewscore=AE… 2/8
13/09/2020 Unit 5: Database Operations (22619 WBP)

6. What is the largest non-binary string representation? * 1/1

(a) LONGBLOB

(b) LONGTEXT

(c) MEDIUMBLOB

(d) MEDIUMTEXT

7. Which one of the following lines need to be uncommented or added in 1/1


the php.ini file so as to enable mysqli extension? *

a) extension=php_mysqli.dll

b) extension=mysql.dll

c) extension=php_mysqli.dl

d) extension=mysqli.d

8. Which one of the following statements is used to create a table? * 1/1

a) CREATE TABLE table_name (column_name column_type);

b) CREATE table_name (column_type column_name);

c) CREATE table_name (column_name column_type);

d) CREATE TABLE table_name (column_type column_name);

https://docs.google.com/forms/d/e/1FAIpQLScBmZAvIqTbLzgQbtGoH1rrp3-Wb8ZEpffCYtle3o3gFgu-vQ/viewscore?viewscore=AE… 3/8
13/09/2020 Unit 5: Database Operations (22619 WBP)

9. Which one of the following statements instantiates the mysqli class? * 1/1

a) mysqli = new mysqli()

b) $mysqli = new mysqli()

c) $mysqli->new.mysqli()

d) mysqli->new.mysqli()

10. Which one of the following statements can be used to select the 1/1
database? *

a) $mysqli=select_db('databasename');

b) mysqli=select_db('databasename');

c) mysqli->select_db('databasename');

d) $mysqli->select_db('databasename');

11. Which one of the following methods can be used to diagnose and 1/1
display information about a MySQL connection error? *

a) connect_errno()

b) connect_error()

c) mysqli_connect_errno()

d) mysqli_connect_error()

https://docs.google.com/forms/d/e/1FAIpQLScBmZAvIqTbLzgQbtGoH1rrp3-Wb8ZEpffCYtle3o3gFgu-vQ/viewscore?viewscore=AE… 4/8
13/09/2020 Unit 5: Database Operations (22619 WBP)

12. Which method returns the error code generated from the execution 1/1
of the last MySQL function? *

a) errno()

b) errnumber()

c) errorno()

d) errornumber()

13. In PHP in order to access the MySQL database you will use: * 1/1

A) mysqlconnect() function

B) mysql-connect() function

C) mysql_connect() function

D) sql_connect() function

14. SQL is not case sensitive. SELECT is the same as select. * 1/1

True

False

https://docs.google.com/forms/d/e/1FAIpQLScBmZAvIqTbLzgQbtGoH1rrp3-Wb8ZEpffCYtle3o3gFgu-vQ/viewscore?viewscore=AE… 5/8
13/09/2020 Unit 5: Database Operations (22619 WBP)

15. Which of the following function fetches a result as an associative 1/1


array? *

A) fetch()

B) mysqli_fetch_object()

C) mysql_fetch_arrays()

D) mysqli_fetch_array()

16. Which of the following commands should be used to create a 1/1


database named “cwipedia”? *

CREATE DATABASE cwipedia

CREATE –I cwipedia

DATABASE / cwipedia

mysql –s cwipedia

17. MySQL is * 1/1

A)A GUI (Graphic User Interface)

B) A Relational Database Management System

C) An API (Application Programmer Interface)

D) A technique for writing reliable programs

https://docs.google.com/forms/d/e/1FAIpQLScBmZAvIqTbLzgQbtGoH1rrp3-Wb8ZEpffCYtle3o3gFgu-vQ/viewscore?viewscore=AE… 6/8
13/09/2020 Unit 5: Database Operations (22619 WBP)

18. What happens if you run a DELETE command that does not contain a 1/1
WHERE clause? *

A) Single row will be deleted

B) First row will be deleted

C) Last row will be deleted

D) All rows will be deleted from the table.

19. Which of the following method can be used to close a MySql 1/1
database using PHP? *

A - mysql_connect()

B - mysql_query()

C - mysql_close()

D - None of the above

20. Which query is suitable if I want to delete rollno cw302 from the 1/1
database *

A. DELETE FROM Stud WHERE rollno=cw302

B. DELETE FROM Stud WHERE rollno='cw302'

C. DELETE FROM Stud WHERE rollno="cw302"

D. Both B and C

E. none of the above

https://docs.google.com/forms/d/e/1FAIpQLScBmZAvIqTbLzgQbtGoH1rrp3-Wb8ZEpffCYtle3o3gFgu-vQ/viewscore?viewscore=AE… 7/8
13/09/2020 Unit 5: Database Operations (22619 WBP)

Feedback *

ANSWER KEY

This content is neither created nor endorsed by Google. - Terms of Service - Privacy Policy

Forms

https://docs.google.com/forms/d/e/1FAIpQLScBmZAvIqTbLzgQbtGoH1rrp3-Wb8ZEpffCYtle3o3gFgu-vQ/viewscore?viewscore=AE… 8/8

You might also like