Cloud Storage and Databases (Cloud SQL, Firestore, Bigtable). This matters because the Google Professional Cloud Developer exam will test how you choose the right tool for the job. Every application needs a place to keep its data, and picking the wrong storage can break your app or waste money.
Jump to a section
A simple way to picture Using Cloud Storage and Databases (Cloud SQL, Firestore, Bigtable)
You are a town planner. Your town has different needs for storing information.
First, you build a Town Hall with a huge, organised filing cabinet. This is Cloud SQL. Every citizen's record has a specific drawer, a specific folder, and a specific page. You always know exactly which drawer to open. This is perfect for the town's tax records, which all have the same format and must be perfectly consistent.
Next, you need a public noticeboard in the square where everyone can pin messages. Some notices are just a quick note about a lost cat, others are photos from the summer fete. They don't all follow the same template. This is Firestore. It's flexible. You can pin anything up there, and thousands of citizens can read it instantly.
Finally, you need a massive, lightning-fast scoreboard at the sports centre. It tracks every single click of every turnstile, every goal scored in every match, every hot dog sold. It doesn't stop to organise the data into neat folders; it just writes every event as it happens. This is Bigtable. It's for high-speed, high-volume data that never stops, like the real-time record of a city that never sleeps.
A big block of stone is Cloud Storage – you just drop your blueprints, photos, or historic maps in there, and grab them whenever you need them.
When you build an application, it needs to remember things. A user's profile, a product catalogue, a list of high scores, a photo they uploaded. In the old days, you would install a database on a single server in your office. Today, you use cloud services.
Google Cloud offers four main storage services that you, as a developer, need to understand. Each is built for a different type of task. They are: Cloud Storage, Cloud SQL, Firestore, and Bigtable.
Let's break those down, one by one.
Cloud Storage is the simplest to understand. Think of it like a giant, secure garage where you can park any type of file. These files are called 'objects'. The garage is called a 'bucket'. You can store a photo, a video, a backup of your computer, or a massive dataset. Cloud Storage is not a database. You cannot run a SQL query (a structured search command) against it. You simply save a file and retrieve it by its name. It is perfect for storing static website images, user-uploaded profile pictures, or archives of old logs.
Cloud SQL is a full database that uses a language called SQL (Structured Query Language). SQL is a standard way to ask questions of your data. If you have ever used a spreadsheet, you already understand the concept of rows and columns. Cloud SQL gives you those rows and columns but in a much more powerful and reliable way. It supports common database engines like MySQL, PostgreSQL, and SQL Server. You choose Cloud SQL when your data has a strict structure, every record has the same fields (like every customer having a name, address, and phone number), and you need to ensure that all data is perfectly consistent (this is called 'ACID compliance' – Atomicity, Consistency, Isolation, Durability). For example, a banking system must use a relational database like Cloud SQL so that money cannot be lost or duplicated.
Firestore is a 'NoSQL' database. 'NoSQL' means it does not use the rigid rows-and-columns model of SQL. Instead, it stores data as 'documents' inside 'collections'. A document is like a single JSON file (a lightweight data-interchange format) that can have any fields you want. One customer's document might have a 'favourite colour' field, while another customer's document might not. This flexibility is why Firestore is fantastic for applications that need to update quickly and frequently, like a mobile app's user profiles or a live chat system. It also has real-time listeners, meaning if another user updates the data, your app can see the change instantly without refreshing the page.
Bigtable is Google's high-performance NoSQL database. It is not for typical web applications. It is built for enormous workloads like analytics, time-series data (stock prices every second), and machine learning pipelines. Bigtable can scale horizontally, meaning you add more machines (called 'nodes') to handle more traffic, and it can process millions of reads and writes per second. It is a wide-column database, which is a different structure from documents. Think of it like a massive, sparse spreadsheet that can have billions of rows. You use Bigtable when you need blistering speed and insane scale, and when your data is mostly key-value pairs. It does not support SQL queries or complex joins (combining data from different tables).
The key to passing the PCD exam is recognising the strengths of each service and knowing exactly why you would pick one over the others. If you need a file storage, pick Cloud Storage. If you need reliable, structured data with relationships, pick Cloud SQL. If you need a flexible, real-time NoSQL database for a mobile app, pick Firestore. If you need to process massive amounts of time-stamped data at high speed, pick Bigtable.
Finally, remember that Google Cloud also offers other database options like Memorystore (for caching) and Spanner (for globally consistent, high-scale SQL), but the exam objective explicitly tests you on these four.
Analyse the data shape
Determine if your data is structured (rows and columns with fixed fields) or unstructured (files, freeform documents). This first decision points you towards Cloud SQL (structured) or Firestore/Bigtable (unstructured).
Evaluate consistency requirements
If you need strict consistency with ACID transactions (e.g., bank transfers, inventory management), Cloud SQL is the only choice. Firestore offers strong consistency within a single document but not across multiple documents in a single transaction.
Assess the need for real-time updates
If your application requires clients to see data changes immediately (like a chat app or live dashboard), choose Firestore for its built-in snapshot listeners. Cloud SQL and Cloud Storage require manual updates or polling.
Estimate write throughput and latency
For millions of writes per second (e.g., IoT sensor data or stock ticks), Bigtable is designed to handle massive throughput. Cloud SQL will bottleneck under that load, and Firestore has lower write limits per database.
Decide on storage for files and assets
If the data is a file (image, video, backup, website asset), place it in Cloud Storage. Do not store binary files inside a database. Store the file's URL in your database instead.
An IT professional, let us call her Priya, is building a new fitness tracking application. She needs to decide where to put every piece of data.
First, she needs to store the user's profile picture and the video of their personal trainer. She picks Cloud Storage. She creates a bucket called 'fitness-app-media'. When a user uploads a photo, her application sends a request to Cloud Storage, which returns a public URL. That URL is then saved in the database. Priya does not want to store the raw image data in her database; that would make it slow and expensive. Cloud Storage is perfect for these unstructured files.
Next, she needs a database for the user's profile information: name, email, height, weight, date of birth. This data is structured – every user has the same fields. She also needs to link a user to their workout plans. This requires relationships – a user 'has many' workouts. She chooses Cloud SQL for this. She creates a table called 'users' and a table called 'workouts'. When a user logs in, her app queries Cloud SQL with a command like 'SELECT * FROM users WHERE email = ...'. The data is always consistent; if two users try to update the same record, the database ensures only one succeeds.
For the live leaderboard where users compete in real-time, she needs Firestore. Each user can post their latest run distance, and friends need to see it immediately. Firestore's real-time listeners are perfect. She creates a collection called 'leaderboard_entries'. Every document in that collection has fields like 'user_name', 'distance', and 'timestamp'. When a user runs, her app writes a new document, and all connected apps receive the update in milliseconds.
Finally, she wants to analyse how many steps users took across the entire country, by the second, to find peak usage times. This is a massive, high-write, time-series problem. Bigtable is the answer. She sets up a Bigtable instance and writes every single step event with a timestamp as the row key. Bigtable can absorb millions of writes per second from thousands of users. Later, she runs analytics queries on this raw data to build reports.
Priya's day is filled with these decisions. She does not just 'use a database'. She asks: What is the shape of my data? How much traffic? Is real-time critical? The wrong choice could mean a slow app, high costs, or a system that crashes under load.
The PCD exam will not ask you to write complex SQL queries. Instead, it will test your ability to choose the right service for a given scenario. This is the core skill.
The exam questions often present a business requirement and ask, 'Which Google Cloud storage service should the developer use?' They will set traps based on the features you need to recognise.
Here are the specific concepts they love to test:
Transaction support: The exam will describe a situation where money is transferred between accounts. The key word is 'consistency'. If the question mentions a financial transaction, the answer is always Cloud SQL. Firestore and Bigtable do not support ACID transactions across multiple documents in the same way. Cloud SQL does.
Real-time updates: If the scenario involves a chat app, a live sports scoreboard, or a collaborative document, and the user needs to see changes without refreshing, the answer is Firestore. Firestore has built-in 'snapshot listeners' that push changes to clients. Cloud Storage and Cloud SQL do not have this feature.
Structured vs unstructured: If the question describes a file, a video, a backup, or a static website asset, the answer is Cloud Storage. If it describes rows and columns with relationships, the answer is Cloud SQL.
High write throughput: If the scenario is about collecting IoT sensor data or millions of stock ticks per second, and they mention 'low latency' and 'high volume', the answer is Bigtable. Cloud SQL would struggle with that volume of writes.
Schema flexibility: If the data is formless, or the fields change frequently (like a product catalogue where each product has different attributes), the answer is Firestore. Cloud SQL would require you to alter the table schema every time.
Common traps on the exam:
Confusing Cloud Firestore with Cloud Storage. A beginner might think 'I store files in a database, so I use Firestore'. Wrong. Cloud Storage is for files; Firestore is for structured data.
Assuming that because Bigtable is a NoSQL database, it is like Firestore. They are very different. Firestore is for document data; Bigtable is for wide-column, analytical, high-throughput data.
Thinking Cloud SQL is always the answer. It is not. The exam will test you on situations where SQL is the wrong choice, such as when you need extreme scale or schema flexibility.
Forgetting that Firestore has 'real-time listeners' and 'offline support' built in. These are key differentiators.
You will also see questions about 'strongly consistent secondary indexes' in Firestore and 'atomic transactions' in Cloud SQL. Knowing these definitions is critical.
Memorise this pattern: Files -> Cloud Storage. Structured data, relationships, transactions -> Cloud SQL. Real-time, flexible, mobile apps -> Firestore. High scale, time-series, analytical -> Bigtable.
Cloud Storage is for immutable blobs (files), not for queryable structured data.
Cloud SQL is a fully managed relational database that guarantees ACID transactions for financial and structured data.
Firestore is a flexible NoSQL document database that provides real-time updates and offline support for mobile apps.
Bigtable is a wide-column NoSQL database designed for high-throughput, time-series, and analytical workloads at massive scale.
Choosing the right service depends on your data shape, access patterns, consistency requirements, and traffic volume.
The PCD exam tests scenario-based decisions, not SQL syntax, so learn the traits that differentiate each service.
These come up on the exam all the time. Here's how to tell them apart.
Cloud SQL
Structured rows and columns (schema-on-write)
Supports ACID transactions across multiple tables
Best for complex queries with JOINs and aggregations
Firestore
Flexible documents (schema-on-read)
Real-time listeners for instant app updates
Best for mobile apps with offline support and variable fields
Firestore
Document database with complex nested fields
Built-in real-time data synchronisation
Lower maximum write throughput (approx 10k writes per second per database)
Bigtable
Wide-column database for sparse, time-series data
No real-time listeners; designed for bulk writes
Can handle millions of writes per second across nodes
Cloud Storage
Stores blobs (binary large objects) as files
No querying or indexing on file content
Ideal for static assets, backups, and archives
Cloud SQL
Stores structured data in tables with rows and columns
Supports powerful SQL queries and indexing
Ideal for transactional and relational data
Cloud SQL
Relational database with strong consistency
Scalable vertically (up to ~64 CPUs, ~400GB RAM per instance)
Supports SQL, joins, and complex transactions
Bigtable
NoSQL wide-column database for high throughput
Scales horizontally by adding nodes (100s of nodes possible)
Does not support SQL or multi-table joins
Mistake
Firestore is just a newer version of Cloud SQL, and they can be used interchangeably.
Correct
They are fundamentally different. Cloud SQL is a relational SQL database (rows/columns), while Firestore is a NoSQL document database (documents/collections). You choose one based on whether your data needs strict structure and joins (Cloud SQL) or flexibility and real-time updates (Firestore).
Both are called 'databases', so beginners assume they do the same job. Because the exam forces you to choose between them, this confusion is a common source of wrong answers.
Mistake
Cloud Storage is a database, and you can run SQL queries against it.
Correct
Cloud Storage is an object store. It treats files as objects in buckets. You cannot run SQL queries on the contents of those files. You use it for storing and serving assets (images, videos, backups), not for querying structured data.
The term 'storage' is vague. In everyday language, we 'store data in a database', so many assume Cloud Storage is another database. The exam tests the distinction explicitly.
Mistake
Bigtable is the best choice for any large application because it scales so well.
Correct
Bigtable is ideal only for specific use cases: high-throughput, time-series, analytical, or large-scale operational workloads. It does not support SQL, transactions, or rich queries. For a typical web app with user profiles, Firestore or Cloud SQL is better.
Bigtable's marketing emphasizes its scale, leading beginners to overuse it. The exam tests the 'right tool for the right job', not 'one size fits all'.
Mistake
Firestore cannot handle any relational data, so it is useless for apps that need user profiles and friends lists.
Correct
Firestore can handle many-to-many relationships through manual references and denormalization. It does not do automatic SQL-style joins, but you can model friends lists by storing arrays of user IDs. It is a different approach, not an impossibility.
Developers trained on SQL databases assume relationships require foreign keys and joins. They dismiss NoSQL as incapable, but the exam tests your ability to work around limitations.
Mistake
Cloud SQL is always slower than Firestore because it uses strict schemas.
Correct
Cloud SQL can be extremely fast for complex queries, especially with proper indexes. Firestore is fast for simple key lookups and real-time updates but can be slower for complex analytical queries. Speed depends on workload, not just database type.
A beginner might assume 'flexible' equals 'faster'. The exam includes performance-based scenarios where Cloud SQL is the correct speed choice.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Cloud SQL is a regional relational database with limited scalability, while Cloud Spanner is a globally distributed, horizontally scalable relational database that provides consistency across regions. PCD focuses on Cloud SQL, but know that Spanner is for global scale.
No, Cloud Storage is an object store, not a database. You cannot run SQL queries on the files inside a bucket. You must use BigQuery to query data stored in Cloud Storage, but that is a separate analytics service.
Firestore supports transactions across multiple documents, but these are not full ACID transactions like in Cloud SQL. Firestore's transactions are atomic and isolated, but they do not guarantee the same 'C' (consistency) level as relational databases for complex multi-table operations.
Use Bigtable when you need millions of writes per second, a wide-column model, and low-latency access for time-series or analytical data. Use Firestore when you need real-time updates, flexible documents, and a simpler mobile-friendly API.
No. Cloud Storage is an object store for files. It is not a database. You cannot perform queries, joins, or transactions on the data inside a file stored in Cloud Storage. It is for static assets, backups, and archives.
Not recommended. Banking applications require strict ACID transactions and referential integrity, which Firestore cannot provide reliably across all operations. Use Cloud SQL for financial data.
You've finished Using Cloud Storage and Databases (Cloud SQL, Firestore, Bigtable). Continue through the PCD study guide to build a complete picture of the exam.
Done with this chapter?