MySQL Questions and Answers – Spatial Data Types

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

Answer: b
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

Answer: a
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

Answer: b
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.
advertisement
advertisement

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

Answer: b
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

Answer: d
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

Answer: d
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

Answer: b
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.
advertisement

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

Answer: b
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.

advertisement

To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.