Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the maximum number of indexes on MyISAM table?(a) 0(b) 1(c) 2(d) more than 1I got this question in an online interview.The origin of the question is Putting PHP to Work in section MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct answer is (d) more than 1

Explanation: In MySQL, for a MyISAM table, there can be more than one indexes. The DATA ROWS of the MyISAM table are stored in a data FILE and the index values are stored in a separate index file.

2.

When the security context enables carefully written stored programs to be set up that provide controlled access to tables for users, it is called __________(a) bad(b) good(c) illegal(d) fareThe question was asked in an interview for job.This intriguing question originated from Putting PHP to Work topic in section MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Right choice is (b) good

To elaborate: The SECURITY context is good if it enables CAREFULLY written stored programs to be set up that PROVIDE controlled access to tables for users who are not ABLE to access them DIRECTLY.

3.

What is the creation of a stored program similar to?(a) Trigger(b) Event(c) View(d) TableThe question was posed to me in final exam.Origin of the question is Putting PHP to Work topic in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The CORRECT option is (C) View

To explain I would say: When a stored PROGRAM is created, an object is created that is to be executed later. This also the case when a view is defined: It sets up a SELECT STATEMENT intended for later INVOCATION.

4.

The line used to turn on the event scheduler is ______________(a) event_scheduler = ON(b) eventscheduler = ON(c) event_scheduler_ON(d) events_scheduler_ONThis question was posed to me in exam.I need to ask this question from Putting PHP to Work topic in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer» CORRECT option is (a) event_scheduler = ON

The best I can explain: The LINE ‘event_scheduler = ON’ is put in the option file that the server READS. The event scheduler does not run by default. It must be turned on if events are to used in the DATABASE.
5.

A stored program associated with a schedule is ______________(a) Trigger(b) Event(c) Stored function(d) Stored procedureThe question was asked in homework.Enquiry is from Putting PHP to Work topic in section MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Right answer is (b) Event

The BEST explanation: The MYSQL version 5.1.6 and above has an event scheduler. It ENABLES to perform time activated database operations. An event is a STORED program that is associated with a schedule.

6.

DBI scripts are located in the directory ______________(a) cgi-inc(b) cgi-bin(c) cgi-usr(d) cgi-perlThis question was posed to me in examination.This interesting question is from Putting PHP to Work in section MySQL Programs Using Perl DBI and PHP of MySQL

Answer» RIGHT answer is (b) cgi-bin

The BEST I can explain: DBI SCRIPTS are located in a cgi-bin directory located outside of document TREE. The PHP scripts are different from DBI scripts since PHP scripts are located within the web server document tree.
7.

PHP scripts are located in the web server document tree.(a) True(b) FalseThe question was asked during a job interview.I want to ask this question from Putting PHP to Work topic in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct answer is (a) True

The best I can explain: The PHP SCRIPTS are different from DBI scripts SINCE PHP scripts are located within the WEB server document TREE while DBI scripts are located in a cgi-bin directory located outside of document tree.

8.

In PHP, which operator is used to access property of an object?(a) .(b) *(c) ->(d) @I have been asked this question in my homework.Question is from Putting PHP to Work topic in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer» RIGHT answer is (c) ->

For explanation I would say: If $a represents an object, the properties it has can be ACCESSED as $a->property-name. For INSTANCE, $a->white, $a->black, $a->BLUE, $a->red can be the properties of $a and accessed in this WAY.
9.

Arrays cannot have associative indices in PHP.(a) True(b) FalseThis question was addressed to me in an interview.The query is from Putting PHP to Work in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Correct answer is (B) False

The explanation is: The PHP arrays can even have both numeric and ASSOCIATIVE elements. For example, $x[1] and $x[“LARGE”] can both be the elements of the same array. $x can be an object, WHOSE elements are accessed by the arrow ‘->’ operated.

10.

In PHP, if $a represents an array with numeric indices, how is the first element accessed?(a) $a[1](b) $a[0](c) $a.1(d) $a.0This question was addressed to me in examination.The doubt is from Putting PHP to Work in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Correct answer is (b) $a[0]

Best explanation: If $a represents an ARRAY with numeric indices, its elements are accessed as $x[0], $x[1], and so on. In GENERAL TERMS, each element at the position i is accessed and USED as $a[i – 1].

11.

The statement used to create a trigger is ______________(a) CREATE TRIGGER(b) CREATE TRIGGERS(c) PRODUCE TRIGGER(d) PRODUCE TRIGGERSThe question was posed to me in an online quiz.The origin of the question is PHP Overview in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct choice is (a) CREATE TRIGGER

