Database as a service (DBaaS) is a way of renting a database in which another company runs it for you in the cloud. It sets up the servers, takes the backups, installs the patches and keeps the database fast. It is also called a managed database service. Patching means installing updates and security fixes.
The buyer does not touch the servers. It receives an address to connect to, and its app reads and writes data as usual. It pays for what it uses: a monthly bill based on the size of the server, the storage and the backups kept.
The big cloud providers each sell DBaaS for the databases on their own clouds. Independent sellers run several kinds of database, such as Oracle, PostgreSQL, MySQL and SQL Server, across the three big clouds: Amazon Web Services, Microsoft Azure and Google Cloud. Some run the database inside the buyer's own cloud account, so that the data stays there.
The work it removes is routine but risky. Backups must run every night, and someone must test that they can be restored. Patches must be installed without stopping the app. A standby copy must be kept in a second data centre, ready to take over if the first fails. This is redundancy. A DBaaS does all of this with its own tested scripts, so that the buyer's engineers write none.
Take, for example, a company in Visakhapatnam that sells school management software to 1,200 schools. It runs its relational database as a DBaaS. The service takes a full snapshot every night, and saves every change in between, every five minutes. One afternoon, an engineer runs a wrong command that marks every student absent in 40 schools. The time is 3:12 p.m. The team asks the service for a copy of the database as it was at 3:11 p.m. Within 20 minutes the copy is ready. They copy the correct attendance back into the live database, and the schools never notice. Restoring to an exact minute like this is called point-in-time recovery.
Extra copies can also be kept outside the service, through backup and recovery software.
Small teams often get a DBaaS without choosing it. A developer cloud, a low-code platform or an AI app builder creates a managed database for each new app.
There is a trade-off. Each provider adds its own features, and an app that depends on them is hard to move, which is called vendor lock-in. A company that would rather run the database itself can buy open-source database support instead. The open source business model explains why both services exist.