Free practice · No sign-up required

Associate Database Administrator Exam free practice test

15 questions with answer explanations. Choose an answer below to begin.

Question 1 of 15

What is a primary function of a database administrator?

Show hint

Understand core DBA responsibilities

0/15 answered · Bookmark questions to review later. Focus the practice area to use keys 1–9 and Enter.

Learn by doing

Put your answers into practice

Use official documentation and hands-on labs to work through topics you missed.

Explore all study resources →

All questions and explanations

Prefer to read at your own pace? Work through each question below, then open its answer to check your reasoning. You can link directly to a question or print this reference.

  1. What is a primary function of a database administrator?

    1. Ensuring data integrity and availability

    2. Writing application user interfaces

    3. Designing marketing strategies

    4. Managing network hardware

    Show answer and explanation

    Correct answer

    • Ensuring data integrity and availability

    Database administrators focus on the reliability, integrity, and availability of data stores. The other roles belong to application developers, marketers, or network engineers.

  2. Which data model does MongoDB use by default?

    1. Document

    2. Key-value

    3. Graph

    4. Column-family

    Show answer and explanation

    Correct answer

    • Document

    MongoDB stores data in flexible, JSON-like documents within collections. This document model allows for nested structures and dynamic schemas.

  3. What does a replica set provide in MongoDB?

    1. High availability and redundancy

    2. Data compression

    3. Query optimization

    4. Schema enforcement

    Show answer and explanation

    Correct answer

    • High availability and redundancy

    A replica set maintains multiple copies of data across servers to ensure availability during outages and to enable failover. It does not inherently compress data or enforce schemas.

  4. Which operation is typically used to add a single document to a collection?

    1. insertOne

    2. addOne

    3. push

    4. append

    Show answer and explanation

    Correct answer

    • insertOne

    In MongoDB, insertOne is the standard method to add one document to a collection. The other options are not native MongoDB operations for this purpose.

  5. What is a common use case for indexing in a database?

    1. Speeding up query performance

    2. Reducing storage size

    3. Encrypting sensitive fields

    4. Enforcing user permissions

    Show answer and explanation

    Correct answer

    • Speeding up query performance

    Indexes improve query efficiency by allowing the database to locate documents without scanning every record. They do not reduce storage size or handle encryption directly.

  6. Which statement about MongoDB schemas is true?

    1. Documents in a collection can have different structures

    2. All documents must have identical fields

    3. Schema changes require downtime

    4. Schema validation is disabled by default

    Show answer and explanation

    Correct answer

    • Documents in a collection can have different structures

    MongoDB is schema-flexible, so documents in the same collection can vary in field names and types. Schema validation can be enabled but is not required.

  7. What is the purpose of a connection string in MongoDB?

    1. To specify how to reach the database server

    2. To define document structures

    3. To store query results

    4. To manage user roles

    Show answer and explanation

    Correct answer

    • To specify how to reach the database server

    A connection string contains network and authentication details so clients can locate and connect to a MongoDB deployment. It does not define schemas or store results.

  8. Which tool is commonly used to interact with MongoDB from the command line?

    1. mongosh

    2. sqlplus

    3. redis-cli

    4. psql

    Show answer and explanation

    Correct answer

    • mongosh

    mongosh is the MongoDB Shell for running commands and queries. The other tools belong to different database systems.

  9. What does the MongoDB deployment process typically involve?

    1. Installing software and configuring replica sets

    2. Compiling application code

    3. Designing user interfaces

    4. Generating reports

    Show answer and explanation

    Correct answer

    • Installing software and configuring replica sets

    Deployment includes installing MongoDB software, setting up replica sets for redundancy, and configuring network access. It does not involve compiling application code or UI design.

  10. Question 10

    Link to question

    Which data format is natively supported by MongoDB for storage?

    1. BSON

    2. CSV

    3. XML

    4. YAML

    Show answer and explanation

    Correct answer

    • BSON

    MongoDB uses BSON (Binary JSON) to store documents, which supports additional data types beyond JSON. While CSV, XML, and YAML can be imported, they are not the native storage format.

  11. Question 11

    Link to question

    What is a common method to ensure data durability in MongoDB?

    1. Writing to the journal

    2. Using read preferences

    3. Increasing document size

    4. Disabling indexes

    Show answer and explanation

    Correct answer

    • Using read preferences

    Data durability is achieved by writing operations to the journal before confirming writes. Read preferences control where reads occur, and they do not guarantee durability by themselves.

  12. Question 12

    Link to question

    Which practice helps maintain database performance over time?

    1. Regular monitoring and maintenance

    2. Storing all data in a single document

    3. Avoiding backups

    4. Disabling authentication

    Show answer and explanation

    Correct answer

    • Regular monitoring and maintenance

    Ongoing monitoring, index management, and backups help sustain performance and reliability. The other options introduce security or data integrity risks.

  13. Question 13

    Link to question

    What is a shard in a MongoDB cluster?

    1. A partition of data across servers

    2. A type of index

    3. A user role

    4. A backup file

    Show answer and explanation

    Correct answer

    • A partition of data across servers

    Sharding distributes data across multiple servers to support scalability. It is not an index type, user role, or backup artifact.

  14. Question 14

    Link to question

    Which MongoDB feature supports automatic failover?

    1. Replica sets

    2. Collections

    3. Views

    4. Aggregations

    Show answer and explanation

    Correct answer

    • Replica sets

    Replica sets enable automatic failover by promoting a secondary node to primary if the current primary becomes unavailable. Collections, views, and aggregations do not provide failover.

  15. Question 15

    Link to question

    What is a best practice for managing MongoDB users?

    1. Grant least privilege access

    2. Use the same user for all applications

    3. Disable authentication in production

    4. Share admin credentials widely

    Show answer and explanation

    Correct answer

    • Grant least privilege access

    Applying the principle of least privilege minimizes security risks. Sharing credentials or disabling authentication exposes the database to unauthorized access.

