I need to help!

profilebob777
fail_away_7th_edition_week_4.pdf

Fai[ Away with Dynamo, Bigtabte, and Cassandra

194 cHArlrEFt =; Database Processing

(2) Does this design eliminate the potential for data integ- rity problems that occur in the spreadsheet? \iVhy or whynot?

(3) Design a database for the data model that uses l4lork- Version2. Speciff key and foreign key columns.

(a) Design a database for the data models that uses Work- Version?. Specify key and foreign key columns.

(5) Is the design with Work-Version2 betler than the de- sign for Work-Version3? Why or why not?

d. Figure 5-30c shows a third alternative data model for the sheet-music-tracking problem. In this data model, use

As you learned in Case Study 1, Amazon.com processed more than 306 order items per second on its peak day of the 2012 holiday sales season. To do that, it processed customer trans- actions on tens of thousands of servers. With that many com- puters, failure is inevitable. Even if the probability of any one server failing is .0001, the likelihood that not one out of 10,000 of them fails is .9999 raised to the 10,000 power, which is about

.37. Thus, for these assumptions the likelihood of at least one failure is 63 percent. For reasons that go beyond the scope of this discussion, the likelihood of failure is actually much greater.

Amazon.com must be able to thrive, even in the presence of such constant failure. O! as Arfiazon.com engineers stated: "Customers should be able to view and add items to their shopping cart even if disks are failing, network routes are flap- ping, o1 data centers are being destroyed byioinadosl'e

The onlyway to deal with such failure is to replicate the data on multiple servers. \{/hen a customer stores a Wish List, for example, that Wish List needs to be stored on different, geo- graphically separated servers. Then, when (notice when, not

fl a server with one copy of the Wish List fails, Amazon.com applications obtain it from another server.

Such data replication solves one problem but introduces another Suppose that the customer's Wish List is stored on servers A, B, and C and server A fails. \Arhile server A is dolrm, server B or C can provide a copy of the Wish List, but if the

either Work_Version2 or Work_Version3, whichever you think is better. (r) Select identifiers for each entity in your data

fustiffyour selection. (2) Summarize the differences befiiveen this data model

and that in Figure 5-30b. \tVhich data model is better? why?

(3) Design a database for this data model. Speci$r key and foreign key columns.

Which of the three data models is the best? fusti$r your

customer changes it, that Wish List can only be rewritten servers B and C. It cannot be written to A, because A is running. When server A comes back into service, it will the old copy of the Wish List. The next day, when the reopens his or her Wish List, two different versions the most recent one on servers B and C and an older one

server A. The customer wants the most current one. How Amazon.com ensure that it will be delivered? Keep in that 15.6 million orders are being shipped while this goes on.

None of the current relational DBMS products was

for problems like this. Consequently, Amazon.com en developed Dlmamo, a specialized data store for reliably pro cessing massive amounts of data on tens of thousands of ers. Dlmamo provides an always-open experience for com's retail cusrtomers; Amazon.com also sells Dy:ramo services to others via its 53 Web Services product offering.

Meanwhile, Google was encountering similar that could not be met by commercially available DBMS products. In response, Google created Bigtable, a store for processing petabltes of data on hundreds of sands of servers.lO Bigable supports a richer data model Dlmamo, which means that it carr store a greater variety of structures.

Both Dynamo and Bigtable are designed to be elastic; term means that the number of servers can dynamically crease and decrease without disrupting performance.

sDeCandia, et al., "Dynamo: Amazon's HighlyAvailable Key-Value Storei' Proceedings of the 2lstACM Slrnposium on Operating Systems Principles, Stevenson, WA, October 2007. loFay Chang, feffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows, Tushar Chandra, AndrewiFikes, and Robert E. GrubeI "Bigtable: A Distdbuted Storage System for Structured Data," OSDI 2006: Seuenth Symposium on Operating System.Design and Implementation, Seattle, WA, last modified November 2O06, http://Iabs.google.com/papers/bigtable.html.

In2007, Facebook encountered similar data storage prob-

lems: Massive amounts of data, the need to be elastically scal-

able, tens of thousands of servers, and high volumes of traffic.

ln response to this need, Facebook began development on Cassandra, a data store that provides storage capabilities like

Dlmamo with a richer data model like Bigtable.ll'l2 Initia[y, Facebook used Cassandra to power its Inbox Search. By 2008,

Facebook realized that it had a bigger project on its hands than

it wanted and gave the source code to the open source com-

munity. As of 2012, Cassandra is used by Faceboolq Twitter, Digg, Reddit, Cisco, and manY others.

Cassandra, by the way, is a fascinating name for a data store.

In Greek mlthology, Cassandra was so beautiful that Apollo

fell in love with her and gave her the power to see the future.

Nas, Apollo's love was unrequited and he cursed her so that no

one would ever believe her predictions' The name was appar-

ently a slam at Oracle.

Cassandra is elastic and fault-tolerang it supports rnas- sive amounts of data on thousands of servers and provides

durabiliry meaning that once data is committed to the data store, it won't be lost, even in the presence of failure. One of

ihe most interesting characteristics of Cassandra is that clients

(meaning the programs that run Facebook, Twitter, etc.) can

select the level of consistency that they need. If a client re- quests that all servers always be current, Cassandra will ensure

that that happens, but performance will be slow. At the other

end of the trade-off spectrum, clients can require no consis-

tency, whereby performance is maximized. In between, clients

can require that a majority of the servers that store a data item

be consistent.

Case Study 5 195

Cassandrals performance is vastly superior to relational DBMS products. In one comparison, Cassandra was found to

be 2,500 times faster than MySQL for write operations and 23

times faster for read operationsl3 on massive amounts of data

on hundreds of thousands of possibly failing computers!

GIUESiTIc,NEi

5-5. Clearly, Dlmamo, Bi5able, and Cassandra are critical tech-

nology to the companies that created them. Why did they

allow their employees to publish academic papers about

them? Why did they not keep them as proprietary secrets?

5-6. What do you think this movement means to the existing

DBMS vendors? How serious is the NoSQL threat? fustiff your answer. What responses by existing DBMS vendors

. would be sensible?

5-7. Is it a waste of your time to learn about the relational model and Microsoft Access? Why or why not?

5-8. Given what you know about AllRoad Parts, should it use a

relational DBMS, such as Oracle Database or MySQL, or

should it use Cassandra?

5-9.' Suppose that AllRoad decides to use a NoSQL solution,

but a battle emerges among the employees in the IT department. One faction wants to use Cassandra, but another faction wants to use a different NoSQL data store,

named MongoDB (www.mongodb.org). Assume that you're Kelly, and Lucas asks for your opinion about how

he should proceed. How do you respond?

lr"Welcome to Apache Cassandrai' The Apache Sbftware Foundation, accessed Iune 201I, httP://cassandra-a17c^\e.orS. p,,fhe

Cu.randra Distributed D atabasel' parleys, accessed luly 16,20L3, http://www.parleys.com/+st=5&id;1866&sl=20. 13"The Cassandra Distributed Databasei' Slide 2 l .