ACTIVITY 2_Database Relational Model
ACTIVITY 2_Database Relational Model
IS2-1-01
Explain what the relational model is and why it is important in database management.
The Relational Model, proposed by Edgar F. Codd in 1970, provides an organized manner to
organize and manage data using tables made up of rows (records) and columns (attributes).
This model is essential for database management because it provides data integrity,
consistency, and efficient retrieval via SQL, a language later developed by Donald D.
Chamberlin and Raymond F. Boyce. Codd’s work, which was later refined by Chris Date, set the
groundwork for modern database systems such as MySQL, PostgreSQL, and Oracle, which use
relational principles to store and handle vast volumes of structured data efficiently.
Key Components of the Relational Model (Define and provide examples of the following)
Relation (Table)- Relation (table) A relation, often known as a table, is a set of data
structured into rows and columns. It refers to a distinct entity, such as students or
employees. For example a Students database with columns like Student_ID, Name,
Age, and Course.
Domain – Domain A domain is the collection of all the values that an attribute can take.
It maintains data consistency by limiting the types of values allowed in a column. For
example, the Age attribute in the Students table may only accept integers between 18
and 30.
Primary Key- A primary key is a unique identifier for every record in a table. It assures
that no two rows share the same value in this column. For example, Student_ID in the
Students table is a primary key since each student has a unique ID.
Foreign Key- A foreign key is a table attribute that links to another table’s primary key. It
maintains referential integrity among connected tables. For example, a Course_ID in the
Students table can be used as a foreign key to the Courses table.
Operations in the Relational Model
Briefly explain and give an example of each of the following relational operations:
SELECT (σ) – Selection: The selection operation retrieves rows (tuples) from a table that meet
a specific condition.
PROJECT (π) – Projection: The projection operation retrieves specific columns (attributes)
from a table, removing duplicates.
Example: To display only Student_ID and Name from the Students table: π(Student_ID, Name)
(Students)
UNION ( ∪ ): The union operation combines the results of two tables with the same structure,
removing duplicates.
INTERSECT ( ∩ ): The intersect operation returns the common rows that appear in both tables.
Example: To find students present in both Students1 and Students2 tables: Students1 ∩
Students2
DIFFERENCE ( - ): The difference operation returns rows that exist in one table but not in
another.
CARTESIAN PRODUCT ( × ): The Cartesian product combines every row from the first table
with every row from the second table, creating a new table with all possible combinations.
Example: If Students has 3 rows and Courses has 2 rows, their Cartesian product will have 3 ×
2 = 6 rows: Students × Courses
JOIN: The join operation combines related rows from two tables based on a common attribute
(foreign key).
Summarize your learnings and discuss the importance of the relational model in real-
world
Database application
The Relational Model is a key idea in database administration that divides data into organized
tables (relations) with rows (tuples) and columns (attributes). It uses relational operations like as
SELECT, PROJECT, JOIN, and UNION to assure data integrity, consistency, and rapid retrieval.
The model also employs keys (primary and foreign) to maintain relationships between tables,
reducing redundancy and improving data accuracy. The relational model is widely used in real-
world applications such as banking, healthcare, e-commerce, and education to efficiently
manage large amounts of structured data. This paradigm is used by popular databases such as
MySQL, PostgreSQL, and Oracle to store and retrieve data in a safe, scalable, and reliable
manner. Its capacity to conduct complicated queries, manage relationships, and impose
restrictions makes it a crucial component of any modern database application.