Database Final

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Name three common features of key-value databases.

Simplicity. Speed. Scalability.

Describe four characteristics of a well-designed key-naming convention.

* unambiguous naming components * range-based components when you would like to retrieve a range of values. * common delimiter when appending components to make a key (such as ":") * Keep keys as short as possible

What is a keyspace? What is an analogous data structure in a database?

A keyspace is a top-level data structure in a column family database. It is top level in the sense that all other structures you would create as a database designer are contained within a keyspace. A keyspace is analogous to a schema in a relational database.

In which of the following use cases would a Column Family database be more well suited than a Relational database?

A social media application that anticipates having heavy traffic and will need many database servers to support read/write load

When would you use a column family database instead of another type of NoSQL database?

Column family databases are appropriate choices for large-scale database deployments that require high levels of write performance, a large number of servers, or multi-data center availability. Column family databases are also appropriate when large numbers of servers are required to meet expected workloads.

Why are cycles a potential problem when performing graph operations?

Cycles can lead to traversing the same vertices repeatedly. Keeping track of visited vertices is one way to avoid problems with cycles.

Both D1 and D2 are good options for those who want to be able to easily query their data without too much extra effort in their application code. D2 is able to handle less structured data while D1 is more strict about what can be added. D1 and D2 are likely:

D1:Relational Databases, D2 Document Databases

How can you avoid performing joins in column family databases?

Denormalization is used to avoid joins.

Name at least three core features of Google Big Table.

Developers maintain dynamic control over columns. Data values are indexed by row identifier, column name, and a time stamp. Data modelers and developers have control over location of data. Reads and writes of a row are atomic. Rows are maintained in a sorted order.

You are designing a database that needs to store information about contracts that people have signed with the company. These contracts have many common attributes, but the majority of their contents can be unpredictable. Which type of database should you use in this circumstance?

Document Database

Why are document databases considered schemaless?

Document databases do not require data modelers to formally specify the structure of documents.

Which of the following is not an advantage of a document database versus a graph database?

Faster queries by avoiding joins

A local small business with only one branch needs a database that contains information on the relationships between its employees. What type of database would best apply?

Graph

Your friend has a great idea for an app ("It's like Facebook, but for bird watchers!"). Naturally, he wants you to handle building the entire system, including the database. Given the following constraints, would you use a key-value database or a graph database?

Graph Database

Why are highly abstract entities often avoided when modeling document collections?

Highly abstract entities can lead to document collections with many subtypes. These subtypes will need type indicators to support the frequent filtering required when different document types are in the same collection. Large collections can lead to inefficient retrieval operations.

How do graph databases avoid joins?

In a graph database, instead of performing joins, you follow edges from vertex to vertex.

Describe one way to handle a collision so that no data is lost.

Instead of just storing one value, a hash table can store lists of values.

Name two types of formats for storing data in a document database.

JSON and XML.

Which database is well suited to applications that have small reads and writes as well as simple data models?

Key-Value

Describe how to model a many-to-many relationship.

Many-to-many relationships are modeled using two collections - one for each type of entity. Each collection maintains a list of identifiers that act as reference

A bank needs to build a database to store sensitive information about its clients. This system needs to provide secure and error-free transactions but does not care for data integrity nor consistency. What type of database should be used?

Relational

Why is scalability such an important consideration when working with graphs?

Scalability in graph databases must address growth in Vertices and edges Number of users Number and size of properties on vertices and edges

Which of the following is not an advantage of using a document-based NoSQL database over a relational database model?

Strict object model

What are the advantages of having a large number of replicas? What are the disadvantages?

The more replicas you have, the less likely you will lose data; however, you might have lower performance with a large number of replicas.

What is the difference between order and size?

The order of a graph is the number of vertices in the graph. The size of the number of edges in a graph.

What are the two components of a graph?

Vertices and edges.

Why are hash functions used with key-value databases?

* Hash functions distribute inputs evenly * evenly distributed * each partition will receive approximately the same amount of data.

Which of these two databases is preferred for use with applications that are geographically distributed over multiple data centers and have the potential for huge amounts of data?

Column family databases

How do columns in column family databases differ from columns in relational databases?

Columns in column families are dynamic. Columns in a relational database table are not as dynamic as in column family databases. Adding a column in a relational database requires changing its schema definition. Adding a column in a column family database just requires making a reference to it from a client application, for example, inserting a value to a column name.

What are the advantages of denormalization?

Denormalization can improve query performance over more normalized models.


Kaugnay na mga set ng pag-aaral

The Quadratic Formula Instruction & Assignment (EDGE 100%)

View Set

Why Does Management Matter? Management - Functions of Management - Kind of Managers - Managerial Roles - What Companies Look for in Managers - mistakes managers make - The Transition to Management - Competitive Advantage Through People

View Set

TX Govt. Chapter 6 notes for quiz

View Set

MedSurg 1 NU Test 3 ATI CH72 Osteoarthritis and Low-Back Pain

View Set

BJU US History 4th Edition Chapter 11

View Set

Marketing Management Connect assignment: chapter 1

View Set

Raisin in the Sun- Act II Scene One

View Set

8.5 Annuities, Methods of Saving, and Investments

View Set