A database table is the core structure used to store data in a relational database. Think of it as a grid or spreadsheet where each row represents a record and each column represents a field or attribute of that record.
Anatomy of a Table
- Rows: Each row (also called a record or tuple) holds a single instance of data.
- Columns: Each column defines a specific attribute, with a name and data type.
- Data Types: Columns are typed—e.g.,
INTEGER,VARCHAR,DATE— to control what kind of data they hold. - Constraints: Tables can enforce rules like
PRIMARY KEY,FOREIGN KEY,NOT NULL,UNIQUE, etc.
Nasdanika Models