Skip to content

Commit 1573aa1

Browse files
committed
Improved instructions on use database
1 parent bdafee2 commit 1573aa1

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/30-simple-queries/0-using-library-database.mdx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Select the library database
44

5-
We'll use the `library` database. To do that, in a MongoDB shell type in:
5+
💻 We'll use the `library` database. To do that, in a MongoDB shell type in:
66

77
```js
88
use library
@@ -14,7 +14,11 @@ You can show all collections with
1414
show collections
1515
```
1616

17-
💻 How would you switch to a database called `orders`?
17+
🦸‍♂️ 💻 How would you switch to a database called `orders`?
18+
19+
:::info
20+
Extra activity, do it if you have extra time or are following at home, won't be covered during the hands-on Lab
21+
:::
1822

1923
<details>
2024
<summary>Answer</summary>
@@ -23,6 +27,14 @@ show collections
2327
```js
2428
use orders
2529
```
30+
31+
Even if this database does not yet exists, MongoDB can change to it. If we create a collection, users, etc. then this DB will get created.
32+
33+
Remember to get back to the library database by using:
34+
35+
```js
36+
use library
37+
```
2638
</div>
2739
</details>
2840

0 commit comments

Comments
 (0)