Using Database
Database Concepts
🎯 Exam Objectives
Track your learning progress! Click each objective as you master it:
- Differentiate relational and non-relational database designs
- Understand SQL queries and table structures (keys, rows, columns)
- Compare self-managed vs. provider-managed (DBaaS) deployment options
- Explain direct vs. cross-service database migration strategies
🗄️ 6.14 & 6.15 Database Types
Data is commonly stored in databases. There are two primary types, each with distinct characteristics and use cases.
Relational Databases
These databases have been around for a long time, are relatively secure, and are well understood. They use tables to store data and link table information using keys.
- Column: Data attributes (e.g., Name, Address)
- Row: Instances of that data (specific customer records)
- Primary Key: Ensures no data in a row is duplicated (e.g., Customer_ID)
- Foreign Key: Refers to primary keys in other tables to establish relationships
| Customer_ID PK | Name | Address | Phone_Number | Email_Address |
|---|---|---|---|---|
| 1000 | Kai Garcia | 33 First Street | (123) 456-7890 | k.garcia@example.com |
| 1001 | Jane Doe | 22 Second Street | (123) 890-4567 | j.doe@example.com |
| 1002 | John Smith | 11 Third Street | (987) 654-3210 | j.smith@example.com |
This query retrieves specific customer ID numbers and names from the database.
Non-Relational Databases (NoSQL)
Not all data fits neatly into tables. The prominent use of big data necessitates a different way of storing information. NoSQL solutions are designed to hold unstructured information organized by type, offering great flexibility, application scalability, and rapid data growth.
Four Common NoSQL Types:
Cloud Service Provider Examples
☁️ 6.17 Database Deployment Options
Cloud services offer two primary database deployment options. Click on each card to explore the advantages and disadvantages.
🏢 Self-Managed Databases
Handled by internal staff, hosted on-premises, private cloud, or public cloud IaaS.
✅ Advantages
- Full control of data
- High flexibility
- Avoids vendor lock-in
- Control over DB choices
❌ Disadvantages
- Significant time/resource investment
- Requires deep technical skills
- Long-term commitment
🛠️ Provider-Managed (DBaaS)
Database as a Service. Infrastructure and deployments managed by the CSP.
✅ Advantages
- Maintenance-free / support provided
- Built-in automation & scalability
- Pay-as-you-go cost model
- Structured deployment
❌ Disadvantages
- Possible vendor lock-in
- Public cloud security concerns
- Fewer customization options
- Data sovereignty issues
🔄 6.18 Migrate Databases
Database migrations present unique challenges compared to virtualized systems. A critical factor is availability. Most services provide replication during the transfer process so that changes written to the original database are replicated to the new host automatically, ensuring minimal downtime.
Migration Strategies
Example: MS SQL Server → MS SQL Server
Example: Oracle → Amazon Aurora