Database
An organized collection of structured information or data, typically stored electronically in a computer system.
Purpose of Databases
To store, retrieve, and manage data efficiently and securely.
Relational Database
Organizes data into tables consisting of rows and columns, using SQL for data manipulation.
DBMS (Database Management System)
Software that uses a standard method to store and organize data, providing an interface between users and the database.
NoSQL Database
Designed for unstructured or semi-structured data, with flexible schema and horizontal scalability.
SQL (Structured Query Language)
A language used for managing and manipulating relational databases.
Document Store
A type of NoSQL database that stores data in document formats like JSON or BSON (e.g., MongoDB, CouchDB).
Key-Value Store
A NoSQL database that stores data as a collection of key-value pairs (e.g., Redis, Amazon DynamoDB).
Column-Family Store
A NoSQL database that stores data in columns rather than rows (e.g., Apache Cassandra, HBase).
Graph Database
Uses graph structures with nodes, edges, and properties to represent and store data (e.g., Neo4j, Amazon Neptune).
Hierarchical Database
Organizes data in a tree-like structure (e.g., IBM Information Management System).
Network Database
Allows many-to-many relationships and more flexible data organization than hierarchical databases (e.g., Integrated Data Store).
ACID Properties
Ensures reliable transactions: Atomicity, Consistency, Isolation, Durability.
Data Definition
Using DDL (Data Definition Language) to define and modify database schema (e.g., CREATE, ALTER, DROP).
Data Manipulation
Using DML (Data Manipulation Language) to insert, update, delete, and retrieve data (e.g., SELECT, INSERT, UPDATE, DELETE).
Data Control
Using DCL (Data Control Language) to manage user permissions and access (e.g., GRANT, REVOKE).
Atomicity
Ensures all operations within a transaction are completed successfully.
Consistency
Ensures the database is in a valid state before and after a transaction.
Isolation
Ensures transactions do not interfere with each other.
Durability
Ensures committed transactions remain so even after a system failure.
Concurrency Control
Manages simultaneous data access to ensure consistency and prevent conflicts.
Data Security
Protects data from unauthorized access and breaches.