Database (RDS)
What is Data?
Data refers to individual facts, statistics, or items of information that are collected, stored, and processed. It can be in various forms, such as numbers, text, images, audio or video. Data can be structured (organized in a defined format like tables or spreadsheets), semi-structured (like JSON or XML) or unstructured (like text documents or social media posts).
What is a Database?
A database is an organized collection of data that allows for easy storage, retrieval, manipulation and management of information. Databases are designed to efficiently handle large amounts of data, ensuring that the data is easily accessible and can be modified as needed.
Types of Databases
Hierarchical Databases
- Description: Organize data in a tree-like structure, where each record has a single parent (one-to-many relationships).
- Key Features: Data is accessed through a parent-child relationship.
- Examples: IBM Information Management System (IMS).
Network Databases
- Description: Similar to hierarchical databases but allows more complex relationships through a graph structure, where each record can have multiple parents and children.
- Examples: Integrated Data Store (IDS).
Object-Oriented Databases
- Description: Store data in the form of objects, similar to object-oriented programming. They can handle complex data types and relationships.
- Key Features: Support for inheritance, encapsulation, and polymorphism.
- Examples: db4o, ObjectDB.
NoSQL Database:
- Description: NoSQL databases are designed to handle unstructured or semi-structured data, meaning they can store data in flexible, dynamic formats. These databases are typically used when data doesn’t fit neatly into tables with rows and columns, or when scalability is a priority.
Data Formats: NoSQL databases can store data in various formats such as:
- Key-value pairs: Each item is stored as a key and an associated value. Example: Redis
- Documents: Data is stored in document format (often JSON or BSON). Example: MongoDB
- Column-family: Data is stored in columns instead of rows, making it efficient for certain types of queries (e.g., large-scale data storage). Example: Cassandra
- Graphs: Data is represented as nodes and edges, making it ideal for handling relationships. Example: Neo4j
Examples:
- MongoDB (document-based)
- DynamoDB (key-value, document-based, managed by AWS)
- Redis (key-value)
- Cassandra (column-family)
- Neo4j (graph-based)
Relational Databases
- Description: Relational databases store data in tables with rows and columns. Each row represents a record, and each column represents an attribute of that record. These databases use SQL (Structured Query Language) to manage and query data.
Key Features:
- Schema-based: Data is structured according to a predefined schema (i.e., tables, columns, data types).
- ACID Transactions: They support ACID properties (Atomicity, Consistency, Isolation, Durability), ensuring data integrity even in complex transactions.
- Relationships: Relationships between tables are defined using foreign keys to link data across tables.
Examples:
- MySQL (open-source)
- MariaDB (fork of MySQL, open-source)
- PostgreSQL (open-source, highly extensible)
- Oracle (commercial, widely used in enterprise environments)
- Microsoft SQL Server (commercial, commonly used in enterprise environments)
RDS (AWS Relational Database Service)
Amazon Relational Database Service (RDS) is a managed service provided by AWS that simplifies the process of setting up, operating, and scaling relational databases in the cloud. It takes care of routine database tasks such as backups, patch management, and hardware provisioning, so we can focus on our application.
Get D-Adda’s stories in your inbox
Join Medium for free to get updates from this writer.
It is a region specific service.
We can take back up and share database from one region to another region using snapshot.
Key Features of Amazon RDS
1.Multiple Database Engines: RDS supports various database engines, including:
- MySQL
- PostgreSQL
- MariaDB
- Oracle
- SQL Server
- Amazon Aurora (a high-performance database compatible with MySQL and PostgreSQL)
2. Managed Service: RDS handles routine database tasks like:
- Backups: Automatic backups are taken daily, and we can restore our database to any point in time within the backup retention period.
- Patching: RDS automatically applies patches and updates to the database engine.
- Monitoring: AWS CloudWatch monitors performance metrics and health of our database.
3. Scalability: We can easily scale our database’s compute and storage resources as our application grows. We can also create read replicas to enhance performance.
4. High Availability: With Multi-AZ (Availability Zone) deployments, RDS provides automatic failover to a standby instance in case the primary instance fails, ensuring minimal downtime.
5. Security: RDS offers features like:
- Encryption: We can encrypt our data at rest and in transit.
- VPC: RDS can be deployed in a Virtual Private Cloud for enhanced security.
- IAM Integration: We can use AWS Identity and Access Management (IAM) for access control.
6. Cost-Effective: RDS offers a pay-as-you-go pricing model, meaning we only pay for what we use. There are also options for Reserved Instances for long-term savings.
7. Monitoring and Metrics:
- Amazon CloudWatch: Provides metrics for CPU utilization, storage, read/write throughput and more.
- Enhanced monitoring: Get deeper insights into operating system-level metrics for RDS instances.
Setting Up an RDS Instance:
- Choose a database engine (e.g., MySQL, PostgreSQL).
- Select an instance type based on your required resources (e.g., db.t3.micro for low usage, db.m5.large for higher workloads).
- Configure instance settings like DB instance identifier, master username and password.
- Set up storage (storage size and type).
- Configure networking: Choose a VPC, security groups, and subnet.
- Enable backups and monitoring based on your needs.
Limitations:
- Storage limits: RDS has limits for the maximum size of databases and the number of instances per region.
- No root access: RDS does not provide direct root access to the underlying OS of the database instance.
- Some configurations may not be fully customizable: RDS abstracts many administrative details, so it might not be suitable for all use cases, especially those needing full control over the system.
Use Cases for Amazon RDS
- Web Applications: For dynamic websites that need a reliable backend database.
- Mobile Applications: To store user data and application state.
- Analytics: For running queries and analysis on structured data.
- Enterprise Applications: For business applications that require robust databases.







