A database is an organized collection of structured information or data stored electronically in a computer system. Controlled by a Database Management System (DBMS), it allows users to store, manage, modify, and query data efficiently.
Why Databases Are Used
Compared to traditional flat-file storage or spreadsheets, databases provide distinct operational advantages:
- Efficient Data Retrieval: Indexes and query languages (like SQL) allow systems to search millions of records in milliseconds.
- Data Integrity & Consistency: Schema rules prevent duplicate records, enforce data types, and ensure updates propagate across all dependent entries.
- Concurrent Access: Multiple users and applications can read and write to the same database simultaneously without overwriting each other's changes.
- Scalability: Built to handle massive volumes of data (terabytes to petabytes) across distributed networks as demand grows.
- Security & Access Control: Fine-grained permissions restrict who can view or modify specific tables, rows, or sensitive fields.
- ACID Compliance: Ensures reliable processing of transactions—guaranteeing that complex operations either complete fully or roll back, preventing data corruption.
Common Types of Databases
| Category | Key Characteristic | Primary Use Cases | Examples |
| Relational (RDBMS) | Data stored in structured tables with defined relationships | Financial systems, HRMS, inventory, order processing | MySQL, PostgreSQL, Oracle |
| Non-Relational (NoSQL) | Unstructured or semi-structured data using key-value, document, or graph models | Real-time analytics, big data, social networks, content platforms | MongoDB, Redis, Cassandra |
| In-Memory | Relies on main memory (RAM) rather than disk for storage | High-speed caching, real-time gaming leaderboards | Redis, Memcached |
| Distributed / Cloud | Spread across multiple nodes or managed cloud environments | High availability apps, global web platforms | Amazon DynamoDB, Google Cloud Spanner |