- 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.
- App Storage: stores unstructured data such as images, videos, documents. You can store and retrieve large files and binary data.
App Storage and database comparison
Database | App Storage | |
---|---|---|
Ideal data format | Structured data with relationships | Large files (images, videos, documents) |
Data model | Tables, rows, columns | Buckets, files |
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.
App 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. Agent can automatically set up App Storage with advanced authentication and access controls.
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
App Storage in Python
Manage App Storage using the Replit Python SDK
App Storage in JavaScript
Manage App 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 App Storage. Use the Replit App 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
- App Storage: Learn how to use Replit’s App Storage solution