1. Presentation & Delivery
VEERANAN VEERANAN
M.Sc. Computer Science, Dip.in.Yoga.,
Roll No: P22CS123
Reg. No:
PG. Department of Computer Science
GOVERNMENT ARTS COLLEGE, MELUR
ADVANCED DATABASE SYSTEM
Topic:
GENERALIZING THERELATIONALOPERATORS –DATABASE DESIGN
2. Synopsis
S.No. Title S.No. Title
1 1.1 Relational Algebra 7 1.2 Database
2 1.1.1 Types of relational Operator 8 1.2.1 Database Design
3 1.1.2 Relational Algebra Operation 9 1.2.2 Database Life Cycle
4
1.1.1 Select Operator &
1.1.2 Project Operator
10
1.2.3 Database Design
2.2.1 Planning
2.2.2 System Definition
5
1.1.3 Union Operation &
1.1.4 Set Difference
11
1.2.4 Database Designing
2.4.1 Physical Model
2.4.2 Logical Model
6
1.1.5 Cartesian product &
1.1.6 Rename Operation
12
1.2.5 Implementation
2.5.1 Data Conversion and Loading
2.5.2 Testing
3. 1.1 Relational Algebra
RELATIONAL ALGEBRA is a procedural query language.
It gives a step by step process to obtain the result of the
query.
It uses operators to perform queries.
5. 1.1.2Relational Algebra Operation
Operation Select Project Union Set Difference Cartesian Rename
Denoted By sigma (σ) ∏ Union - U minus (-) X rho (ρ)
Notation σ c (R) ∏ A (R) R ∪ S R - S E X D
ρ(STUDENT1
, STUDENT)
Syntax Σ p (R) ∏A1, A2...(r) A ∪ B A - B A X B
ρ(RelationNew,
RelationOld)
Operation
=, ≠, ≥, <, >,
≤.
Eliminated
from the table
Duplicate
tuples are
eliminated
automatic
ally
Intersection
Cross
product.
Rename
6. 1.1.1 Select Operation 1.1.2Project Operation
Select Operation chooses the subset of
tuples from relation that satisfies the
given condition mentioned in the of
selection.
The selection operation is also known
as horizontal partitioning since it
partitions the table or relation
horizontally.
Notation: σ c (R)
σ = Sigma
c = Boolean Expression
(R) = Algebra Expression
<Attributer Name> <Comparison Operator> <Constant Value> or
<Attribute Name>
Select (or Choose) certain attributes
discarding other attributes.
The Project Operation is also known as
vertical partitioning since it partitions the
relation or table vertically discarding
other columns or attributes.
Notation: ∏ A (R)
∏ = Pi (Symbol)
A= Attribute list
(R) = Algebra Expression
7. 1.1.3 Union Operation 1.1.4Set Difference
The Union Operation could be used to
find the result set or combination of two
or more tables.
SELECT columnnames FROM
Table1
UNION
SELECT columnnames FROM
Table 2
T & C
Same Number of Columns
Same data types
Same order
If there are two sets A and B, then the
difference of two sets A and B is equal to
the set which consists of elements present
in A but not in B.
If is represented by A – B.
8. 1.1.5 Cartesian product 1.1.6 Rename Operation
Cartesian Product is really a cross-join
which returns all the rows in all the tables
listed in a query.
Each row in the First table is paired
with all the rows in the second table.
This happens when there is no
relationship defined between the two
tables.
Some times we may want to rename our
table to give if a more relevant name.
For this purpose, we can use ALTER
TABLE to rename the name of the table.
10. 1.2 DATABASE
A database is more of a storage term used to denote
the relationship with different forms of data that
are coagulated in a single place.
A database as an organized collection of data,
generally stored and accessed electronically through
computer systems.
11. 1.2.1 DATABASE DESIGN
Database design can be generally defined as a collection of tasks or
processes that enhance the designing, development,
implementation, and maintenance of enterprise data management
system.
Designing a proper database reduces the maintenance cost
thereby improving data consistency and the cost-effective
measures are greatly influenced in terms of disk storage space.
The main objectives behind database designing are to produce
physical and logical design models of the proposed database system.
13. 1.2.3Requirement Analysis
First of all, the planning has to be done on what are the basic
requirements of the project under which the design of the database has to be taken
forward.
2.2.1 Planning 2.2.2 System definition
This stage is concerned with planning
the entire DDLC (Database
Development Life Cycle).
The strategic considerations are taken
into account before proceeding.
This stage covers the boundaries and
scopes of the proper database after
planning.
14. 1.2.4Database Designing
The next step involves designing the database considering the user-based
requirements and splitting them out into various models so that load or heavy
dependencies on a single aspect are not imposed.
Therefore, there has been some model-centric approach and that's where
logical and physical models play a crucial role.
2.4.1 Physical Model 2.4.2 Logical Model
The physical model is concerned with
the practices and implementations of
the logical model.
This stage is primarily concerned with
developing a model based on the
proposed requirements.
The entire model is designed on paper
without any implementation or
adopting DBMS considerations.
15. 1.2.5 Implementation
The last step covers the implementation methods and checking out the
behavior that matches our requirements.
The manipulation of data is primarily focused on these steps where
queries are made to run and check if the application is designed satisfactorily or
not.
2.5.1 Data conversion and
loading
2.5.2 Testing
This section is used to import and
convert data from the old to the new
system.
This stage is concerned with error
identification in the newly
implemented system.
Testing is a crucial step because it
checks the database directly and
compares the requirement specifications.