CIS275 - Chapter 10: Complex Data Types Flashcards
1
Q
A
2
Q
A
3
Q
A
4
Q
A
5
Q
A
6
Q
- A SET is defined with the SET keyword followed by a list of elements.
- SET values are specified as strings containing elements separated by commas. The string cannot contain blanks.
A
- SET values can be compared with string functions.
7
Q
A
8
Q
- The QuarterlySales column is an array of four integers, representing employee sales in each of four quarters.
- Array values are specified as elements separated by commas and within braces.
A
- QuarterlySales[2] refers to the second element of each value in the QuarterlySales column.
9
Q
A
10
Q
A
11
Q
A
12
Q
A
13
Q
- The Library table contains a Book column with JSON type.
- JSON_OBJECT() converts element names and data to a JSON document, stored in the internal MySQL format.
- The SELECT statement retrieves JSON documents. Each document appears on one line.
A
- The SELECT statement uses JSON_EXTRACT() to extract data from the Book column. Only “Tom Sawyer” has a Pages element.
14
Q
A
15
Q
- A point in two dimensions has X and Y coordinates. POINT(22 8) is WKT format.
- A WKT linestring is a series of connected line segments. Points are separated by commas.
A
- A WKT polygon is a series of points, separated by commas and enclosed in an extra set of parentheses.
- WKT polygons can have holes. The first polygon is the outer boundary and the second is a hole.