Question: (U7DA) Introduction The database design process for noSQL databases is different from one for relational (SQL) databases. As we learned noSQL database does not require

(U7DA)

Introduction

The database design process for noSQL databases is different from one for relational (SQL) databases.

As we learned noSQL database does not require to have a predefined structure, except of creating a list of databases and the list of collections. Some of the noSQL databases (like MongoDB) allow to define certain rules that will define what should be the structure of the acceptable documents for each collection.

As you may recall, when you need to store multiple data points in a relational database you use multiple records (rows) where each record and then values to describe properties of that record will be placed in the columns. Unlike relational databases, noSQL databases allow two ways of storing multiple values (lists):

By creating multiple documents (one per record);

By creating lists within a single document.

The choice between one or another is based on the potential size of the list, size of the records, and the most common operations the database will need to process. The rule of thumb will be if the list changes regularly and each item in the list or complex (an object itself), not very well connected to the other items, or the list is very long, then use one document per record approach. Note, that the size of the document may also be limited (e.g. 15MB for a MongoDB document).

If the list is small, it has with small records, and unlikely change often, then you can make it as a part of one document.

For example, if you have a database of the business transactions, and there could be millions of those transactions recorded per minute, create a new document for each of them with me more efficient choice. In contrary, when you store information about degrees that an employee earned, which will be updated rarely, all degrees can be combined into a list in one employee profile document.

MongoDB also allows to use relational database like relations, by using a document id as a value in another document.

Business Case

A car-sharing company decided to use a MongoDB noSQL database to store information about their primary operations, which include recording of all rides, real time car locations, and users. A ride defined as combination of pick-up location, drop-off locations (if the car has been returned), with the associated timestamps of the those events.

Directions

In this assignment, you will propose a database structure for the given business case. It should include the list of collections, and one sample document (in JSON format) for each collection to demonstrate the document structure.

Put the list of the collections with the comments on their role along with the sample documents in JSON format.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!