Read all flashcards

Recall the answer before opening each card.

What is a primary function of a database administrator?

Ensuring data integrity and availability. DBAs focus on reliability, integrity, and availability of data stores, not application development or networking.

Which data model does MongoDB use by default?

MongoDB uses the document model, storing data in flexible, JSON-like documents within collections.

What does a replica set provide in MongoDB?

High availability and redundancy by maintaining multiple copies of data across servers, enabling automatic failover.

Which operation adds a single document to a collection?

insertOne is the standard method to add one document. Other operations like insertMany are for multiple documents.

What is a common use case for indexing?

Speeding up query performance by allowing the database to locate documents without scanning every record.

Is schema validation required in MongoDB collections?

No, MongoDB is schema-flexible; documents in a collection can have different structures. Schema validation is optional but can be enabled.

What is the purpose of a connection string?

To specify how to reach the database server, including network addresses and authentication details for client connectivity.

Which tool is used to interact with MongoDB from the command line?

mongosh, the MongoDB Shell, for running commands and queries. Other tools like mongo are older versions.

What does the MongoDB deployment process typically involve?

Installing MongoDB software, configuring replica sets for redundancy, and setting up network access. Application code compilation is not part of deployment.

What is the native data format for MongoDB storage?

BSON (Binary JSON), which supports additional data types beyond JSON, such as Date and Binary.

How does MongoDB ensure data durability?

By writing operations to a journal before acknowledging writes, governed by write concern settings. Read preferences do not provide durability.

What practice helps maintain database performance over time?

Regular monitoring and maintenance, including index management, slow query analysis, and backups, to sustain performance and reliability.

What is a shard in a MongoDB cluster?

A partition of data across servers, used to distribute load for horizontal scaling. It is not an index, user role, or backup artifact.

Which MongoDB feature supports automatic failover?

Replica sets enable automatic failover by promoting a secondary node to primary if the current primary fails.

What is a best practice for managing MongoDB users?

Grant least privilege access to minimize security risks. Avoid sharing credentials or disabling authentication.

