An overview of databases, their importance in modern computing, and the basic concepts including data models, schemas, and relationships.
Introduction to Databases – Study Notes
| Concept | Description |
|---|---|
| Definition | An organized collection of data that can be stored, retrieved, and manipulated electronically. |
| Purpose | To provide efficient, reliable, and secure access to information for applications, users, and systems. |
| Key Characteristics | • Structured storage • Persistent (data remains after power loss) • Supports multiple concurrent users • Enforces data integrity and security |
| Term | Meaning |
|---|---|
| Table (Relation) | A set of rows (records) and columns (fields) that stores data of a single entity type. |
| Row (Record/tuple) | One complete entry in a table; contains a value for each column. |
| Column (Attribute) | A named data element that defines the type of information stored (e.g., CustomerID, Name). |
| Primary Key | A column (or combination) that uniquely identifies each row in a table. |
| Foreign Key | A column that creates a link between two tables by referencing the primary key of another table. |
| Index | A data structure (often B‑tree) that speeds up search and retrieval operations. |
| Schema | The logical design of the database: tables, columns, relationships, constraints, and other objects. |
| Transaction | A unit of work that must be atomic, consistent, isolated, and durable (ACID). |
| Normalization | Process of organizing data to reduce redundancy and improve integrity (1NF, 2NF, 3NF, BCNF, etc.). |
| Category | Typical Use‑Cases | Examples |
|---|---|---|
| Relational DBMS (RDBMS) | Structured data, complex queries, strong ACID guarantees | MySQL, PostgreSQL, Oracle, Microsoft SQL Server |
| NoSQL | Large‑scale, flexible schema, high‑velocity data | MongoDB (document), Cassandra (wide‑column), Redis (key‑value), Neo4j (graph) |
| In‑Memory DBMS | Real‑time analytics, caching | SAP HANA, Redis |
| NewSQL | Combines SQL interface with NoSQL scalability | CockroachDB, Google Spanner |
| Time‑Series DB | Sensor data, monitoring logs | InfluxDB, TimescaleDB |
| Graph DB | Social networks, recommendation engines | Neo4j, Amazon Neptune |
External Level (View)
Conceptual Level (Logical Schema)
Internal Level (Physical Schema)
| Category | Command | Example |
|---|---|---|
| Data Definition Language (DDL) | CREATE TABLE, ALTER TABLE, DROP TABLE |
CREATE TABLE Customers (CustomerID INT PRIMARY KEY, Name VARCHAR(100)); |
| Data Manipulation Language (DML) | INSERT, UPDATE, DELETE, |