File tree Expand file tree Collapse file tree 3 files changed +497
-0
lines changed Expand file tree Collapse file tree 3 files changed +497
-0
lines changed Original file line number Diff line number Diff line change
1
+ ============================
2
+ Dynamic Schema (Schema Free)
3
+ ============================
4
+
5
+ .. default-domain:: mongodb
6
+
7
+ MongoDB has :term:`databases <database>`, :term:`collections
8
+ <collection>`, and :term:`indexes <index>` much like a traditional
9
+ RDBMS. In some cases (databases and collections), these can be
10
+ implicitly created. Once created, they exist in a system catalog
11
+ (for example, ``db.systems.collections``, ``db.system.indexes``).
12
+
13
+ Collections contain :term:`BSON` :term:`documents <document>`. Within
14
+ these documents are fields. In MongoDB there is no predefinition of
15
+ fields (what would be columns in an RDBMS). There is no schema for
16
+ fields within documents. The fields and their value datatypes can vary.
17
+ Thus there is no notion of an "alter table" operation that adds a
18
+ "column".
19
+
20
+ In practice, it is highly common for a collection to have a homogenous
21
+ structure across documents. Hoowever this is not a requirement. This
22
+ flexibility means that schema migration and augmentation are very easy
23
+ in practice. Rarely will you need to write scripts that perform "alter
24
+ table" type operations. In addition to making schema migration flexible,
25
+ this facility makes iterative software development atop the database
26
+ easier.
27
+
You can’t perform that action at this time.
0 commit comments