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: For sensitive data migration to Cloud SQL, Google recommends using private connectivity rather than exposing the instance publicly. Private Service Connect/internal private connectivity reduces exposure, and IAM with an internal IP supports least-privilege access control. Automatic patching/binary logging are not migration security controls, external IPs increase exposure, and Storage Transfer Service is not the standard service for migrating relational databases to Cloud SQL.
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, requires data to stay within a single region, and has an RTO of 1 day. High availability is unnecessary and adds cost. Read replicas do not replace backups for disaster recovery and same-zone replicas provide little resilience. Automated backups are the cost-effective recovery mechanism, and storing backups in the same region satisfies the single-region data locality requirement while allowing restoration within the required RTO.
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: AlloyDB read pools are intended to offload read-intensive analytical workloads and can be scaled horizontally. Starting with a minimal read pool and adjusting the number of read nodes based on observed demand provides the best balance of scalability, performance, and cost efficiency. Using the primary for heavy analytics increases contention, changing instance size is not the primary scaling strategy for read pools, and provisioning a single large read pool upfront risks unnecessary cost.
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 strong consistency, horizontal scalability, high availability, low latency through multi-region deployment, and zero-downtime operations. Bigtable does not provide strong relational consistency across regions, and Cloud SQL/AlloyDB with cross-region replicas do not provide the same globally distributed strongly consistent architecture.
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 triggering a Cloud Function (or similar serverless endpoint) to invoke the managed Firestore export operation is the simplest, low-maintenance, and cost-effective way to automate scheduled Firestore exports. Running a dedicated Compute Engine VM adds unnecessary operational overhead, Dataflow is excessive for simple exports, and the Firebase Admin SDK does not provide built-in scheduling of exports.
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: Cloud Bigtable is designed for massive-scale, low-latency workloads such as IoT and time-series data, and can sustain very high write throughput (on the order of millions of writes per second). It supports semi-structured data and enables near real-time monitoring and analysis. Cloud SQL cannot handle this scale, BigQuery batch loading is not suitable for real-time ingestion, and Cloud Spanner is optimized for relational transactions rather than high-volume time-series ingestion.
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 Google Cloud's managed change data capture (CDC) service for near real-time replication from MySQL, including on-premises sources. It is designed for low-latency ingestion into Google Cloud. A common managed pattern is Datastream -> Cloud Storage -> Dataflow -> BigQuery. Cloud Data Fusion is ETL-oriented and typically not the preferred low-latency CDC solution. Database Migration Service targets database migration rather than analytics ingestion, and periodic extracts have higher latency.
Sources:
https://docs.cloud.google.com/bigquery/docs/release-notes
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 supports configuring a read replica as a high availability (regional) instance. Enabling HA on the existing read replica provides failover protection for the analytics workload while reusing the current replica, making it the lowest-cost option among the choices. Increasing instance size alone does not provide HA, and creating a separate HA primary instance adds unnecessary cost.
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 AlloyDB Auth Proxy is the recommended secure client connectivity mechanism for GKE applications. It provides IAM-authenticated, TLS-encrypted connections without requiring a public IP. Option B is not feasible because the application is in a different VPC from the AlloyDB private IP and no connectivity between the VPCs is described. Option A would work but is unnecessarily costly and operationally heavier for a non-critical application. Option D adds unnecessary complexity with a SOCKS proxy.
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: Shared VPC is the standard Google Cloud design for allowing resources in multiple projects to use the same VPC network. Cloud SQL supports private IP with Shared VPC, enabling Compute Engine VMs in a service project to privately access Cloud SQL in another project. VPC Peering connects separate VPCs but is not the typical architecture when multiple projects should share a common network. Cloud VPN and default networks are not appropriate for this intra-Google Cloud multi-project scenario.
$19
Get all 168 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.