CompTIA DataSys+ (DS0-002) free question 1 / 10 · Domain 1: Database Fundamentals
A team already runs PostgreSQL for orders and wants embeddings next to the order rows so one query can join them. What does pgvector offer for this?
- A hosted service that stores vectors outside the relational database
- Vector columns in Postgres, keeping ACID transactions and JOINs
- A query language that cannot be combined with ordinary SQL tables
- A separate engine that replaces transactions with eventual consistency
Show the answer and explanation
Answer: B
Why this is correct
The README says pgvector lets you store your vectors with the rest of your data and supports distances such as L2, inner product and cosine distance. It also keeps ACID compliance, point-in-time recovery, JOINs and the other features of Postgres. Embeddings placed in a column next to order rows can therefore be joined in a single query. The source reads: "L2 distance, inner product, cosine distance, L1 distance, Hamming distance, and Jaccard distance" "Plus ACID compliance, point-in-time recovery, JOINs, and all of the other great features of Postgres" Source page: pgvector, section "pgvector".
Why the other options are wrong
"A separate engine that replaces transactions with eventual consistency" … The README says pgvector keeps ACID compliance, point-in-time recovery and JOINs. It does not replace the transactional model.
"A hosted service that stores vectors outside the relational database" … The README presents pgvector as a Postgres extension that stores vectors with the rest of your data, not an external service.
"A query language that cannot be combined with ordinary SQL tables" … Vectors are stored with the rest of the data, and the README lists JOINs among the Postgres features that remain available.
Key points
A vector type inside a relational engine keeps transactions and joins while adding similarity search.