Introduction to the Relational Model
Topic: Tables, Rows, Columns, Domains, and Schemas
1. Objective:
By the end of this lab, students will be able to:
Explain the basic concept of the relational model.
Understand a relation/table.
Identify rows and columns in a relation.
Understand the concept of a domain.
Understand the meaning of a schema.
Differentiate between a table, row, column, and domain.
Create a simple relational table using MySQL Workbench.
Inspect a table structure using MySQL.
Relate theoretical concepts of the relational model to an actual database table.
2. HARDWARE AND SOFTWARE REQUIRED:
Hardware
PC/Laptop
Keyboard and Mouse
Internet connection
Software
MySQL Server
MySQL Workbench
Windows/Linux/macOS
Other Requirements
LMS access
Lab 01 database environment
Folder for screenshots and SQL files
3. INTRODUCTION TO RELATIONAL MODEL
The relational model is a database model in which data is organized into relations.
In practical database systems, a relation is commonly represented as a table.
For example:
STUDENT:
Student_ID Name Program Semester
101 Ali BSCS 3
102 Sara BSAI 2
103 Ahmed BECSE 4
This table represents student-related data.
1|Page
, DATABASE SYSTEMS LAB MANUAL
4. WHAT IS A RELATION?
In the relational model, a relation represents a collection of related data.
In a practical database, we usually see a relation as a table.
For example:
Student
can be represented as:
Student_ID Name Program
101 Ali BSCS
102 Sara BSAI
Here, Student is the relation/table.
5. WHAT IS A ROW?
A row represents one record in a table.
Example:
Student_ID Name Program
101 Ali BSCS
The complete record:is one row.
6. WHAT IS A COLUMN?
A column represents a particular attribute or type of information.
In the following table:
Student_ID Name Program
101 Ali BSCS
102 Sara BSAI
7. WHAT IS A DOMAIN?
A domain defines the set of valid values that can be stored in a particular attribute/column.
For example:
Age :A domain might contain:
18, 19, 20, 21, 22...
Semester: A suitable domain might contain:
1, 2, 3, 4, 5, 6, 7, 8
Student_Name
The domain consists of valid text values representing student names.
In MySQL, data types help define what kind of values a column can store.
For example:
Student_ID INT
and:
Student_Name VARCHAR(50)
8. WHAT IS A SCHEMA?
A database schema describes the structure of a database.
It defines things such as:
Tables
Columns
2|Page