How does write concern affect data durability?

Write concern specifies the level of acknowledgment required for a write, such as waiting for the primary alone or a majority of replica set members, ensuring data persistence.

What happens during automatic failover in a replica set?

If the primary becomes unavailable, the replica set holds an election and promotes a secondary to become the new primary, ensuring continued availability.

What is the role of the mongosh shell?

mongosh is the interactive JavaScript shell for MongoDB, used for administrative tasks, querying, and script execution.

Why is index management important for DBAs?

Proper indexing improves query performance and reduces resource consumption. DBAs must monitor index usage and remove unused indexes to optimize storage and write speed.

What is the impact of schema flexibility on application development?

Schema flexibility allows developers to change document structures without migration, but DBAs should enforce consistency through application logic or optional validation to prevent data irregularities.

Active recall deck

Practice Associate Database Administrator Exam with real flashcards

Read the prompt, commit to an answer, then flip the card. Move through the deck at your own pace and repeat any topic that does not come back quickly.

20 free cards

Card 1 of 20

1 reviewed this session

Connect the concepts

Your Associate Database Administrator Exam study mind map

Open a branch to connect a topic with its practice questions and explanations. Use the map to choose your next review topic.

Exam-focused analysis

What this Associate Database Administrator Exam practice set measures

This is an analysis of the practice bank, not a claim about the vendor's live exam blueprint. Use it to identify the knowledge, judgment, and recall patterns exercised here, then verify your coverage against the current official exam guide.

Foundational DBA Responsibilities and MongoDB Data Model

This section consolidates the core responsibilities of a database administrator—ensuring data integrity and availability—with MongoDB's underlying data model. The document model is the default, storing data in flexible, JSON-like documents within collections. MongoDB supports schema flexibility, meaning documents in the same collection can have varying fields and structures, though schema validation can be enforced when needed. The native storage format is BSON, a binary representation of JSON-like documents that supports additional data types. These fundamentals shape how a DBA designs databases, plans for data consistency, and leverages MongoDB's dynamic schema capabilities.

  • A primary DBA function is maintaining data integrity and availability.
  • MongoDB uses a document model by default, storing data in flexible, JSON-like documents.
  • Collections can contain documents with different structures, offering schema flexibility.
  • BSON is the native binary storage format, enabling efficient encoding of extended data types.

High Availability, Replication, and Scalability

Replica sets are central to MongoDB's high-availability architecture. A replica set consists of multiple servers maintaining copies of the same data; it provides automatic failover by promoting a secondary node to primary if the current primary fails. This ensures continuous availability during outages. For scalability, sharding partitions data across multiple servers, distributing read and write loads. Deployment typically involves installing MongoDB software and configuring replica sets. Understanding these mechanisms is critical for a DBA tasked with designing resilient, scalable systems that handle growth and unexpected failures.

  • Replica sets provide high availability and redundancy by maintaining data copies.
  • Automatic failover is enabled by replica set election mechanisms.
  • Sharding is a method for partitioning data across servers to support horizontal scaling.
  • Deployment commonly includes installing software and setting up replica sets for redundancy.

Operational Best Practices and Performance Optimization

Performing write operations like insertOne to add documents is a basic DBA task. Indexes are essential for speeding up query performance by enabling efficient data retrieval without full collection scans. The mongosh shell is the primary command-line interface for administrative tasks and queries. Regular monitoring and maintenance—such as reviewing slow queries, optimizing indexes, and checking system resources—help sustain database performance over time. DBAs must be proficient with these operational practices to keep MongoDB deployments running smoothly and efficiently.

  • Use insertOne to add a single document to a collection.
  • Indexes significantly improve query performance by reducing search scope.
  • mongosh is the standard command-line tool for interacting with MongoDB.
  • Ongoing monitoring and index management are key to maintaining performance.

Security, Connectivity, and Durability

