Book Image

Seven NoSQL Databases in a Week

By : Sudarshan Kadambi, Xun (Brian) Wu
Book Image

Seven NoSQL Databases in a Week

By: Sudarshan Kadambi, Xun (Brian) Wu

Overview of this book

This is the golden age of open source NoSQL databases. With enterprises having to work with large amounts of unstructured data and moving away from expensive monolithic architecture, the adoption of NoSQL databases is rapidly increasing. Being familiar with the popular NoSQL databases and knowing how to use them is a must for budding DBAs and developers. This book introduces you to the different types of NoSQL databases and gets you started with seven of the most popular NoSQL databases used by enterprises today. We start off with a brief overview of what NoSQL databases are, followed by an explanation of why and when to use them. The book then covers the seven most popular databases in each of these categories: MongoDB, Amazon DynamoDB, Redis, HBase, Cassandra, In?uxDB, and Neo4j. The book doesn't go into too much detail about each database but teaches you enough to get started with them. By the end of this book, you will have a thorough understanding of the different NoSQL databases and their functionalities, empowering you to select and use the right database according to your needs.
Table of Contents (16 chapters)
Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
Index

MongoDB data types


Documents in MongoDB are JSON-like objects. JSON is a simple representation of data. It supports the following data types:

  • null: The null data type is used to represent the null value as well as a value that does not exist:
  • boolean: The boolean type is used to represent true and false values:
  • number: In MongoDB, the shell default supports 64-bit floating-point numbers. To process long and integer numbers, MongoDB provides NumberLong and NumberInt, which represent 4 bytes and 8 bytes, respectively.
  • string: The string data type represents the collection of characters. The MongoDB default supports UTF-* character encoding:
  • date: MongoDB stores dates in milliseconds since the epoch. The time zone information is not saved:
  • After inserting a date using the preceding way in the document, when we query using find it returns a document with a date in the following format:

  • array: A set or list of values represents arrays. Also, multiple JSON objects represent an array of elements. The...