The explanation is: In order to create a trigger, the CREATE TRIGGER statement is USED. The definition indicates the particular type of statement for which the trigger ACTIVATES and WHETHER it activates before or after the rows are MODIFIED.

12.

The number of values that can be returned from a given stored function is ______________(a) 0(b) 1(c) 2(d) 3I got this question in an interview for job.My enquiry is from PHP Overview topic in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The CORRECT option is (b) 1

The explanation: In MySQL, the STORED function cannot return multiple values. Instead, multiple stored functions can be written and invoked from within a single STATEMENT however, they are DIFFERENT from stored procedures.

13.

Which statement is used to produce a stored function?(a) PRODUCE FUNCTION(b) CREATE FUNCTION(c) PRODUCE PROCEDURE(d) CREATE PROCEDUREI got this question in an interview for job.I want to ask this question from PHP Overview in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Correct choice is (b) CREATE FUNCTION

The BEST I can explain: The ‘CREATE FUNCTION’ statement is used to create a STORED function in MYSQL. The ‘CREATE PROCEDURE’ statement is used to create a stored procedure INSTEAD, from which values are not RETURNED.

14.

What is defined to execute when the table is modified only?(a) Stored functions(b) Stored procedures(c) Triggers(d) EventsThis question was posed to me in examination.This intriguing question comes from PHP Overview in section MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct option is (c) Triggers

To explain: In MYSQL, triggers are associated with a table. They are DEFINED to EXECUTE when the table is modified VIA INSERT, DELETE or UPDATE statements. MySQL SUPPORTS objects to be stored on server side.

15.

What returns a result to the client?(a) Stored functions(b) Stored procedures(c) Triggers(d) EventsI have been asked this question in an internship interview.The question is from PHP Overview in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Correct choice is (a) Stored functions

To explain I WOULD say: Stored functions return a result from a calculation and can be USED in EXPRESSIONS. Stored procedures do not return a result directly but can be used to PERFORM general computations.

16.

The datatype best suited to store currency values is __________(a) INT(b) FLOAT(c) DOUBLE(d) DECIMALThis question was addressed to me in an interview for internship.My question is based upon PHP Overview topic in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Correct ANSWER is (d) DECIMAL

The EXPLANATION is: Currency is a numeric information. For monetary calculations, FLOAT and DOUBLE are subject to rounding error and may not be suitable. A DECIMAL(M, 2) type is best SUITED for it.

17.

PHP variables are preceded by __________(a) _(b) @(c) $(d) &The question was posed to me in class test.Enquiry is from PHP Overview in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Correct choice is (c) $

EXPLANATION: All the PHP scripts that use variables have variable names PRECEDED by the dollar sign (‘$’). The variables are SIGNIFIED by this identifier, irrespective of the VALUE it stores.

18.

The output from PHP is __________(a) statically generated(b) dynamically generated(c) not generated(d) no outputThe question was asked in an interview for internship.My question is from PHP Overview topic in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Correct OPTION is (b) dynamically generated

To explain I would say: The interpreter switches between CODE mode back and text mode when it sees another special tag which SIGNALS the end of the code. This ENABLES the mix of static text with dynamically generated results.

19.

The PHP interpreter switches mode continuously.(a) True(b) FalseI have been asked this question during an online exam.My doubt is from PHP Overview topic in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer» RIGHT ANSWER is (a) True

To EXPLAIN I would say: As soon as the PHP interpreter COMES across a special opening tag it switches from ‘text copy’ mode to ‘PHP code’ mode. It STARTS interpreting the file as PHP code to be executed.
20.

The basic operation of PHP is to interpret a script.(a) True(b) FalseI got this question in an interview.The above asked question is from PHP Overview topic in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Right OPTION is (a) True

To elaborate: The elementary operation of PHP is interpreting a SCRIPT in ORDER to produce a web page. This is sent to a client. A PHP script generally contains a mix of HTML and executable CODE.

21.

The datatype best suited to store currency values is ______________(a) INT(b) FLOAT(c) DOUBLE(d) DECIMALThe question was posed to me in an interview for internship.Query is from Using Perl DBI in Web Applications in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct option is (d) DECIMAL

Explanation: CURRENCY is a numeric information. For monetary calculations, FLOAT and DOUBLE are SUBJECT to ROUNDING error and may not be suitable. A DECIMAL(M, 2) TYPE is best suited for it.

22.

The AUTO_INCREMENT column attribute is best used with ______________(a) FLOAT(b) INT(c) CHARACTER(d) DOUBLEI have been asked this question in quiz.My doubt is from Using Perl DBI in Web Applications in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct option is (B) INT

