This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Spatial Data Types”.
1. Which classes does spatial data types in MySQL correspond to?
a) OpenGSS
b) OpenGIS
c) ClosedGSS
d) ClosedGIS
View Answer
Explanation: MySQL has spatial data types that correspond to OpenGIS classes. Some of them that hold single geometry values are ‘GEOMETRY’, ‘POINT’, ‘LINESTRING’ and ‘POLYGON’. Some can hold a collection of values.
2. Which type can store a collection of objects of any type?
a) GEOMETRYCOLLECTION
b) MULTIPOINT
c) MULTILINESTRING
d) MULTIPOLYGON
View Answer
Explanation: ‘GEOMETRYCOLLECTION’ can store a collection of objects of any type. The other collection types like ‘MULTIPOINT’, ‘MULTILINESTRING’, ‘MULTIPOLYGON’ and ‘GEOMETRYCOLLECTION’ restrict collection members to those having a particular geometry type.
3. SPATIAL indexes cannot be created on NOT NULL spatial columns.
a) True
b) False
View Answer
Explanation: The ‘SPATIAL’ indexes can be created on ‘NOT NULL’ spatial columns. Therefore, if it is planned to index the column, it would need to be declared as NOT NULL. This type can be used in many ways.
4. MySQL does not automatically convert a date or time value to a number if the value is used in a numeric context.
a) True
b) False
View Answer
Explanation: MySQL automatically converts a date or time value into a number if the value is used in a numeric context and vice versa. A ‘zero’ value can also be represented in MySQL.
5. What is the generic handle whose meaning depends on context?
a) $dbh
b) $sth
c) $fh
d) $h
View Answer
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.
6. What is the non handle array representing a row of values?
a) $rc
b) $rv
c) $rows
d) $ary
View Answer
Explanation: 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.
7. The mode of search is the search string parsed into words and the search looks for rows is ______________
a) Boolean mode
b) Natural language
c) Query expansion
d) Cross mode
View Answer
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.
8. In which mode is the indicator of the presence/absence of a word in search used?
a) Natural language
b) Boolean mode
c) Query expansion
d) Cross mode
View Answer
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.
Sanfoundry Global Education & Learning Series – MySQL Database.
To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Apply for Programming Internship
- Check MySQL Books
- Practice Programming MCQs
- Check Information Technology Books