10 Chapter 17, Big Data: Hadoop, Spark, NoSQL and IoT
b. Because all of a column’s elements are stored together, selecting all the data for
a given column is more efficient.
c. Consider our authors table in the books database:
first last
id
1 Paul Deitel
2 Harvey Deitel
3 Abbey Deitel
4 Dan Quirk
5 Alexander Wald
If we consider each row as a Python tuple, the rows would be represented as (1,
‘Paul’, ‘Deitel’), (2, ‘Harvey’, ‘Deitel’), etc. In a columnar database,
all the values for a given column would be stored together, as in (1, 2, 3, 4, 5),
(‘Paul’, ‘Harvey’, ‘Abbey’, ‘Dan’, ‘Alexander’) and (‘Deitel’, ‘De-
itel’, ‘Deitel’, ‘Quirk’, ‘Wald’).
d. All of the above statements are true.
17.3.4 NoSQL Graph Databases
17.3 Q8: Which of the following statements a), b) or c) about graph databases is
false?
a. A graph database models relationships between objects.
b. The objects are called nodes (or vertices) and the relationships are called edges.
c. Edges are bidirectional.
d. All of the above statements are true.
17.3 Q9: Which of the following statements a), b) or c) is false?
a. A graph database stores nodes, edges and their attributes. If you use social net-
works, like Instagram, Snapchat, Twitter and Facebook, consider your social
graph, which consists of the people you know (nodes) and the relationships be-
tween them (edges). Every person has their own social graph, and these are in-
terconnected.
b. The famous “six degrees of separation” problem says that any two people in the
world are connected to one another by following a maximum of six edges in the
worldwide social graph.
c. Facebook’s algorithms use the social graphs of their billions of users to deter-
mine which stories should appear in each user’s news feed.