02.01 relational databases
TRANSCRIPT
![Page 1: 02.01 relational databases](https://reader038.vdocuments.net/reader038/viewer/2022100604/559a6bf51a28abb8028b45ec/html5/thumbnails/1.jpg)
B Y B I S H A L G H I M I R E
B I S H A L . G H I M I R E @ G M A I L . C O M
Relational Databases
![Page 2: 02.01 relational databases](https://reader038.vdocuments.net/reader038/viewer/2022100604/559a6bf51a28abb8028b45ec/html5/thumbnails/2.jpg)
The Relational Model
More then 35 year old
Used by all major commercial database systems
Very Simple Model
Query with High-Level Languages: Simple yet expressive
Efficient implementation
![Page 3: 02.01 relational databases](https://reader038.vdocuments.net/reader038/viewer/2022100604/559a6bf51a28abb8028b45ec/html5/thumbnails/3.jpg)
The Relational Model
Database = set of named relations ( or tables )
Each relation has a set of named attributes ( or columns )
Each tuple ( or row ) has a value for each attribute
Each attribute has a type ( or domain )
ID Name GPA
1001 Ram 3.5
1002 Sita 3.8
ID Name City
101 LBF KTM
102 ICA PKR
Students Colleges
![Page 4: 02.01 relational databases](https://reader038.vdocuments.net/reader038/viewer/2022100604/559a6bf51a28abb8028b45ec/html5/thumbnails/4.jpg)
The Relational Model
Schema Structural description of relations in database
Instance Actual Contents at given point in time
NULL Special Value for “unknown” or “undefined”
Key Attribute whose value is unique in each tuple
OR Set of attributes whose combined values are unique
E.g.- CREATE TABLE Student ( name STRING, GPA integer)