Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Database Engineer practice bank has an additional 769 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
An e-commerce company stores its transactional product catalog in PostgreSQL and wants to build a Retrieval-Augmented Generation (RAG) shopping assistant. The solution must support the following requirements:
Which database solution should the company implement?
Memorystore for Valkey is a managed, in-memory key-value data store that supports storing and querying vector embeddings using Hierarchical Navigable Small World (HNSW) approximate search or FLAT exact search. It is built for multi-threaded, high-throughput, ultra-low-latency workloads.
HNSW) or exact brute-force precision (FLAT), but lacks integrated relational query planning.The primary requirement was ultra-low-latency LLM response caching or high-QPS ephemeral vector lookups where eventual consistency and separate synchronization from the system of record were acceptable.
AlloyDB AI integrates high-dimensional vector storage and Approximate Nearest Neighbor (ANN) similarity search directly into AlloyDB for PostgreSQL. By combining the PostgreSQL vector (pgvector) extension with the alloydb_scann extension, teams can store vector embeddings alongside traditional structured relational columns in the same ACID-compliant database tables.
google_ml_integration extension supports virtual generated columns using the embedding() function so vector values stay synchronized when source text changes.<=> for cosine distance, <-> for L2 distance) alongside relational joins.Using AlloyDB for PostgreSQL preserves full PostgreSQL compatibility while eliminating the operational complexity and eventual consistency delays of maintaining a separate vector database. It unifies OLTP, structured filtering, and RAG vector retrieval in a single engine.
BigQuery is Google Cloud's serverless enterprise analytical data warehouse, and AI.SIMILARITY is a scalar SQL function that computes the cosine similarity between two inputs by generating their vector embeddings dynamically at query runtime.
AI.SIMILARITY generates embeddings on the fly for both inputs and does not use vector indexes, running it across millions of product rows for each customer search causes prohibitive latency and compute costs.VECTOR_SEARCH or AI.SEARCH and a vector index (CREATE VECTOR INDEX), rather than AI.SIMILARITY.AI.SIMILARITY invocation incurs model inference latency and external endpoint charges for both comparison values.The team was prototyping a similarity workflow or performing offline analytical comparisons on a small number of unindexed text pairs where embeddings had not been precomputed.
Traditional relational indexes—such as B-tree indexes for exact or range lookups and GIN indexes for lexical full-text search—are designed to match exact scalar values, prefixes, or tokenized keywords within structured and semi-structured text columns.
LIKE predicates and static keyword rules cannot generalize across synonyms, user intent, or multi-concept descriptions at scale.price < 150 or stock_count > 0, not high-dimensional similarity.The workload only required exact attribute lookups (such as SKU or price ranges) or strict keyword matching where users search using known product terminology rather than natural language intent.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated