Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
MongoDB Fundamentals

You're reading from  MongoDB Fundamentals

Product type Book
Published in Dec 2020
Publisher Packt
ISBN-13 9781839210648
Pages 748 pages
Edition 1st Edition
Languages
Concepts
Authors (4):
Amit Phaltankar Amit Phaltankar
Profile icon Amit Phaltankar
Juned Ahsan Juned Ahsan
Profile icon Juned Ahsan
Michael Harrison Michael Harrison
Profile icon Michael Harrison
Liviu Nedov Liviu Nedov
Profile icon Liviu Nedov
View More author details

Table of Contents (15) Chapters

Preface
1. Introduction to MongoDB 2. Documents and Data Types 3. Servers and Clients 4. Querying Documents 5. Inserting, Updating, and Deleting Documents 6. Updating with Aggregation Pipelines and Arrays 7. Data Aggregation 8. Coding JavaScript in MongoDB 9. Performance 10. Replication 11. Backup and Restore in MongoDB 12. Data Visualization 13. MongoDB Case Study Appendix

Database Design

As per the requirements described in the previous sections, the three basic entities to be persisted are user, vehicle, and ride. The user and vehicle entities will store the attributes of users and vehicles respectively, while the ride entity will be created whenever a new ride is commenced.

Apart from the basic entities, an additional entity is needed to track the bike ride logs. For each active ride, the system captures and logs the bike's location. The logs will be used for reporting and analytics purposes.

Because of the document-based dataset offered by MongoDB, all the entities can easily be designed as collections. These collections and some of their sample records will be explored in the next sections.

Users

The users collection holds data for all who have registered in the system. The following code snippet shows a sample document that represents one of the registered users:

{
    "_id" : "a6e36e30-41fa...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}