CIS275 - Chapter 10: Complex Data Types Flashcards

1
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. A SET is defined with the SET keyword followed by a list of elements.
  2. SET values are specified as strings containing elements separated by commas. The string cannot contain blanks.
A
  1. SET values can be compared with string functions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. The QuarterlySales column is an array of four integers, representing employee sales in each of four quarters.
  2. Array values are specified as elements separated by commas and within braces.
A
  1. QuarterlySales[2] refers to the second element of each value in the QuarterlySales column.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. The Library table contains a Book column with JSON type.
  2. JSON_OBJECT() converts element names and data to a JSON document, stored in the internal MySQL format.
  3. The SELECT statement retrieves JSON documents. Each document appears on one line.
A
  1. The SELECT statement uses JSON_EXTRACT() to extract data from the Book column. Only “Tom Sawyer” has a Pages element.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  1. A point in two dimensions has X and Y coordinates. POINT(22 8) is WKT format.
  2. A WKT linestring is a series of connected line segments. Points are separated by commas.
A
  1. A WKT polygon is a series of points, separated by commas and enclosed in an extra set of parentheses.
  2. WKT polygons can have holes. The first polygon is the outer boundary and the second is a hole.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
A
17
Q
A
18
Q
  1. Location is a spatial column. Coordinates are latitude and longitude in spatial reference system 4326.
  2. INSERT statement converts WKT to internal format with ST_POINTFROMTEXT(), which requires an SRID parameter.
A
  1. SELECT statement converts internal format to WKT with ST_ASTEXT().
19
Q
A
20
Q
  1. The Capital table contains state capitals. Location values are latitude and longitude in spatial reference system 4326.
  2. ST_DISTANCE() computes each capital’s distance in meters to 40° latitude and -100° longitude. MySQL uses the British spelling ‘metre’ rather than the American spelling ‘meter’.
A
  1. The WHERE clauses uses ST_X() to get the Location’s X-coordinate. Spatial data must be converted to numeric data to use a comparison operator.
  2. Sacramento and Des Moines both have X-coordinates < 42. Distance is displayed in meters.
21
Q
A
22
Q
A
23
Q
A
24
Q
A
25
Q
A
26
Q
  1. The supertype must specify NOT FINAL to allow subtypes.
  2. GlobalAddressType is a subtype of AddressType with an additional property.
  3. GlobalAddressType overrides the FormatAddress function.
A
  1. The global FormatAddress function adds the country the formatted address.
27
Q
A