Data Formats Flashcards

(38 cards)

1
Q

XML stands for

A

eXtensible Markup Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • is a text-based format for representing structured information: documents, data, configurations, books, transactions, etc.
  • derived from an older standard format called SGML (Standard Generalized Markup Language).
A

XML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

HTML is a 1. ________ format, with a predefined markup language.
XML is used as a 2. ________. (a language used to describe other languages).

A
  1. fixed
  2. metalanguage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

True or False

XML elements include the opening and closing tag, and everything in between.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

XML can contain
1.
2.
3.

A
  1. Text
  2. Attributes
  3. Other Elements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

True or False

Element/Tag Names are not case sensitive

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Element/tag names can contain:

(5 items)

A

letters, numbers, hyphens, underscores, and periods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or False

Element/tag names can only start with a letter or underscore

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Valid or invalid tag?

<100CMSC>
A

Invalid

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

True or False

Element names can contain spaces

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

True or False

Attributes should not be quoted

A

False

Attributes must be quoted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  • an XML document that describes the structure of other XML-based languages.
  • They contain constraints about the syntax and valid data types of the document they’re describing.
A

XML Schema

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. List of valid elements
  2. Valid types for the elements
  3. Structure/syntax of the language
A

XML Schema/s

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Documents that use known schemas can use single-line schema declarations like HTML’s ____

A

DTD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

DTD meaning

A

Document Type Definition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

XML Schemas are used by programs that parse XML content:

A
  • XML Validators
  • Code Editors
17
Q

JSON meaning

A

JavaScript Object Notation

18
Q

True or False

JSON is PL/script independent, but it shares analogous concepts with most programming languages.

19
Q

True or False

It uses similar conventions to C (C, C++, C#), Java, JavaScript, Perl, Python.

20
Q

Valid or invalid? (JSON)

{
“title”: “HTTP: The Definitive Guide”,
“publisher”: “O’Reilly Media”,
“authors”: [ “Totty”, “Gourly” ]
}

A

Invalid

JSON must have straight quotation marks: “”

21
Q

JSON data is built on 2 structures:

A
  • Objects
  • Arrays
22
Q

True or False

The JSON ‘object’ itself is an object, not an array.

23
Q

are collection of key-value pairs separated by colons ( : ) and delimited by commas ( , ).

24
Q

are ordered lists of values. The contents of an array doesn’t have to be of a single type.

25
These data structures are universal. You can find analogous structures in all PLs.
Object - record, dictionary, hash table Array - list, vector, sequence
26
JSON Values can be:
* Strings * Numbers * Boolean * Arrays * Objects * null
27
are a sequence of one or more Unicode characters, surrounded by double quotes. May use escape characters ( ‘\\’, ‘\n’, ‘\t’, etc. )
Strings
28
in JSON are like Numbers in C or Java. They can have decimals and exponents.
Numbers
29
# True or False Keys must be surrounded by double quotes (""), unlike JavaScript Objects.
True
30
# True or False Square brackets [ ] hold arrays Curly braces { } hold objects
True
31
is the process of converting data structures / object states into formats that can be stored and later reconstructed.
Serialization
32
An object to be serialized may be an _\_\_\_\_\_\_\_ in memory created by a running program.
object/data structure
33
Why serialization?
These objects or data, only existing in computer memory, need to be converted to a serial format before storage or transport.
34
1. _\_\_\_ and 2. _\_\_\_ are common format choices for transporting data over the web.
1. XML 2. JSON
35
is the reverse process whereby data in a serial format is restored into memory (for a program to use).
Deserialization
36
# True or False Both JSON and XML are not self-describing (human readable).
False
37
# True or False Both JSON and XML are not hierarchical.
False
38
XML and JSON Comparison Table
Table --------- Table XML --------------------- JSON More verbose --------- Less verbose Only explicit ----------- Has several data type --------------- data types is String. ---------------- (number, boolean, ----------------------------- string, arrays, objects) Some ambiguous ---- No ambiguity interpretation Both have a human readable, hierarchical structure Many PLs support parsing and writing both formats