Recommend and justify an approach for connecting applications to relational databases
Company: Google
Role: Product Manager
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Other
An interviewer asks you, as a product manager candidate, how SQL databases are best connected, and expects you to justify the recommendation. Make a recommendation, explain how it works in terms an engineering partner would accept as accurate, and say why it is better than the alternatives.
```hint Pin down "connect" first
The word can mean different things here. Settle which one the interviewer intends, then think about what the database pays for every open connection and who should be allowed to hold one.
```
### Clarifying Questions
- Do you mean how an application or service reaches a SQL database, how data held in separate databases is brought together, or how tables inside one database are related and joined?
- What workload should I assume: a high-traffic, read-heavy consumer product, an internal tool with a handful of users, or reporting over large tables?
- Are there security or compliance limits, for example personal data that must stay on a private network?
### What a Strong Answer Covers
- Settling which meaning of "connect" is intended, and briefly addressing the other readings
- The mechanics of the recommended path: drivers, what a connection costs, connection pooling and server connection limits
- Where a service layer, a cache and read replicas belong, and which workload signals justify each
- Securing the path: credentials, encryption in transit, least-privilege roles and parameterized queries
- Trade-offs framed the way a PM would discuss them with engineering: latency, freshness, cost and operational complexity
### Follow-up Questions
- After a launch, thousands of short-lived serverless functions each open their own database connection, and the database starts refusing new ones. What went wrong, and what would you change?
- A partner team asks for read access to your production database. When would you agree, and what would you offer instead?
- Caching makes a page fast, but some users now see outdated data. How would you decide what may be cached and for how long?
Overview: A technical concept question for product managers about how SQL databases should be connected and why the chosen approach is best. It tests whether the candidate clarifies what connect means and reasons about drivers, connection pooling, service layers, caching, read replicas and security trade-offs.