Connection strings specify how to reach a MongoDB deployment, including network addresses and authentication credentials. For data durability, MongoDB writes operations to a journal before confirming writes, governed by write concern settings. Read preferences, by themselves, do not guarantee durability; proper write concern and journaling are required. Security best practices include granting least privilege access to users—only the permissions necessary for their role—and avoiding shared credentials or disabled authentication. These measures protect the database from unauthorized access and data loss.

  • Connection strings encode network and authentication details for client connectivity.
  • Data durability is achieved through journaling and appropriate write concern, not read preferences alone.
  • Least privilege access is a core security principle for managing MongoDB users.
  • Avoid disabling authentication or sharing credentials to minimize security risks.

Study workflow

Turn one Associate Database Administrator Exam attempt into a study plan

  1. 1

    Install and Configure a Local MongoDB Instance

    Download the MongoDB Community Server from the official website. Follow the installation instructions for your operating system. Start the mongod process, then connect using mongosh. Verify the instance is running by executing a simple command like 'db.version()'. This hands-on setup gives you direct experience with deployment, connection strings, and the shell.

  2. 2

    Create and Test a Three-Node Replica Set

    Launch three mongod instances on different ports, each with a unique replica set name. Initialize the replica set using rs.initiate() in mongosh. Add the secondary members with rs.add(). Verify replication by inserting documents on the primary and checking the secondaries. Simulate a primary failure by stopping the primary process and observe automatic failover.

  3. 3

    Practice Index Creation and Query Profiling

    Create a collection with sample data. Use 'explain()' to analyze queries without indexes, then create indexes with createIndex(). Compare the execution time and number of documents scanned. Use the profiler by setting 'db.setProfilingLevel(1)' to capture slow operations. This exercise demonstrates how indexes drastically improve query performance.

  4. 4

    Implement User Authentication and Role Management

    Enable authentication by setting security.authorization to 'enabled' in the mongod configuration. Restart the instance. Create an admin user using db.createUser() with root privileges. Then create application users with limited roles (e.g., readWrite). Practice connecting with those users via connection strings to enforce least privilege.

  5. 5

    Configure Write Concern and Test Durability

    Start a replica set. Insert documents with different write concern options (e.g., {w:1, j:true}, {w:'majority'}). Simulate a crash by killing the primary before the write is acknowledged. Observe whether the write survives failover. This demonstrates how write concern and journaling ensure data durability.

FAQ

Questions about this exam practice page

Clear boundaries on what the bank covers, how to use it, and where official vendor information still matters.

What is the difference between a replica set and a sharded cluster in MongoDB?+

A replica set provides high availability by maintaining identical copies of data on multiple servers, with automatic failover. A sharded cluster distributes different subsets of data (shards) across servers for horizontal scalability. Sharded clusters typically use replica sets for each shard to ensure redundancy within each data partition.

How does MongoDB ensure data durability?+

MongoDB ensures durability by writing operations to a journal before acknowledging the write. The write concern setting controls the level of acknowledgment required, such as waiting for the primary alone or a majority of replica set members. Enabling journaling (j: true) guarantees that the write is persisted even if the server crashes.

Why is schema flexibility important for MongoDB DBAs?+

Schema flexibility allows MongoDB to store documents with varying fields in the same collection, making it easier to evolve the data model without downtime or migrations. For a DBA, this means less upfront schema design, but it also requires careful planning to ensure data consistency through application logic or optional schema validation.

What is the purpose of a connection string in MongoDB?+

A connection string specifies the hostnames, ports, and authentication credentials needed for a client to connect to a MongoDB deployment. It may also include replica set names and read/write preferences. The DBA provides connection strings to application developers, ensuring secure and reliable access to the database.

What are best practices for managing MongoDB user access?+

Apply the principle of least privilege: grant each user only the roles required for their tasks. Avoid using the root role for routine operations. Use role-based access control (RBAC) to assign predefined or custom roles. Regularly review user privileges and rotate credentials. Never disable authentication in production environments.

Keep studying

Build the next review session

Browse another free bank or use the study strategy guide to turn your misses into spaced review.