| Google Cloud Database Service | Data Model | Key Strengths | Primary Java Integration Method |
|---|---|---|---|
| AlloyDB ![][image1] | PostgreSQL-compatible Relational | AI-ready (e.g. Vector search w/ ScaNN index, SQL AI functions), high-performance HTAP (Columnar Engine), Managed Connection Pooling, 99.99% SLA | AlloyDB Java Connector, HikariCP / JDBC, Spring Boot (plus Quarkus & Micronaut) |
| Cloud SQL ![][image2] | MySQL, PostgreSQL, SQL Server Relational | Managed version of popular databases, operational simplicity, Enterprise & Enterprise Plus editions (Data Cache, Read Pools, near-zero downtime maintenance) | Cloud SQL Java Connector, Cloud SQL Auth Proxy (with JDBC), Spring Boot |
| Spanner ![][image3] | Globally Distributed Relational (+ Multi-Model: Graph, Vector, KV) | Global scale with strong consistency, horizontal scalability, up to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.alloydb; | |
| import com.example.alloydb.FilmRepository.Film; | |
| import org.junit.jupiter.api.BeforeEach; | |
| import org.junit.jupiter.api.Test; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.test.context.SpringBootTest; | |
| import org.springframework.boot.testcontainers.service.connection.ServiceConnection; | |
| import org.springframework.jdbc.core.simple.JdbcClient; | |
| import org.testcontainers.containers.PostgreSQLContainer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.alloydb; | |
| import io.quarkus.hibernate.orm.panache.PanacheEntityBase; | |
| import io.quarkus.panache.common.Page; | |
| import io.quarkus.panache.common.Sort; | |
| import jakarta.persistence.*; | |
| import java.math.BigDecimal; | |
| import java.util.List; | |
| @Entity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.alloydb; | |
| import io.micronaut.data.annotation.Id; | |
| import io.micronaut.data.annotation.MappedEntity; | |
| import io.micronaut.data.jdbc.annotation.JdbcRepository; | |
| import io.micronaut.data.model.query.builder.sql.Dialect; | |
| import io.micronaut.data.repository.CrudRepository; | |
| import java.math.BigDecimal; | |
| import java.util.List; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.alloydb; | |
| import com.example.alloydb.FilmRepository.Film; | |
| import org.springframework.http.ResponseEntity; | |
| import org.springframework.web.bind.annotation.*; | |
| import java.math.BigDecimal; | |
| import java.util.List; | |
| @RestController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.alloydb; | |
| import org.springframework.jdbc.core.simple.JdbcClient; | |
| import org.springframework.stereotype.Repository; | |
| import org.springframework.transaction.annotation.Transactional; | |
| import java.math.BigDecimal; | |
| import java.util.List; | |
| import java.util.Optional; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.springframework.boot.CommandLineRunner; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.jdbc.core.JdbcTemplate; | |
| @SpringBootApplication | |
| public class AlloyDbTestApplication { | |
| public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.zaxxer.hikari.HikariConfig; | |
| import com.zaxxer.hikari.HikariDataSource; | |
| import javax.sql.DataSource; | |
| import java.sql.Connection; | |
| import java.sql.PreparedStatement; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| public class AlloyDBConnectivity { | |
| // Retrieve configuration from environment variables |
| Feature | Pay-As-You-Go (Agent Platform) | Per-Seat License (Gemini Enterprise) | What it does and why it matters |
|---|---|---|---|
| Monthly Spend Caps | 🔴 Critical | 🟡 Optional (with Overages / 3P Models) | Sets a hard monthly ceiling on aiplatform.googleapis.com in Cloud Billing that automatically pauses agent API requests when reached. |
| Pooled Quotas | ⚪ N/A | 🟢 Essential | Pools included per-seat credits ($10/mo Standard, $15/mo Plus) into a shared rolling 7-day allowance (per project, location, and edition) so lighter users offset heavy agent sessions. |
| Overage Enablement (Pay-as-you-go above quota) | ⚪ N/A (Native) | 🟢 Essential | Allows teams that exhaust their weekly pooled seat capacity to seamlessly overflow into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| | Feature | Pay-As-You-Go *(Agent Platform)* | Per-Seat License *(Gemini Enterprise)* | What it does and why it matters | | |
| | :---- | :---: | :---: | :---- | | |
| | [Monthly Spend Caps](https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps) | 🔴 **Critical** | 🟡 **Optional** *(with Overages / 3P Models)* | Sets a hard monthly ceiling on `aiplatform.googleapis.com` in Cloud Billing that automatically pauses agent API requests when reached. | | |
| | [Pooled Quotas](https://docs.cloud.google.com/gemini/enterprise/docs/quotas-and-overages) | ⚪ **N/A** | 🟢 **Essential** | Pools included per-seat credits (\$10/mo Standard, \$15/mo Plus) into a shared **rolling 7-day allowance** (per project, location, and edition) so lighter users offset heavy agent sessions. | | |
| | [Overage Enablement](https://docs.cloud.google.com/gemini/enterprise/docs/configure-overages) *(Pay-as-you-go above quota)* | ⚪ **N/A** *(Native)* | 🟢 **Essential** | Allows teams that exhaust their weekly pooled seat capacity to seamlessly overflow into |
NewerOlder