The EXPLANATION is: The AUTO_INCREMENT is a column attribute and it is BEST used with the integer datatypes. It AUTOMATICALLY assigns monotonically increasing values to the AUTO_INCREMENT columns.

23.

What does ‘abc’ || ‘xyz’ result in if the PIPES_AS_CONCAT is disabled?(a) 1(b) 0(c) error(d) -1I had been asked this question in an interview for internship.The query is from Using Perl DBI in Web Applications in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Right ANSWER is (b) 0

For explanation: When the SQL mode PIPES_AS_CONCAT is disabled, the SQL STANDARD ‘||’ operation for string concatenation is not VALID in MySQL. Both operands are converted to zero. So the result is zero.

24.

What does the expression ’12 DIV 5′ evaluate to?(a) 2.4(b) 2(c) error(d) 0I had been asked this question during an online exam.Enquiry is from Using Perl DBI in Web Applications in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Right choice is (b) 2

To explain: The ‘DIV’ OPERATOR in MYSQL is USED to perform the integer divisions. The operator ‘/’ performs the quotient of the operands. If result exceeds the 64-bit range, UNPREDICTED results are shown.

25.

By default, the AUTO_INCREMENT sequences begin at __________(a) 0(b) 1(c) -1(d) 2I had been asked this question during a job interview.My doubt is from Using Perl DBI in Web Applications in section MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct answer is (b) 1

Explanation: The AUTO_INCREMENT column attribute PROVIDES UNIQUE numbers for column identification. AUTO_INCREMENT SEQUENCES normally begin at 1 and increase monotonically like 1, 2, 3, and so on.

26.

There can be more than one column per table with the AUTO_INCREMENT attribute.(a) True(b) FalseI got this question at a job interview.Question is from Using Perl DBI in Web Applications topic in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct choice is (b) False

Easy explanation: In MySQL, there can only be one column per table with the AUTO_INCREMENT ATTRIBUTE. It should ALSO have an integer data type. The AUTO_INCREMENT is also allowed for floating POINT types.

27.

CGI.pm also supports an object oriented style of use.(a) True(b) FalseThe question was asked during an online interview.Asked question is from Using Perl DBI in Web Applications in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct choice is (a) True

For explanation: ‘CGI.pm’ supports an object ORIENTED style of USE which ALLOWS to invoke its functions without importing the names. To do this, a use statement is included and a CGI object is created.

28.

Which line is written at the top of the script to write a Perl script using CGI.pm?(a) use this CGI(b) put CGI(c) use CGI(d) include CGIThis question was posed to me in an international level competition.My question is from Using Perl DBI in Web Applications in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Right OPTION is (c) use CGI

The best explanation: In order to WRITE a Perl SCRIPT that uses the ‘CGI.pm’ module, a ‘use CGI’ statement is included near the BEGINNING of the script that imports the FUNCTION names of the module.

29.

CGI stands for ______________(a) Computer Gateway Interface(b) Common Gateway Interface(c) Computer Generated Interface(d) Common Generated InterfaceThe question was asked during an online exam.My question comes from Using Perl DBI in Web Applications in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct answer is (b) Common GATEWAY Interface

To EXPLAIN: The ‘CGI.pm’ module is so CALLED because it helps write scripts that use the ‘Common Gateway Interface’ protocol which defines how a web server COMMUNICATES with other PROGRAMS.

30.

The module that links DBI to the web is ______________(a) CGI.pn(b) CGI.pem(c) CGI.pm(d) CGI.poThis question was posed to me in class test.The above asked question is from Using Perl DBI in Web Applications in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Correct option is (c) CGI.pm

Easy explanation: The CGI.pm module is used to write scripts that use the ‘Common Gateway Interface’ protocol. It defines how a WEB server communicates with other PROGRAMS. It provides an easy LINK.

31.

The column attribute provides unique numbers for identification is ______________(a) AUTO_INCREMENT(b) UNSIGNED(c) IDENTIFY(d) DESCRIBEI had been asked this question in an online quiz.Enquiry is from Putting Perl DBI to Work in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer» CORRECT CHOICE is (a) AUTO_INCREMENT

Explanation: In MySQL, the mechanism for providing unique numbers is through the AUTO_INCREMENT column attribute. It ENABLES the GENERATION of sequential numbers automatically. This facilitates identification.
32.

