Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

relational database models

Rating
-
Sold
-
Pages
5
Uploaded on
12-10-2021
Written in
2021/2022

This document explains about relationship between different data sets

Institution
Course

Content preview

3. RELATIONAL DATABASE MODELS
The relational model is today the primary data model for commercial data processing
applications. It attained its primary position because of its simplicity, which eases the job of the
programmer, compared to earlier data models such as the network model or the hierarchical
model.
The relational model uses a collection of tables to represent both data and the relationships
among those data. Tables are logical structures maintained by the database manager. The
relational model is a combination of three components;
 Structural part – this defines the database as a collection of relations.
 Integrity part – Integrity in a database is maintained in a relational model using primary
and foreign keys.
 Manipulative part – these are tools that are used to manipulate data in a database, usually
relational calculus and algebra.
Basics of a relational model
 Relation
The relational model gives us a single way to represent data, that is, as a two-dimensional table is
called a relation. A relational database consists of a collection of tables, each of which is
assigned a unique name. For instance, consider the table below named Instructor. The table has
four column headers: ID, name, dept_name, and salary. Each row of this table records
information about the instructor, consisting of their id, name, department, and salary.




1

, In general, a row in a table represents a relationship among a set of values. Since a table is a
collection of such relationships, there is a close correspondence between the concept of a table
and the mathematical concept of relation, from which a relational data model derives its name.
In mathematical terminology, a tuple is simply a sequence (or a list) of values. A relationship
between n values is represented mathematically by an n-tuple, that is, a tuple of n values, which
corresponds to a row in a table.
NB: for a table to be a relation, the following rules must hold;
 The intersection of row with column should contain single (atomic) value.
 All entries in a column are of the same type.
 Each column has a unique name and column order not significant
 No two rows are identical and row order not significant.
 Attributes
The columns of a relation are named by attributes. Attributes appear at the tops of the columns.
Usually, an attribute describes the meaning of entries in below each column. For instance, the
column with attribute ID in the relation Instructor holds the Identity number of each instructor.
 Tuples
The rows of a relation, other than the header row containing the attribute names, are called
tuples. A tuple has one component for each attribute of the relation. For example, the first tuple
in the Instructor relation above has the components 10101, Srivansan, Comp. Sci. and 65000 for
attributes ID, name, dept_name and salary, respectively. When we wish to write a tuple in
isolation, that is, not as part of the relation, we normally use commas to separate components,
and parentheses to surround the tuple. For example,
(10101, Srivansan, Comp. Sci., 65000),
is the first isolated tuple of the instructor relation above. NB: when a tuple appears in isolation,
the attributes do not appear and therefore, some indication of the relation to which the tuple
belongs must be given. Usually, the order in which the attributes were listed in the relation
schema is used.
 Domains
For each attribute of a relation, there is a set of permitted values, called the domain of that
attribute, that is, a particular elementary type. The components of any tuple of the relation must
have, in each component, a value that belongs to the domain of the corresponding column. For

2

Written for

Institution
Course

Document information

Uploaded on
October 12, 2021
Number of pages
5
Written in
2021/2022
Type
Class notes
Professor(s)
Judy
Contains
All classes

Subjects

$7.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
muriithilauryn

Also available in package deal

Get to know the seller

Seller avatar
muriithilauryn kenyatta university
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
4 year
Number of followers
0
Documents
7
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions