Introduction
Database-as-a-Service(DBaaS) is a cloud computing service that lets users access and use a cloud database without having to set up physical hardware, install software, or configure it for performance. By outsourcing database management tasks to a cloud provider, users no longer have to worry about the provisioning of server hardware, storage, network, and other infrastructure concerns whenever they want to create a new database instance; users simply use the abstractions provided by the cloud database to store and retrieve data. As a consequence, users of DBaaS do not have control over the underlying database implementation nor the physical hardware that runs it. Instead, the cloud provider is responsible for maintaining the database systems, executing periodic updates, patching security vulnerabilities, and creating backups to ensure that the system is available and secured while fulfilling their Service Level Agreement(SLA). SLA defines the level of service expected by a user from a provider. For example, a cloud database service may have an availability promise of at least 99.999%, meaning that the service will be up and available 99.999% of the time.
Using a cloud database through DBaaS allows users to leverage the many benefits of cloud computing, such as cost efficiency, security, and flexibility.
DBaaS is very popular among application developers who are interested in a faster time-to-market and increased scalability and security for their applications.
In this post, I will briefly talk about the difference between relational and non-relational databases. Then, I will discuss the benefits and drawbacks of DBaaS, and how you can start using it in your next project.
Relational Database
A Relational database(SQL database) stores data items that are related. Those items are arranged into a tabular form with rows and columns. In a relational database, each row in a table could be marked with a unique identifier called a primary key, and rows among multiple tables can be made related using foreign keys. The columns of the table hold attributes of the data, and each record usually has a value for each attribute, or the special value NULL if no value is present. Relational databases are managed by Relational Database Management Systems(RDBMS) such as MySQL and SQLite. These RDBMS obey ACID properties for transactions(a collection of instructions), which means after a transaction successfully completes, changes to data persist and are not undone, even in the event of a system failure. Moreover, Structured Query Language(SQL) is the standard query language that is used for operations such as storing, manipulating, and retrieving data in relational databases. One of the advantages of relational databases is that you can quickly join together multiple tables, which would help you understand the relationships between the data, or how the tables connect.
Non-Relational Database
In essence, a Non-Relational Database(NoSQL database) is a database with a data model that is non-tabular, hence it stores data in ways different from Relational Databases; this is why it is called non-relational. The name “NoSQL” typically refers to not-just-SQL. Depending on the data model, there are four types of NoSQL databases: Key-value stores, Graph stores, Column stores, and Document stores. NoSQL databases are commonly utilized for big data and web apps that demand high read/write throughputs. Currently, there is no standardized query language for NoSQL databases. One of the advantages of non-relational databases is that the flexibility and usability of the different data models can boost application development in comparison to the relational model, especially in the cloud computing environment.
Relational vs. Non-Relational
In comparison to relational databases, non-relational databases are often more scalable and provide better read/write performance because NoSQL databases typically follow the BASE model instead of the ACID model for transaction consistency. This means transactions in NoSQL databases may only be eventually consistent. However, note that the performance and scalability gap between relational and non-relational databases on the cloud are diminishing due to recent advances in database technologies.
You may read more about their differences in this post, which provides a comprehensive overview of SQL and NoSQL.
Benefits of using DBaaS
Cost Efficiency
You only pay for the resources that you have provisioned. There is no overhead expense for maintaining the physical hardware that the database runs on. Also, there is no large upfront cost because you can simply purchase resources such as capacity and performance when you need it.
Scalability
Scalability is important because it contributes to the competitiveness, efficiency, reputation, and quality of your service. With DBaaS, you can build applications with virtually unlimited throughput and storage.
Improve Developer Velocity
DBaaS allows you to focus more on developing cool features rather than having to deal with the complexity of managing database infrastructure. This typically means you can finish your product earlier.
Disaster Recovery
IT disasters such as data center failures, server corruptions, or cyber-attacks can not only disrupt your service, but also cause data loss, impact your revenue, and damage your reputation. Data in cloud databases are typically replicated across multiple data centers for disaster recovery. This means even in the event of a disaster(natural or not), your data can still be recovered, reducing downtime and protecting against data loss.
Drawbacks of Using DBaaS
Lack of Control Over Physical Hardware
Outsourcing your database to a third party may impose some challenges for debugging and handling unexpected events. It also means that any server-side optimization is impossible because you do not have the control.
Domain of Responsibility
When data is lost or hardware goes rogue and affects your data, the question can be who has the responsibility for the data that was impacted.
How to Start Using DBaaS
The first step is to select a type of database(SQL vs. NoSQL) that works best for your service requirements. For example, if you are building a service that requires strongly consistent transactions, then relational databases may be worth looking at. On the other hand, if your service works with non-tabular data models, then you should use a NoSQL database. While most cloud providers offer both SQL and NoSQL databases as a service, they also provide additional features that are outside the scope of this post. As such, it is essential to distinguish between the features that you need and the ones that you do not need and pick the DBaaS that best fits your service requirements. As a starting point, I recommend you to check out AWS Aurora for a fully-managed RDBMS that also scales well, AWS DynamoDB for NoSQL Key-Value stores, and Google’s Cloud BigTable for NoSQL wide-column stores. Overall, finding the right DBaaS provider for your service involves determining which database technologies will work best for your application and then, of course, ensuring that your provider supports that technology.
Summary
Database-as-a-Service(DBaaS) is a cloud computing service that lets users access and use a cloud database without having to set up physical hardware, install software, or configure it for performance. Service Level Agreements(SLA) defines the level of service expected by a user from a provider. DBaaS is very popular among application developers who are interested in a faster time-to-market and increased scalability and security for their applications. Some benefits of using DBaaS include Cost Efficiency, Scalability, Improve Developer Velocity, and Disaster Recovery. If you want to get started using DBaaS, you must determine the database technologies that you wish to use, and find a cloud provider that offers it as a service. As a starting point, I recommend AWS DynamoDB for a NoSQL key-value store because it is relatively easy to grasp and works well for most service requirements.
References
“About Database as a Service (DBaaS).” About Database as a Service (DBaaS), 15 Mar. 2012, docs.oracle.com/html/E28814_01/cloud_db_overview.htm.
“DBaaS.” IBM, www.ibm.com/cloud/learn/dbaas.
Hong, Rami. What Is Database-as-a-Service? 13 Oct. 2019, www.stratoscale.com/blog/dbaas/what-is-database-as-a-service/.
NoSQL vs SQL Databases. www.mongodb.com/nosql-explained/nosql-vs-sql.
“What Is a Relational Database?” Oracle, www.oracle.com/database/what-is-a-relational-database/.
“What Is DBaaS (Database-as-a-Service).” Nutanix, www.nutanix.com/info/what-is-dbaas.
Yehuda, Yaniv. “Eight Benefits of DBaaS - DZone Cloud.” Dzone.com, DZone, 17 Aug. 2016, dzone.com/articles/eight-benefits-of-dbaas.
Comments