You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With JSON, you can change the structure of the document without having to rebuild schemas.
79
79
For example, you can add a new field to store students' email addresses without migrating existing data to a new schema.
80
80
81
-
In a document database, a student’s record and their course records can look similar to this:
81
+
In a document database, a student's record and their course records can look similar to this:
82
82
83
83
.Student record
84
84
[source, json]
@@ -122,8 +122,8 @@ In a document database, a student’s record and their course records can look s
122
122
}
123
123
----
124
124
125
-
Hilary’s enrollment is stored in the same document as her student details, which means child information is stored with its parent.
126
-
This structure lets you access and retrieve all of Hilary’s details with one search and without the need for complex table joins.
125
+
Hilary's enrollment is stored in the same document as her student details, which means child information is stored with its parent.
126
+
This structure lets you access and retrieve all of Hilary's details with one search and without the need for complex table joins.
127
127
128
128
NOTE: You should not store a student with their course record as it can lead to data duplication and make it difficult to maintain your data.
129
129
For example, you would need to access every single student record in your cluster to change the `credit-points`.
@@ -207,7 +207,7 @@ To create the second collection, follow the above steps but use the existing `st
207
207
208
208
The two collections allow you to use the relational model and the document model at the same time to achieve the best design and performance possible.
209
209
210
-
The `student-record-collection` contains student records, and each student record contains a list of that student’s enrollments.
210
+
The `student-record-collection` contains student records, and each student record contains a list of that student's enrollments.
211
211
Unlike the standard relational model decomposition where a link table is created between students and courses, a document model stores the enrollments as part of the student records.
212
212
213
213
The `course-record-collection`, on the other hand, uses the relational model to link the enrollment records to the course records they apply to.
@@ -395,7 +395,7 @@ If the connection is successful, the collection name outputs in the console log.
395
395
+
396
396
image::student-record-collection-console-output.png[alt="Console showing successful connection to server"]
397
397
398
-
If you come across errors in your console, see the <<#roubleshooting,troubleshooting section>>.
398
+
If you come across errors in your console, see the <<#troubleshooting,troubleshooting section>>.
0 commit comments