PU NoSQL Database Design

Introduction

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

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

As we learned NoSQL database does not require the use of a predefined structure, except for creating a list of databases and the list of collections. Some of the NoSQL databases (like MongoDB) allow us to define what the structure should be for 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);

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

By creating lists within a single document.

The choice between one or the other 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 is 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, each record is small records, and will unlikely change often, then you can make the entire list to be a single document.

  • For example, if you have a database of  business transactions, and there could be millions of those transactions recorded per minute, creating a new document for each transaction will be a more efficient choice. In contrast, 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 us to use relational database–like relations, by using a document id as a value in another document.
  • You may read more about the best practices of MongoDB design (

    https://www.mongodb.com/blog/post/6-rules-of-thumb-for-mongodb-schema-design

    ).

    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 is defined as a combination of pick-up location, and drop-off locations (if the car has been returned), with the associated timestamps of those events.D

    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.

    Still stressed from student homework?
    Get quality assistance from academic writers!

    Order your essay today and save 25% with the discount code LAVENDER