Illegal values converted to the appropriate ‘zero’ value for ______________(a) Numeric(b) String(c) ENUM(d) TIMEThis question was addressed to me at a job interview.This is a very interesting question from Putting Perl DBI to Work topic in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The CORRECT answer is (d) TIME

The best I can explain: In MySQL, there are DIFFERENT ways to handle the illegal values for different datatypes for default. For date or time COLUMNS, illegal values are converted to the appropriate “zero” VALUE for the type.

33.

What is the maximum non zero values for DOUBLE?(a) ±1.7976931348623157E+307(b) ±1.7976931348623157E+308(c) ±1.7976931348623157E+306(d) ±1.7976931348623157E+305This question was posed to me in a job interview.This interesting question is from Putting Perl DBI to Work topic in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer» CORRECT option is (B) ±1.7976931348623157E+308

To explain I would say: In MySQL, all the DATATYPES have their own ranges. Data types give an idea of the kind of values and the ranges that a VARIABLE is allowed to STORE. The maximum non zero value for DOUBLE is ±1.7976931348623157E+308.
34.

What is the maximum non zero value for FLOAT?(a) 3.402823466E+38(b) 3.402823466E+37(c) 3.402823466E+39(d) 3.402823466E+35I have been asked this question during an interview.This interesting question is from Putting Perl DBI to Work in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Right OPTION is (a) 3.402823466E+38

Explanation: In MYSQL, each datatype has its own range. Data types give an IDEA of the kind of values and the ranges that a variable is allowed to store. The MAXIMUM non ZERO value for FLOAT is 3.402823466E+38.

35.

The function returning reference to array of row values is ______________(a) fetchrow_array()(b) fetchrow_arrayref()(c) fetch()(d) fetchrow_hashref()The question was posed to me in homework.My doubt stems from Putting Perl DBI to Work in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer» RIGHT option is (B) fetchrow_arrayref()

Easy explanation: ‘fetchrow_arrayref()’ RETURNS a reference to an array of row VALUES. The function ‘fetchrow_hashref()’ returns reference to HASH of row values. ‘fetch()’ is the same as fetchrow_arrayref().
36.

fetchrow_hashref() returns reference to hash of row values keyed by ______________(a) row name(b) column name(c) table name(d) database nameThe question was posed to me in an interview for internship.My question is from Putting Perl DBI to Work topic in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer» CORRECT choice is (b) column NAME

Best explanation: The function ‘fetchrow_hashref()’ returns REFERENCE to hash of ROW values, keyed by the column name. The function ‘fetchrow_arrayref()’ returns a reference to an array of row values.
37.

The function returning reference to hash of row values is ______________(a) fetchrow_array()(b) fetchrow_arrayref()(c) fetch()(d) fetchrow_hashref()The question was asked in an international level competition.I would like to ask this question from Putting Perl DBI to Work in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct ANSWER is (d) fetchrow_hashref()

To explain: The function ‘fetchrow_hashref()’ RETURNS reference to hash of ROW values. ‘fetchrow_arrayref()’ returns a reference to an ARRAY of row values. ‘fetch()’ is the same as fetchrow_arrayref().

38.

The function returning an array of row values is ______________(a) fetchrow_array()(b) fetchrow_arrayref()(c) fetch()(d) fetchrow_hashref()This question was addressed to me by my college director while I was bunking the class.Question is taken from Putting Perl DBI to Work topic in section MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct OPTION is (a) fetchrow_array()

To explain I would say: The function ‘fetchrow_array()’ RETURNS an ARRAY of row VALUES. ‘fetchrow_arrayref()’ returns a reference to an array of row values. ‘fetch()’ is the same as fetchrow_arrayref().

39.

RTF refers to ______________(a) Rich Text Format(b) Right Text Format(c) Rich Text Function(d) Right Text FunctionThe question was asked by my college professor while I was bunking the class.Question is taken from Putting Perl DBI to Work in section MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The CORRECT OPTION is (a) Rich Text Format

Explanation: RTF (Rich Text Format) is a format developed by Microsoft that is UNDERSTOOD by many word processors. MS-Word is one such PROGRAM. Many others such as ‘OpenOffice’ UNDERSTAND it too.

40.

What is the datatype for single precision floating point number?(a) FLOAT(b) DOUBLE(c) INT(d) BIGINTI got this question at a job interview.This interesting question is from Perl DBI Overview in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct choice is (a) FLOAT

Best EXPLANATION: There are various numeric datatypes in MySQL. Some of them are TINYINT, SMALLINT, BIGINT, FLOAT, DOUBLE and BIT. ‘FLOAT’ is for single precision floating point numbers UNLIKE DOUBLE.

41.

