Professional Documents
Culture Documents
html#1
Database Systems
1 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
J Mwaura
2 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
MongoDB
Supports scaling and geospatial indexing
capabilities
3/31
3 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
MongoDB
MongoDB provides High Availability, Scalability and
Partitioning at the cost of Consistency and
Transactional support
4/31
4 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Features of MongoDB
Mongo provide support for secondary indexes,
for users to query using query documents
5/31
5 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
6/31
6 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
JSON
JSON stands for JavaScript Object Notation
7/31
7 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
JSON Structure
8/31
8 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
JSON Structure
JSON documents begin and end with curly braces
9/31
9 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
10/31
10 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
11/31
11 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Capped Collection
MongoDB has a concept of capping the collection -
helps in maintaining its replication logs
12/31
12 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
13/31
13 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
14/31
14 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
>use admin
>db.createUser({user:"josh",pwd:"root",roles:
["root"]})
...
>db.auth("AdminUser", "password")
15/31
15 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
MongoDB Statements
Syntax >use DATABASE_NAME
>use mydb
16/31
16 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
MongoDB Statements
Copy database >db.copyDatabase(fromdb, todb,
fromhost, username, password, mechanism)
Insert document
>db.COLLECTION_NAME.insert(document)
Query >db.COLLECTION_NAME.find(condition)
17/31
17 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
18/31
18 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
CRUD Operations
CRUD
19/31
19 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Aggregation
aggregation
20/31
20 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Data Models
data modeling
21/31
21 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Transactions
transactions
22/31
22 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Indexes
indexes
23/31
23 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Security
security
24/31
24 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Change Streams
streams
25/31
25 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Replication
replications
26/31
26 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Sharding
sharding
27/31
27 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Administration
adminstration
28/31
28 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
Storage
storage
29/31
29 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
End of Course
Database Systems
30 of 31 1/31/2022, 7:39 AM
Database Systems https://omaps.bitbucket.io/tutoria/jkuat/ics2206/ppt-11.html#1
That's it!
Queries about this Lesson, please send them to:
jmwaura.uni@gmail.com
*References*
· Database Systems: Design,
Implementation, and Management,
12th ed. Carlos Coronel & Steven
Morris
· Database Modeling and Design;
Logical Design, 5th ed. Taby
Teorey et.al
· Fundamentals of database
systems, 6th ed. Ramez Elmasri &
Shamkant B. Navathe
“ Courtesy of … ”
31/31
31 of 31 1/31/2022, 7:39 AM