Database technologies
MySQL
MySQL is the world’s most popular relational database. Many of the worlds largest web applications are powered by MySQL behind the scenes including Slack, X, GitHub, JD.com, and many others. MySQL is open-source, has existed for 30+ years, and is currently maintained by Oracle.Vitess
Vitess is an open-source project created by engineers at YouTube in the early 2010’s. It was created to solve their MySQL scalability challenges. Vitess works in tandem with MySQL and provides proxying, orchestration, monitoring, and sharding capabilities. A Vitess-powered MySQL database can scale to petabytes of data and millions of queries per second.PlanetScale
PlanetScale is a complete database platform that emphasizes reliability, scalability, and developer productivity. Every PlanetScale database is powered by Vitess and MySQL. PlanetScale makes it easy to spin up, resize, manage, and work with Vitess-powered databases both for small organizations and large enterprises. Additionally, PlanetScale employs the majority of the Vitess core maintainers.PlanetScale concepts
Database
In the PlanetScale app, users can create one or more Databases. Each database is associated with an Organization. A database is an individual Vitess cluster that uses MySQL under the hood. If you’ve used vanilla MySQL in the past, you are probably used to being able to have a single MySQL server manage multiple distinct databases (EG:CREATE DATABASE db1;
, CREATE DATABASE db2;
…).
You cannot use CREATE DATABASE
to create multiple logical databases within a single PlanetScale database instance.
However, you can achieve something similar by creating multiple keyspaces.
Keyspace
A Keyspace represents a single, logical database. When you create a new PlanetScale database, it contains a single, default keyspace of the same name as your database. More keyspaces can be added using the Cluster configuration tab. Each keyspace has its own primary and replicas. The “keyspace” terminology comes from Vitess. Read more about keyspaces.Branch
A typical flow on GitHub is to work on new feature in branches. When development is complete, the developer can create a pull request which then gets merged intomain
.
PlanetScale allows you to work with your database in a similar fashion via branches.
Every database has a default branch, often named main
.
You can create branches of your database, in which you can make schema changes without affecting your production tables and data.