WDF Unit 3 QB & Study Material
WDF Unit 3 QB & Study Material
2 marks
1, what are the key Characteristics of NOSQL databases?
The key characteristics of NOSQL databases are as a follows:
• Schema-less structure
• Horizontal Scalability
• High performance Scalability
• Flexible Data Models
• Distributed and Decentralized Architecture
• Big Data and Unstructured Data Support
• Developer Productivity
2, How does MongoDB fit in to the NOSQL paradigm?
Following are the key features how MongoDB fit into NOSQL are
• Document Oriented Data Model
• Dynamic Schema
• Horizontal Scalability
• High Performance and Availability
• Flexible Queries
• Integration with modern Technologies
• Wide Range of use cases
3, How do you set up a MongoDB environment for development, and what are the essential steps
involved?
• Install MongoDB
• Start MongoDB
• Connect to MongoDB
• Create a Database
• Create collections and Documents
• Perform CRUD operations
4, List out the method used for CRUD Operations?
Method Description
db.collectionName.insertOne(document) Insert a single document into a collection
db.collectionName.find() Retrive all documents from a collection
db.collectionName.updateOne(filter,update) Update a single document in a collection
db.collectionName.deleteOne(filter) Delete a single document from a collection
• Mongo DB Supports authentication mechanism to verify the identity of users attempting to access
the database
• The most commonly used authentication mechanism is SCRAM salted challenge response
authentication mechanism which is a secure and password based authentication mechanism.
• Additionally mango DP supports authentication like kerberos,x.509 certificate ldap and more
allowing integration with external authentication systems.
7. Explain about Access control in MongoDB.
• Access control in mango DB is managed using roles and privileges
• Their role is a set of privileges that define the actions are user can perform within a database or on
specific resource example collections.
• Mango DB provide several built in roles such as read, readwrite, DB admin, user admin, and more,
each with different levels of access.
• Custom roles can also be created to defines specific set of privileges tailed to the application
requirement.
8. List some of the best security practices in mango DB
• Enabling access control to require authentication for all connections
• Using strong and unique passwords for user accounts
• Limiting user privileges to the minimum required for their task
• Regularly monitoring and reviewing user access and privileges
• Enabling network encryption using SSL/TLS two Secure data in transit
9. What are the key responsibilities and task involved in administrative mango db database?
13. What are the recommended libraries or drivers to connection between Node.js and MongoDB?
• MongoDB Node.js Driver (Official Driver)
• Mongoose
• MongoDB Atlas
• Monk
• MongoDB Memory Server
• These libraries/drivers offer different levels of abstraction and functionality, so the choice depends
on your specific needs and preferences.
• The official MongoDB Node.js Driver is the most comprehensive and flexible choice, while
Mongoose provides additional features for data modeling.
• Monk and MongoDB Memory Server are lighter options if you prefer a simpler and more
lightweight approach.
14. What are the security considerations and best practices for ensuring the integrity and confidentiality of
data stored in MongoDB?
Some security considerations and best practices to follow when working with MongoDB:
• Authentication and Authorization
• Network Security
• Encryption at Rest
• Auditing and Logging
• Secure Configuration
• Regular Patching and Updates
• Secure Development Practices
• Regular Security Assessments and Penetration Testing
• User Education and Awareness
• Compliance and Regulations
15. How does MongoDB handle scalability and high availability in distributed environments
MongoDB provides several features and mechanisms to handle scalability and high availability in
distributed environments. Here are some key features MongoDB offers
• Sharding
• Replica Sets
• Automatic Failover
• Read Preference and Read Concern
• Distributed Transactions
• Zone Sharding
• MongoDB Atlas and Cloud-Based Deployments
• Ops Manager and Monitoring
MongoDB Ops Manager is a management platform that provides monitoring, automation, and backup
capabilities for MongoDB deployments.
Ops Manager helps monitor the health and performance of your distributed MongoDB environment,
allowing you to proactively address issues and ensure high availability.
By leveraging these features and capabilities, MongoDB enables scalability and high availability in
distributed environments. Whether through sharding to distribute data across multiple nodes, replica sets
for fault tolerance and failover, or distributed transactions for maintaining data integrity, MongoDB
provides robust tools for building scalable and highly available systems.
19. Write about creating the Administrator User for all database.
✓ Creating a User Administrator account is done by executing following two commands in MongoDB shell to
access the admin database and then add a user with userAdminAnyDatabase rights.
• S y n t a x:
use admin
db.createUser(
{ user: `"',
pwd: `"',
roles: { "userAdminAnyDatabase"]
})
use admin
db.create user(
{ user: "sriram'',
pwd: "sriram",
roles: [ "userAdminAnyDatabase”l
} )
• Deleting Databases
use newDB
db. dropDatabase( )
• Copying Databases
• Copying a database creates an exact duplicate of database, only with a different name.
copyDatabase(origin, destination, [hostname j)
• The optional hostname parameter specifies a hostname of origin database
MongoDB server if you are copying a database from a different host.
Where
3) out: It will specify the collection name where the result will be stored.