Gemini in Databases overview

Gemini in Databases, which is part of Gemini for Google Cloud, is an AI-powered database assistant that helps you optimize your database fleet and work with the data in your databases. Gemini in Databases helps simplify all aspects of database operations, including programming, performance optimization, fleet management, governance, and migrations.

AI assistance with Gemini in Databases

Gemini in Databases provides AI assistance to help you in the following ways:

  • Reduce risk and optimize your database fleet with Database Center. Database Center lets you aggregate and summarize your fleet's top-level health issues based on data from your Google Cloud projects and Security Command Center. Database Center then advises you on how to investigate affected projects or instances. The Database Center dashboard displays a percentage that represents how many of your resources are passing a given health issue test. Available in AlloyDB for PostgreSQL and Cloud SQL.

  • Provide code assistance in Database studio. Gemini in Databases lets you use natural language questions to manage your data and create SQL queries. You can perform a range of actions that you would perform on a SQL command-line client, such as creating tables and indexes, modifying tables, or setting up views. Available in AlloyDB for PostgreSQL, Cloud SQL, and Spanner.

  • Stay ahead of potential performance issues with Enhanced Query Insights. Gemini in Databases includes Enhanced Query Insights to detect, troubleshoot, and help prevent database and query performance problems using real-time diagnostics. You can correlate metrics across multiple dimensions to identify hard-to-diagnose issues. Gemini in Databases provides in-context explainability for nuanced database concepts such as wait events, database flags, and various database metrics available for troubleshooting. Available in AlloyDB for PostgreSQL.

  • Improve security posture. Gemini in Databases helps you improve the security posture of your databases by proactively detecting configuration issues and providing security recommendations. Available in AlloyDB for PostgreSQL and Cloud SQL.

  • Utilize assisted code and schema conversion in Database Migration Service. Gemini in Databases helps you improve code conversion in a workspace and expedite your conversion effort. Gemini in Databases simplifies converting database application code like stored procedures, triggers, and functions to a PostgreSQL-compatible dialect in order to modernize your legacy databases into a cloud-optimized database such as Cloud SQL for PostgreSQL or AlloyDB for PostgreSQL.

Gemini doesn't use your prompts or its responses as data to train its models. For more information, see How Gemini for Google Cloud uses your data. As an early-stage technology, Gemini can generate output that seems plausible but is factually incorrect. We recommend that you validate all output from Gemini before you use it. For more information, see Gemini for Google Cloud and responsible AI.

Features

The following table shows Gemini in Databases features, along with links to documentation:

Task Type of assistance Product documentation
Manage your database fleet
  • Provide contextual chat to interact with findings.
  • Analyze usage patterns.
  • Stay ahead of database issues.
  • Provide recommendations to improve database configurations.
Generate SQL queries
  • Write in natural language to generate SQL statements.
  • Get contextual code that works with your schema.
  • Optimize and explain existing queries.
Fine-tune database performance
  • Detect and troubleshoot your query performance issues.
  • Analyze query metrics across multiple dimensions.
  • Provide tailored, proactive recommendations to lower cost, improve performance, and help secure your applications.
Modernize your database
  • Filter the source schema by issue group, which is contextualized by your new saved SQL statements.
  • Review suggestions for code corrections.

Where to interact with Gemini in Databases

After you set up Gemini in Databases for a project, you can ask for assistance in a few places within the Google Cloud console:

  • The Gemini conversational agent
  • Database Center
  • Gemini assistance in studio
  • The Query Insights dashboard
  • The Conversion workspaces page in the Database Migration Service
  • AlloyDB for PostgreSQL and Cloud SQL pages

Gemini in Databases conversational agent

You can use the Gemini conversational agent to get assistance about your instances and databases. For example, you can prompt Gemini with questions about the health of your database fleet, and Gemini recommends ways to optimize the databases in your fleet.

For more information, see Use Gemini to learn about fleet health issues.

Database Center

Database Center is a dashboard of health issues for the instances and databases in your Google Cloud project. It displays a percentage that represents how many of your resources are passing a given health issue test.

For more information, see Database Center overview.

AlloyDB for PostgreSQL and Cloud SQL pages

You can see the list of security, data protection, and performance recommendations that appear in the Google Cloud console for AlloyDB for PostgreSQL and Cloud SQL.

For more information, see Database security recommendations and Data protection and performance recommendations.

Gemini assistance in studio

When using Cloud SQL or AlloyDB for PostgreSQL, you can click pen_spark Help me code to generate, understand, and optimize SQL queries based on natural language instructions that are based on your database schema. For example, you can prompt Gemini to generate SQL in response to the following prompts:

  • "Create a table that tracks customer satisfaction survey results."
  • "Add a date column called birthday to the Singers table."
  • "How many singers were born in the 90s?"

For more information, see one of the following:

Code suggestions in studio

The Database Migration Service integrates Gemini into the Conversion workspaces page. Gemini analyzes the fixes that you apply to conversion issues with SQL objects and suggests other changes based on your input. In this way, you can propagate your fixes to multiple objects without making all edits manually. After enough changes are made, Gemini displays a prompt and suggests further edits.

For more information, see one of the following:

Set up Gemini in Databases

For detailed setup steps, see Set up Gemini in Databases.

What's next