What is a relational database?
Answer
A relational database organizes data into tables (also called relations) consisting of rows (records/tuples) and columns (fields/attributes). Tables are related to each other through keys — a primary key uniquely identifies each row, and a foreign key in one table references the primary key of another, establishing relationships. This model was proposed by E.F. Codd in 1970. Key principles: data is stored in normalized tables to eliminate redundancy; relationships are defined through keys; data integrity is enforced through constraints; SQL is used to query and manipulate data; ACID properties (Atomicity, Consistency, Isolation, Durability) ensure reliable transactions. Popular relational databases: MySQL, PostgreSQL, Oracle Database, Microsoft SQL Server, SQLite, MariaDB. Contrast with NoSQL databases (MongoDB, Cassandra, Redis) which store data in documents, key-value pairs, or other non-tabular formats and sacrifice some consistency for flexibility and scale.