What is the escape sequence for carriage return?(a) ‘\c’(b) ‘\r’(c) ‘\b’(d) ‘\z’I got this question in semester exam.I need to ask this question from Perl DBI Overview topic in section MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Right answer is (b) ‘\R

The best I can EXPLAIN: MySQL provides the FACILITY to use a wide range of escape sequences. They are special characters. They begin with the backslash character. For example, ‘\r’ specifies carriage return.

42.

Hexadecimal numbers can be used in scientific notation.(a) True(b) FalseI have been asked this question in my homework.Question is from Perl DBI Overview in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer» RIGHT choice is (B) False

To explain I WOULD say: The scientific notation for real numbers is possible in MYSQL. Approximate VALUES are represented as floating point numbers in scientific notation. It consists of a mantissa and exponent.
43.

The numbers that are prefixed with ‘0x’ are in base __________(a) 8(b) 16(c) 32(d) 64This question was addressed to me in unit test.I would like to ask this question from Perl DBI Overview topic in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Correct option is (b) 16

Explanation: In MySQL, there are MANY numeric DATATYPES. They include integers and floating points. For example, 34, 12.3, -1.3E11. The NUMBERS that are prefixed with ‘0X’ are in hexadecimal.

44.

The indicator of presence/absence of a word in search is used in the mode ______________(a) Natural language(b) Boolean mode(c) Query expansion(d) Cross modeI have been asked this question in an online interview.This intriguing question originated from Perl DBI Overview topic in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Right choice is (b) Boolean mode

The best explanation: A full text search capability is PROVIDED in MySQL. It facilitates to LOOK for words or phrases WITHOUT using pattern-matching operations. Boolean search is ONE of the three MODES.

45.

Which mode of search is the search string parsed into words and the search looks for rows?(a) Boolean mode(b) Natural language(c) Query expansion(d) Cross modeThis question was posed to me by my college director while I was bunking the class.This intriguing question originated from Perl DBI Overview in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Right choice is (b) Natural language

For EXPLANATION: In MySQL, a full text search capability is provided, which ENABLES to look for words or PHRASES without using pattern-matching operations. There are three KINDS of full text searches.

46.

While using DBI API functions are called and pointers to structures are used.(a) True(b) FalseThis question was addressed to me during a job interview.Enquiry is from Perl DBI Overview in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct choice is (a) True

The best I can EXPLAIN: While using the DBI API functions are called and POINTERS to STRUCTURES are used. The functions are called “methods,” pointers are called “REFERENCES,” POINTER variables are called “handles”.

47.

The return value from operations returning a row count is ______________(a) $rc(b) $rv(c) $rows(d) $aryThis question was posed to me during an online interview.My doubt is from Perl DBI Overview in division MySQL Programs Using Perl DBI and PHP of MySQL

Answer» RIGHT choice is (c) $ROWS

Explanation: The Perl Non-handle variable ‘$ary’ is an array or list representing a row of values returned by a query. ‘$RCRETURNS CODE from operations that return true or false. ‘$rv’ returns value from operations that return an integer. ‘$rows’ returns value from operations that return a row count.
48.

The non handle array representing a row of values is ______________(a) $rc(b) $rv(c) $rows(d) $aryI had been asked this question by my college director while I was bunking the class.I'm obligated to ask this question of Perl DBI Overview topic in section MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct OPTION is (d) $ary

To explain: The PERL Non-handle variable ‘$ary’ is an array or list representing a row of values returned by a query. ‘$rc’ returns code from OPERATIONS that RETURN true or FALSE. ‘$rv’ returns value from operations that return an integer. ‘$rows’ returns value from operations that return a row count.

49.

The generic handle whose meaning depends on context is ______________(a) $dbh(b) $sth(c) $fh(d) $hI got this question in class test.I'm obligated to ask this question of Perl DBI Overview topic in portion MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

The correct option is (d) $h

Easy explanation: The variable named ‘$fh’ is a handle to an OPEN FILE. ‘$h’ is a GENERIC handle and the MEANING depends on context. ‘$dbh’ is a handle to a database object. ‘$sth’ is a handle to a QUERY object.

50.

Foreign keys can handle deletes and updates.(a) True(b) FalseThe question was posed to me in a job interview.I would like to ask this question from Perl DBI Overview in chapter MySQL Programs Using Perl DBI and PHP of MySQL

Answer»

Correct answer is (a) True

To explain I would say: A FOREIGN key is the one which declares that an index in one table is related to that in another and PLACE constraints. It is useful for HANDLING deletes and updates ALONG with row entries.