SQL Roots
- Developed @IBM Research in the 1970s
- Commercialized /Popularized in the 1980s
Relational Terminology
- Database: Set of named Relations
- Relation(Table):
- Schema: description("metadata")
- Instance: set of data satisfying the schema
- Attribute(Column, Field)
- Tuple(Record, Row)
- Schema is fixed
- unique attribute names,atomatic types
- folks
- Instance can change often
SQL Language
- Two sublanguage:
- DDL - Data Definition Language (Define and modify schema)
- DML - Data Manipulation Language (Queries can be written intuitively)
- RDBMS responsible for efficient evaluation.
- Choose and run algorithmns for declarative queries(Choice of algorithm must not affect query answer)
Basic Single -Table Queries: