Professional Cloud Database Engineer Free Practice Questions — Page 4
Question 31
You are planning to migrate a 10 TB relational database from an on-premises environment to Cloud SQL for PostgreSQL. The database contains sensitive customer information. You want to follow Google-recommended practices to keep data secure during the migration. What should you do? (Choose two.)
A. Configure Cloud SQL for automatic patching, and enable binary logging.
B. Establish a Private Service Connect connection between your on-premises environment and the Cloud SQL instance.
C. Use an external IP address for the Cloud SQL instance, and configure firewall rules.
D. Set up Identity and Access Management (IAM) roles to restrict access with Cloud SQL with an internal IP address.
E. Leverage Storage Transfer Service with client-side encryption.
Show Answer
Correct Answer: B, D
Explanation: To securely migrate sensitive data to Cloud SQL, Google recommends keeping traffic off the public internet and enforcing least-privilege access. Using Private Service Connect provides private, internal connectivity from on‑premises to Cloud SQL without exposing a public IP. Configuring Cloud SQL with an internal IP and restricting access via IAM roles ensures only authorized identities can manage and connect to the database, reducing attack surface during migration.
Question 32
You are deploying a Cloud SQL for MySQL database to serve a non-critical application. The database size is 10 GB and will be updated every night with data stored in a Cloud Storage bucket. The database serves read-only traffic from the application during the day. The data locality requirement of this application mandates that data must reside in a single region. You want to minimize the cost of running this database while maintaining an RTO of 1 day. What should you do?
A. Create a Cloud SQL for MySQL instance with high availability (HA) enabled. Configure automated backups of the Cloud SQL instance, and use the default backup location.
B. Create a Cloud SQL for MySQL instance with high availability (HA) disabled. Create a read replica in the same zone.
C. Create a Cloud SQL for MySQL instance with high availability (HA) disabled. Create a read replica in a second region.
D. Create a Cloud SQL for MySQL instance with high availability (HA) disabled. Configure automated backups of the Cloud SQL instance, and use a custom backup location to store backups in a Cloud Storage bucket in the same region.
Show Answer
Correct Answer: D
Explanation: The application is non-critical, has a relaxed RTO of 1 day, and must keep data in a single region while minimizing cost. High availability and read replicas add unnecessary cost. Automated backups are sufficient to meet a 1-day RTO, and using a custom backup location in the same region satisfies the data locality requirement. Therefore, a single Cloud SQL instance without HA, with automated backups stored in-region, is the most cost-effective solution.
Question 33
Your rapidly growing ecommerce company is migrating their analytics workloads to AlloyDB for PostgreSQL. You anticipate a significant increase in reporting queries as the business scales. You need a read pool strategy to scale your analytics operations in anticipation of future growth while minimizing costs. What should you do?
A. Direct all complex, long-running analytics queries to the primary instance, and only use read pools for short, frequent reports.
B. Change the instance sizes of the read nodes in the read pool.
C. Begin with minimal read pools and iteratively expand or shrink them based on real-time load monitoring to optimize resource allocation.
D. Assign all reporting queries to a single, large read pool to maximize the combined compute resources available for analytics.
Show Answer
Correct Answer: C
Explanation: Starting with a minimal read pool and scaling it up or down based on observed workload allows AlloyDB analytics to grow with demand while avoiding unnecessary cost. Read pools are designed for horizontal scaling, and monitoring-driven adjustments balance performance and cost better than overprovisioning or misusing the primary instance.
Question 34
Your company is launching a new globally distributed application with strict requirements for low latency, strong consistency, zero downtime, and high availability (HA). You need to configure a scalable database solution to support anticipated rapid growth and optimal application performance. What should you do?
A. Create a Spanner instance across regions for optimal performance.
B. Implement Bigtable with replication across multiple regions and configure to prioritize data accuracy.
C. Create a Cloud SQL instance in HA mode with a cross-region read replica.
D. Create an AlloyDB instance in HA mode with a cross-region read replica.
Show Answer
Correct Answer: A
Explanation: Cloud Spanner is designed for globally distributed applications requiring low latency, strong consistency, horizontal scalability, zero downtime, and high availability. A multi-region Spanner instance provides synchronous replication with external consistency and automatic failover, which the other options cannot fully guarantee at global scale.
Question 35
Your company is launching a gaming application that uses a Firestore database. You need to identify an easy-to-manage and cost-effective solution to automate the scheduling of Firestore data exports. What should you do?
A. Create a new Compute Engine, and set up a cron Job to run the gcloud firestore export command.
B. Use Dataflow to create a custom pipeline to extract data from Firestore, transform it into the desired format, and load it into a Cloud Storage bucket at regular intervals.
C. Use Cloud Scheduler to trigger a Cloud Function that executes the Firestore export process.
D. Use the Firebase Admin SDK to programmatically schedule and manage exports.
Show Answer
Correct Answer: C
Explanation: Cloud Scheduler combined with a Cloud Function provides a fully managed, serverless, and low-cost way to automate Firestore exports. Cloud Scheduler handles the cron-like scheduling without infrastructure management, and the Cloud Function can invoke the Firestore export (via the Admin SDK or gcloud API). This avoids the operational overhead and cost of Compute Engine, is far simpler than building a Dataflow pipeline, and is more appropriate than manually managing scheduling logic in application code.
Question 36
You want to migrate an existing on-premises application to Google Cloud. Your application supports semi-structured data ingested from 100,000 sensors, and each sensor sends 10 readings per second from manufacturing plants. You need to make this data available for real-time monitoring and analysis. What should you do?
A. Deploy the database using Cloud SQL.
B. Use BigQuery, and load data in batches.
C. Deploy the database using Bigtable.
D. Deploy the database using Cloud Spanner.
Show Answer
Correct Answer: C
Explanation: The workload involves very high write throughput (about 1 million writes per second), semi-structured, time-series–like data from sensors, and the need for real-time access. Cloud Bigtable is designed for massive-scale, low-latency reads and writes on wide-column, semi-structured data and is commonly used for IoT and time-series use cases. Cloud SQL and Spanner are not optimized for this ingestion rate, and BigQuery batch loading is not suitable for real-time monitoring.
Question 37
You are building a data warehouse on BigQuery. Sources of data include several MySQL databases located on-premises. You need to transfer data from these databases into BigQuery for analytics. You want to use a managed solution that has low latency and is easy to set up. What should you do?
A. Use Datastream to connect to your on-premises database and create a stream. Have Datastream write to Cloud Storage. Then use Dataflow to process the data into BigQuery.
B. Use Cloud Data Fusion and scheduled workflows to extract data from MySQL. Transform this data into the appropriate schema, and load this data into your BigQuery database.
C. Use Database Migration Service to replicate data to a Cloud SQL for MySQL instance. Create federated tables in BigQuery on top of the replicated instances to transform and load the data into your BigQuery database.
D. Create extracts from your on-premises databases periodically, and push these extracts to Cloud Storage. Upload the changes into BigQuery, and merge them with existing tables.
Show Answer
Correct Answer: A
Explanation: Datastream is a fully managed CDC service designed for low-latency replication from on-premises MySQL into Google Cloud. Streaming changes to Cloud Storage and then into BigQuery (commonly via Dataflow or native integrations) is easy to set up and supports near–real-time analytics. Other options are either batch-oriented, higher-latency, or not intended for analytics ingestion into BigQuery.
Question 38
You currently have a MySQL database running on Cloud SQL with a read replica in a different zone for non-mission critical analytics workloads. You want to enable high availability (HA) for the analytic workloads while keeping costs low. What should you do?
A. Increase the size of the read replica instance and enable H
B. Enable HA on the current read replica.
C. Create a new HA instance in the same zone as the primary.
D. Create a new HA instance in a different region than the primary.
Show Answer
Correct Answer: B
Explanation: Cloud SQL HA is implemented at the instance level using a regional (multi-zone) configuration. To make the analytics workload highly available at the lowest cost, you should enable HA directly on the existing read replica. This avoids creating additional full instances while providing automatic failover across zones for the replica. The other options either do not provide HA, are more expensive, or are unnecessary for the stated requirement.
Question 39
You have a non-critical business application running on Google Kubernetes Engine (GKE) in the app-dev VPC. You have created an AlloyDB cluster with Private Service Access (PSA) and no public IP address in the db-dev VPC. You want your application to securely connect to AlloyDB in a cost-effective way. What should you do?
A. Set up a high availability VPN between the app-dev and db-dev VPCs. Connect the application directly to AlloyDB.
B. Connect by using the private IP address of the AlloyDB cluster directly from the application.
C. Connect by using AlloyDB Auth Proxy installed in the GKE cluster.
D. Install a SOCKS proxy in a VM in the db-dev VPC. Install AlloyDB Auth Proxy in your GKE cluster, and connect to the AlloyDB cluster through the SOCKS server and port.
Show Answer
Correct Answer: C
Explanation: The application runs in a different VPC (app-dev) from the AlloyDB cluster (db-dev) that uses Private Service Access and has no public IP. Without VPC peering or VPN, the application cannot reach AlloyDB’s private IP directly, making option B invalid. A VPN (A) or SOCKS proxy chain (D) would add unnecessary cost and complexity for a non-critical workload. The AlloyDB Auth Proxy can run in the GKE cluster and uses IAM-based authentication to establish a secure, encrypted connection to AlloyDB without requiring direct VPC connectivity or public IPs, making it the most secure and cost-effective solution.
Question 40
You are migrating an on-premises application to Compute Engine and Cloud SQL. The application VMs will live in their own project, separate from the Cloud SQL instances which have their own project. What should you do to configure the networks?
A. Create a new VPC network in each project, and use VPC Network Peering to connect the two together.
B. Create a Shared VPC that both the application VMs and Cloud SQL instances will use.
C. Use the default networks, and leverage Cloud VPN to connect the two together.
D. Place both the application VMs and the Cloud SQL instances in the default network of each project.
Show Answer
Correct Answer: B
Explanation: Cloud SQL with private IP requires the client resources to be on the same VPC network. When resources are in different projects, this is achieved by using a Shared VPC, where one project hosts the VPC and other service projects attach their resources to it. VPC Network Peering does not support access to Cloud SQL private IP across peer networks, and VPN or separate default networks are unnecessary and incorrect for this use case.
$19
Get all 167 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.