NEW
Also known as: Data Table
Structured set of rows and columns storing related records in a database.
DESCRIPTION
In relational databases, a table organizes data into rows and columns with defined types and constraints. Keys enforce uniqueness and relationships, while indexes optimize access. Tables underpin SQL operations and normalization practices. They are the foundation for transactional systems and analytical warehouses. Views and materialized views expose table subsets or precomputed results. Proper design balances integrity, performance, and maintainability.
ALTERNATIVE DEFINITIONS
Wikipedia
In relational databases and flat file databases, a table is a set of data elements (values) using a model of vertical columns and horizontal rows.
Highlights rows and columns as the organizational model.
Microsoft Learn
A table is a database object that stores data in rows and columns.
Defines tables explicitly as a database object with rows and columns.
RELATED TERMS
Tuple Attribute Primary Key Foreign Key Data Schema Index View SQL Feature Scaling Constraints
COMPETING TERMS
Document Store Key-Value Store Graph Database
RELATIONS
- Narrower: Closure Table Contingency Table Dimension Table Fact Table Frequency Table Hash Table Rainbow Table Relational Table Sparse Table Temporary Table
KNOWLEDGE AREAS
Data Modeling Data Storage & Operations Data Engineering Data Warehousing & BI
TARGET AUDIENCE
Data Engineer Data Modeler Data Architect Software Developer BI Specialist Data Analyst
EXTERNAL SOURCES
- Wikipedia - Table (database)
- PostgreSQL - Data definition language overview
- Microsoft Learn - SQL Server table documentation
- MySQL - CREATE TABLE syntax
- Oracle - Oracle CREATE TABLE reference
TOP QUESTIONS
What is the role of a Table in relational databases?
Tables store structured records with schema-defined columns. They enable SQL operations, constraints, and relationships through keys.
Category: Definition
How do primary and foreign keys relate to Tables?
Primary keys uniquely identify rows; foreign keys reference other tables to enforce relational integrity.
Category: Best practices
What are common performance issues with Tables?
Missing indexes, over-normalization, and poor partitioning can slow queries. Analyzing execution plans helps diagnose issues.
Category: Performance
How do Views differ from Tables?
Views are virtual tables defined by queries; materialized views persist results for performance.
Category: Comparison
What is a common mistake when designing Tables?
Ignoring data types and constraints leads to integrity problems. Poor naming and missing documentation hinder maintenance.
Category: Mistakes
How does normalization affect Tables?
Normalization reduces redundancy and anomalies by decomposing tables; however, it can increase join complexity.
Category: Opinion
How do columnar formats relate to Tables?
Analytical systems often use columnar storage for performance, but logical tables still represent the dataset.
Category: Comparison
How should Tables be documented?
Use catalogs with column definitions, constraints, lineage, and usage notes. Keep schema evolution tracked.
Category: Best practices
When should you denormalize a Table?
Denormalize for read-heavy analytics to reduce joins, but manage consistency and write complexity.
Category: Opinion