Storage and Databases
Learn about file storage and database options on Replit.
Using Replit’s flexible storage solutions, you can quickly add the perfect data storage your app needs to run. You can use Replit’s database or object storage for apps with the following requirements:
- A game that needs to save player information such as progress or high scores
- A content platform that manages media files
What are Replit’s storage and database options
Replit offers the following data storage options:
-
Database: stores structured data such as user profiles, game scores, and product catalogs. You can store or retrieve data by attributes and relationships between data points.
-
Object Storage: stores unstructured data such as images, videos, documents. You can store and retrieve large files and binary data.
Object storage and database comparison
Database | Object Storage | |
---|---|---|
Ideal data format | Structured data with relationships | Large files (images, videos, documents) |
Data model | Tables, rows, columns | Buckets, objects |
Query language | SQL | REST API |
Clients | PostgresSQL-compatible clients and ORMs | Replit SDKs and GCS client libraries |
Billing model | Pay for compute time and storage space | Pay for bandwidth and storage space |
Workspace tools
Learn more about the following Replit tools to set up and manage your app’s data storage:
Database
Ideal for structured data and representing data relationships. Backed by Neon’s serverless PostgresSQL solution that scales with your app.
Object Storage
Ideal for unstructured data and large files, such as images, videos, and documents. Backed by Google Cloud Storage (GCS) for high availability and scalability.
Getting started
The quickest way to get started with Replit’s storage solutions is to follow one of the tutorials below:
Database
Connect your app to a SQL database
Object Storage in Python
Manage Object Storage using the Replit Python SDK
Object Storage in JavaScript
Manage Object Storage using the Replit JavaScript SDK
Use cases
The following examples show how the database and object storage tools can support your Replit Apps.
E-commerce app
Store product information, customer profiles, and order history in the database. Use SQL queries to filter products by category, search for items, and manage customer orders.
File sharing app
Share large files such as images, videos, and documents using object storage. Use the Replit Object Storage SDK to upload, download, and move files.
Next steps
- Database: Learn about the database workspace tool and how to connect your Replit App to a database
- Object Storage: Learn how to use Replit’s object storage solution