# Traditional Database vs DBaaS Architecture


![left](./student-guide/diagram/TraditionalDatabase_en_001_20220525.png)
![right](./student-guide/diagram/DBaaSArchitecture_en_001_20220525.png)
------------------------------------------------------------
How DbaaS came about..

Managed database service better than on-prem because

Physical Infrastructure unlimited

Fewer management requirements and responsibilities 

Automated –creation, backup, monitoring, recovery/repair,scaling security, multitenancy

Security  and isolation 
cost of hardware eliminated

Like SAAS (Software as a Service) and PAAS (Platform as a Service), Database is also being offered as a Service, known as Database as a Service (DBaaS).

DBaaS offering is also known as Cloud Database as it runs on the Cloud Computing Platform.

Cloud Database (DBaaS) Architecture:
Cloud Database or DBaaS concept does not carry or deploy their own Database but instead, rent out the Database and use it as a Service. The Architecture for the Traditional as well as DBaaS is shown above. 

In Traditional Database we have on-premise Database Servers, and Application / Analytics Servers to host the Applications and dedicated or Private Connections to connect to the Database. The Company owns all the Servers and must bear the entire cost associated with Procurement, Installation, and Maintenance of the Database.

The Cloud Database is hosted by various Service providers and is available over Public Cloud Network, to be rented out. The Company availing the service saves on the Procurement, Installation and Maintenance cost of the Database.
The Architectural Diagram is as shown

Pros and Cons
Building and maintaining a traditional database can be very costly, time-consuming and it can be a difficult process to manage, especially for businesses with limited resources with small and medium Database requirements. 

DBaaS means businesses, big and small, can size their database to meet their needs and their budget, and dynamically scale their DB requirements as things change from day-to-day and year-to-year. 

DBaaS – (Cloud-based database) offerings bundle together a package of data management services where companies don't have to deploy and manage their own DB Servers and Infrastructure, the Databases are hosted and managed by a third party and access by users on Cloud across the Globe at a price.

Apart from these, there are many other factors which demanded a need for a Cloud-based DBaaS as against the traditional method. Some of them are mentioned below
    - Need to manage huge volumes of data.
    - Operational efficiency. (Cost of storing and maintaining such huge volume of data is highly reduced) and
    - Strengthened disaster recovery and business continuity.

Advantages of using DBaaS / Cloud Database   
    - Highly Scalable – near Infinite Data Storage Capacity. 
    - Cost-Effectiveness – This is the biggest advantage where you pay for what you use…also, the cost of hardware and networking is eliminated.
    - For businesses struggling to manage their data, the cloud can provide a low-cost alternative to investing in infrastructure to manage it all on their own sites. 
    - For DBaaS, the company pays for what it uses and for the time it uses. Its infinite scalability is a big advantage when it comes to increased or reduce storage space. 
    - The Database Licensing and renewal cost is borne by the Service provider and the business need to invest in that.
    - Data Security and Business Continuity are also taken care of by the Service Provider.

There are some obvious disadvantages of this DB Managed Service as below

Disadvantages of using DBaaS
    - No Direct access control to the Database. If something goes wrong, you are helpless. 
    - No Control on the physical safety of the Servers. In the case of Natural Calamity at a place where your server resides or the system going down, you might have to face downtime if not Data loss.
    - You are at the mercy of the Cloud Database server management without direct control for your sensitive data. 
    - For Smaller companies or Mid-size databases (DB size <1 TB), it might be worth maintaining their own DB servers over a period maintaining your own DB Server does become cost-effective. 

Comparison between on-premises Traditional Database and Cloud DBaaS 




