Fundamentals of Databases¶
Core concepts underlying relational database systems:
Data Model: A formal description of data structure, operations, and constraints. The relational model represents data as tables (relations) with rows (tuples) and columns (attributes).
Schema vs Instance: The schema defines the structure; an instance is the data at a point in time.
Keys: Attributes that uniquely identify tuples — candidate keys, primary keys, foreign keys.
Referential Integrity: Foreign key values must reference existing primary key values in the related table.
Relational Algebra: The formal query language underlying SQL — select (\(\sigma\)), project (\(\pi\)), join (\(\bowtie\)), union, intersection, difference.
SQL: The standard language for defining (DDL), manipulating (DML), and controlling (DCL) relational databases.