Fireship · @fireship
MongoDB in 100 Seconds
Uploaded July 14, 2021 · Length 2:27
Summary
mongodb basics: document oriented database for scalable workloads
- mongodb
- document database
- nosql database
- scalability
- database design
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
mongodb is the world's most advanced and
- 0:02
popular document oriented database it
- 0:05
was created in 2007 after the team at
- 0:07
double click a company serving 400,000
- 0:09
ads per second faced issues with
- 0:11
scalability and flexibility using
- 0:13
existing database systems this inspired
- 0:16
them to design a database where all data
- 0:18
is stored in Json like documents which
- 0:20
are organized into collections where
- 0:22
they can be queried unlike a relational
- 0:24
table a predefined schema for a
- 0:26
collection is optional which allows you
- 0:28
to evolve your data structures rapidly
- 0:30
without running complex database
- 0:31
migrations but more importantly it
- 0:33
allows data that's frequently accessed
- 0:35
together by an app to be stored in the
- 0:37
same place this makes read operations
- 0:39
extremely fast because no joins are
- 0:41
required it's like having a fully
- 0:42
assembled car ready to go as opposed to
- 0:45
joining together a bunch of separate
- 0:47
parts and that also makes the database
- 0:48
much easier to scale horizontally via
- 0:51
sharding unlike relational tables
- 0:53
collections are self-contained making
- 0:55
them much easier to work with in a
- 0:56
distributed system that's why they call
- 0:58
it it's designed for humongous
- 1:00
workloads when you create a new document
- 1:02
in mongodb it's assigned an object ID
- 1:05
that's unique to that collection inside
- 1:07
the document you can Define multiple
- 1:09
Fields where the value might be a
- 1:11
variety of different data types like a
- 1:13
string array object and so on now to
- 1:16
work with your data in any programming
- 1:17
language the query API is used to
- 1:19
perform basic read and write operations
- 1:21
as well as complex queries and
- 1:23
Transformations across the database to
- 1:25
optimize performance secondary indexes
- 1:27
can be created to make common queries
- 1:29
extreme extremely fast it also supports
- 1:31
geospatial queries to find all the
- 1:33
documents near a geographic location in
- 1:35
addition to queries you can also create
- 1:37
data aggregation pipelines which can
- 1:39
group documents together and reduce them
- 1:41
to a single result mongodb is free to
- 1:44
use and can be self-hosted but the
- 1:46
quickest way to get started is with the
- 1:47
free tier on Atlas it scales
- 1:49
automatically and provides a UI where
- 1:52
you can interact with your data plus a
- 1:54
ton of other awesome features like
- 1:55
fulltech search that leverages the power
- 1:57
of Apache Lucine in addition they just


