Database Documentation For Carely
Database Documentation For Carely
Introduction
This document outlines the database setup and structure for the Carely. It details
the current configuration using PostgreSQL hosted on Microsoft Azure, along with
considerations for using a paid backup service for the production environment. The
aim is to ensure reliable, secure, and scalable storage of customer and appointment
data both in development and production settings.
Database Overview
Current Database Setup:
The Barbershop Appointment app uses PostgreSQL, an open-source relational database
management system, hosted on Azure. The PostgreSQL database is used to store customer
details, appointment information, employee data, and barbershop branch details. Azure
was chosen due to its scalability, high availability, and built-in security features such as
encryption at rest and role-based access control. Current Database Setup: Database
Service: Azure PostgreSQL Primary Use: Storing customer details, appointment schedules,
employee profiles, and branch information.
Production Backup Plans:
Amazon RDS for PostgreSQL – AWS
Azure Database for PostgreSQL – Azure
Cloud SQL for PostgreSQL – Google Cloud
PostgreSQL on IBM Cloud – IBM
Overview
AWS offers Amazon RDS (Relational Database Service) for PostgreSQL, a fully managed database
solution that provides scalability, reliability, and security. AWS manages backups, patching, and
scaling for you, ensuring high availability.
Security Features
Encryption at Rest: Supports encryption using AWS Key Management Service (KMS).
Encryption in Transit: Supports SSL/TLS encryption for data in transit.
IAM Integration: Allows for role-based access control using AWS Identity and Access
Management (IAM).
VPC Isolation: Data can be isolated within a private Virtual Private Cloud (VPC).
Automated Backups: Automated backups with a retention period of up to 35 days.
Backup Strategy
Automated Backups: Daily snapshots and transaction log backups.
Point-in-Time Recovery: Ability to restore the database to any point within the backup
retention period.
Manual Snapshots: Users can create manual snapshots at any time, which are retained until
explicitly deleted.
Pricing
On-Demand Pricing: Starts at $0.038 per hour for db.t3.micro (for small instances).
Storage Costs: $0.10 per GB for General Purpose (SSD) storage.
Backup Costs: Backup storage is free up to the database size, then costs $0.095 per
GB/month.
Data Transfer Costs: Free for inbound data, but outbound data transfer costs can add up.
Example Pricing (db.t3.micro instance):
Hourly Cost: $0.038
Monthly Cost: Approximately $28/month for a small instance.
Use Case
AWS is best suited for large-scale, scalable production environments with high traffic, offering robust
backup and security options.
Encrypti
on,
Amazon
Up to IAM,
RDS for $28/
AWS 35 VPC Yes
Postgre month
days Isolatio
SQL
n,
SSL/TLS
Encrypti
Azure on,
Databas Manage
7 to 35 $50/
Azure e for d Yes
days month
Postgre Identity,
SQL VNet,
SSL/TLS
IAM,
Cloud Encrypti
Googl Up to
SQL for on, $22/
e 365 Yes
Postgre Private month
Cloud days
SQL IP,
SSL/TLS
Encrypti
Postgre on, VPC,
IBM SQL on 7 to 30 SSL, $61/
Yes
Cloud IBM days Role- month
Cloud Based
Access