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
Copy file name to clipboardExpand all lines: README.md
+1-63Lines changed: 1 addition & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -506,17 +506,6 @@ MongoDB stores BSON (Binary Interchange and Structure Object Notation) objects i
506
506
<b><a href="#">↥ back to top</a></b>
507
507
</div>
508
508
509
-
## Q. ***Mention the command to insert a document in a database called school and collection called persons?***
510
-
511
-
```js
512
-
use school;
513
-
db.persons.insert( { name:"Alex", age:"28" } )
514
-
```
515
-
516
-
<div align="right">
517
-
<b><a href="#">↥ back to top</a></b>
518
-
</div>
519
-
520
509
## Q. ***What is Replication in Mongodb?***
521
510
522
511
Replication exists primarily to offer data redundancy and high availability. It maintain the durability of data by keeping multiple copies or replicas of that data on physically isolated servers. Replication allows to increase data availability by creating multiple copies of data across servers. This is especially useful if a server crashes or hardware failure.
@@ -1184,65 +1173,14 @@ As cursor is not isolated during its lifetime, thus intervening write operations
1184
1173
<b><a href="#">↥ back to top</a></b>
1185
1174
</div>
1186
1175
1187
-
#### Q. ***At what interval does MongoDB write updates to the disk?***
1176
+
## Q. ***At what interval does MongoDB write updates to the disk?***
1188
1177
1189
1178
By default configuration, MongoDB writes updates to the disk every 60 seconds. However, this is configurable with the `commitIntervalMs` and `syncPeriodSecs` options.
1190
1179
1191
1180
<div align="right">
1192
1181
<b><a href="#">↥ back to top</a></b>
1193
1182
</div>
1194
1183
1195
-
## Q. ***Mention the command to remove indexes and list all the indexes on a particular collection?***
1196
-
1197
-
**List all Indexes on a Collection**
1198
-
1199
-
```js
1200
-
// To view all indexes on the people collection
1201
-
1202
-
db.people.getIndexes()
1203
-
```
1204
-
1205
-
**List all Indexes for a Database**
1206
-
1207
-
```js
1208
-
// To list all the collection indexes in a database
0 commit comments