External SQL Database
While Rivet Actors can serve as a complete database solution, they can also complement your existing databases. For example, you might use Rivet Actors to handle frequently-changing data that needs real-time access, while keeping less frequently accessed data in your traditional database.
Rivet can be used with common SQL databases, such as PostgreSQL and MySQL.
Libraries
To facilitate interaction with SQL databases, you can use either ORM libraries or raw SQL drivers. Each has its own use cases and benefits:
-
ORM Libraries: Type-safe and easy way to interact with your database
-
Raw SQL Drivers: Direct access to the database for more flexibility
Hosting Providers
There are several options for places to host your SQL database:
Example
Here's a basic example of how you might set up a connection to a PostgreSQL database using Drizzle: