Stay organized with collections
Save and categorize content based on your preferences.
A typical application uses a client, such as a low-level driver or an object-relational mapper (ORM) to
connect to the database. Spanner supports clients in multiple languages
that let you use common libraries, such as JDBC, across developer
environments. For more information, see
Overview of drivers.
In addition to managing how your application connects to Spanner,
you also have to manage which queries are sent and which syntax the queries are using.
Spanner supports two SQL dialects, both based on ANSI SQL standard.
You can choose to use GoogleSQL or PostgreSQL interface for Spanner based
on the ecosystem you want to operate in. For more information, see
Choosing the right dialect for your Spanner database.
Because of the
architectural differences between the Spanner database and your
source database, the syntax used
in Spanner might not align with the syntax of your source database.
Complete the following steps manually
to migrate your application to Spanner:
Spanner doesn't support running user code in the database,
so you need to move any procedures and triggers stored at the database level
into the application.
You also might need to make changes to transaction handling. Consider the following:
The mutations per commit limit is 80,000. Each secondary index on a table
is an additional mutation per row. To modify data using mutations, see
Insert, update, and delete data using mutations.
To modify a large amount of data, use
partitioned DML.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Migrate your application code\n\nA typical application uses a client, such as a low-level driver or an object-relational mapper (ORM) to\nconnect to the database. Spanner supports clients in multiple languages\nthat let you use common libraries, such as JDBC, across developer\nenvironments. For more information, see\n[Overview of drivers](/spanner/docs/drivers-overview).\n\nIn addition to managing how your application connects to Spanner,\nyou also have to manage which queries are sent and which syntax the queries are using.\nSpanner supports two SQL dialects, both based on ANSI SQL standard.\nYou can choose to use GoogleSQL or PostgreSQL interface for Spanner based\non the ecosystem you want to operate in. For more information, see\n[Choosing the right dialect for your Spanner database](/spanner/docs/choose-googlesql-or-postgres).\nBecause of the\narchitectural differences between the Spanner database and your\nsource database, the syntax used\nin Spanner might not align with the syntax of your source database.\n\nComplete the following steps manually\nto migrate your application to Spanner:\n\n- Spanner doesn't support running user code in the database,\n so you need to move any procedures and triggers stored at the database level\n into the application.\n\n- Use Spanner client libraries and ORMs. For more information, see\n [Overview of APIs, client libraries, and ORM drivers](/spanner/docs/api-libraries-overview).\n\n- Take note of [Spanner partitioned DML](/spanner/docs/dml-partitioned),\n [read-only transactions](/spanner/docs/transactions#read-only_transactions),\n [commit timestamps](/spanner/docs/commit-timestamp), and read timestamps and\n how they can optimize application performance.\n\n- You also might need to make changes to transaction handling. Consider the following:\n\n - The mutations per commit limit is 80,000. Each secondary index on a table is an additional mutation per row. To modify data using mutations, see [Insert, update, and delete data using mutations](/spanner/docs/modify-mutation-api). To modify a large amount of data, use [partitioned DML](/spanner/docs/dml-partitioned)."]]