SlideShare a Scribd company logo
THEORETICAL RELATIONAL LANGUAGES
Theoretical
relational languages to use with the
relational model.
1.Relational algebra
2.Relational calculus
RELATIONAL ALGEBRA
1. Union
2. Intersection
3. Difference
4. Projection
5. Selection
6. Product
7.Assignment
8. Join
9. Division
UNION
 The union of two tables results in
retrieval of
ALL rows that are in one or both
tables.
 there is a basic requirement to perform a
union operation on two tables.
 both tables must have the same degree.
 the domain of the corresponding
columns in two tables must be same.
Syntax:
TABLE_A=PROJ2002 U PROJ2003
INTERSECTION:
The intersection of two tables produces a
table with rows that are in both tables.
SINTAX:
TABLE_B=PROJ2002PROJ2003
DIFFERENCE
The difference of two tables
produces a tables with rows that are
present in the first table but not in the
second table.
SYNTAX:
TABLE_D=PROJ2003_PROJ2002
PROJECTION
The projection operation returns
the “vertical slices” of a table.
SYNTAX:
TABLE_E=PARTS( PartDes, cost)
SELECTION
The section operation selects rows from a table based
on a condition or conditions. The conditional
operators (=,<>,>,>=,<,<=)and the logical operators .
SYNTAX:
TABLE_F = sel (PARTS :cost >10.00)
PRODUCT
A product of two table is a combination
everything in both tables. It is also known as a cartesian
product.
SYNTAX
TABLE_G=EMPLOYEE.DEPARTMENT
ASSIGNMENT:
this operation creates a new table from existing
Tables .
ASSIGNMENT
This operation creates a new table new existing tables.
We have been doing it throughout all the other operations.
EXAMBLES
TABLE_A=PROJ2002 U PROJ2003
TABLE_C=PROJ2002 – PROJ2003
JOIN
the join is one of the most important operations because
of its ability to get related data from a number of tables.
EXAMBLES
TABLE_H=join(EMPLOYE ,DEPARTMENT :
DeptNo=Dept NO)
DIVISION
The division operation is the most
difficult operation to comprehend.
EXAMPLE:
TABLE_I=PRJPARTS/PROJ
RELATIONAL CALCULUS:
Relational calculus is a nonprocedural
language.
SYNTAX
Result=(column list):Expression
DATA MODELING AND
NORMALISATION
DATA MODELING
A model is a simplified version of real-
life,
Complex objects.
 An excellent communication tool
 A simple graphical representation of data
DEPENDENY
Every table in the database should have a primary
key which uniquely identifies an entity.
 Total or full dependency
 partial dependency
 Transitive dependency
DATABASE DESING
Relational database design involves an attempt to
synthesize the database structure to get the “first
draft”.
NORMAL FORMS
 anomalies
 first normal form
 second normal form
 third normal form
ANOMALIES
A Deletion anomaly results when the deletion of
information about one entity to the deletion of
information about another entity.
FIRST NORMAL FORM
The primary is defined. The includes a
composite key if a single column cannot be used
primary key.
SECOND NORMAL KEY
 All INF requirements are fulfilled
 There is no partial dependency.
THIRD NORMAL FILE
 All 2nf requirement are fulfilled
 There is no transitive dependency.
A table that has transitive dependency is not
in 3NF, but it need to be decomposed further
to achieve 3NF.
DEPENDENCY DIAGRAMS
The primary key components are
highlighted.
They are in bold letters and in boxes with a
darker border.
CONVERSION FROM 1NF TO 2NF
First write each primary key components on a
separate line because they will become
primary key in two new tables.
CONVESION FROM 2NF TO 3NF
 Move columns with the transitive
dependency to a new table.
 Keep the primary key of the new table as a
foreign key in the existing table.
DENORMALIZATION
The normalization process splits tables in to
smaller table. These tables are joined through
common columns to retrieve information
from different tables.
ANOTHER EXAMPLE OF
NORMALIZATION
1.Total dependency
2.Partial dependency
3.Transitive dependency
1. TOTAL DEPENDENY
Jery num, points score year ,games player,
team id, team name and team Loc columns are
dependent on primary key columns player id
and year.
2.PARTIAL DEPENDENCY
Player name and birth date columns are
dependent on primary key column player id
only.
3.TRANSITIYE DEPENDENCY
Team name and team loc columns are
dependent on non –key column team id.

More Related Content

PDF
Excel Tutorials - Random Value Selection from a List
PPT
Spreadsheets[1]
PPTX
Ms sql server tips 1 0
PPTX
Fragmentation and types of fragmentation in Distributed Database
PPTX
Mastering Excel Formulas and Functions
PPTX
Sql joins inner join self join outer joins
PDF
Excel Tutorials - Deleting the Empty Rows
Excel Tutorials - Random Value Selection from a List
Spreadsheets[1]
Ms sql server tips 1 0
Fragmentation and types of fragmentation in Distributed Database
Mastering Excel Formulas and Functions
Sql joins inner join self join outer joins
Excel Tutorials - Deleting the Empty Rows

What's hot (20)

PPTX
Sql(structured query language)
PPTX
SQL : Structured Query Language
PDF
Assignment 4
PPTX
Understanding excel’s error values
PPT
Functions of ms excel 2003
PPT
Excel Chapter 2
PPTX
joins and subqueries in big data analysis
PDF
Notes of Information technology
PPTX
Oracle: Joins
PPTX
Joins And Its Types
PPT
Normalization of database_tables_chapter_4
PPT
Join sql
PPTX
SQL JOIN
PPTX
Spreadsheets 101
PDF
Basic Formulas - Excel 2013 Tutorial
PPT
Sql joins
PPTX
Zlookup function
Sql(structured query language)
SQL : Structured Query Language
Assignment 4
Understanding excel’s error values
Functions of ms excel 2003
Excel Chapter 2
joins and subqueries in big data analysis
Notes of Information technology
Oracle: Joins
Joins And Its Types
Normalization of database_tables_chapter_4
Join sql
SQL JOIN
Spreadsheets 101
Basic Formulas - Excel 2013 Tutorial
Sql joins
Zlookup function
Ad

Similar to OrACLE RELATIONAL (20)

PPTX
5th chapter Relational algebra.pptx
PPT
Unit-2 relational algebra ikgtu DBMS.ppt
PPT
chapter 5-Relational Algebra and calculus.ppt
PPTX
BASICS OF STRUCTURED QUEERY LANGUAGE.PPT
PPTX
Distributed database
PDF
Chapter – 5 Relational Algebra.pdf
PPT
Intro to relational model
PPT
Relational Algebra
PPTX
Lecture-3 Relational Algebra I.pptx
PPT
R Algebra.ppt
PDF
chapter 6 Relational Algebra and calculus.pdf
PPTX
Slide For Database Management System Relational Model.pptx
PDF
19IS305_U2_LP4_LM4-22-23.pdf
PPTX
lecture 4 Relational Algebra my sql work
PDF
RelationalAlgebra-RelationalCalculus-SQL.pdf
PPTX
uniT 4 (1).pptx
PPT
lefg sdfg ssdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg d...
PPT
lecture8Alg.ppt
PPT
Relational algebra-and-relational-calculus
PPTX
DBMS - Relational Algebra
5th chapter Relational algebra.pptx
Unit-2 relational algebra ikgtu DBMS.ppt
chapter 5-Relational Algebra and calculus.ppt
BASICS OF STRUCTURED QUEERY LANGUAGE.PPT
Distributed database
Chapter – 5 Relational Algebra.pdf
Intro to relational model
Relational Algebra
Lecture-3 Relational Algebra I.pptx
R Algebra.ppt
chapter 6 Relational Algebra and calculus.pdf
Slide For Database Management System Relational Model.pptx
19IS305_U2_LP4_LM4-22-23.pdf
lecture 4 Relational Algebra my sql work
RelationalAlgebra-RelationalCalculus-SQL.pdf
uniT 4 (1).pptx
lefg sdfg ssdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg sdfg d...
lecture8Alg.ppt
Relational algebra-and-relational-calculus
DBMS - Relational Algebra
Ad

More from ASHABOOPATHY (13)

PPTX
PPTX
PPTX
PPTX
PPTX
PPTX
PPTX
PPTX
MULTIPLE TABLES
PPTX
ORACLE PL/SQL
PPTX
Orcal FUNCTIONS
PPTX
Oracel CURSOR AND EXCEPTIONS
PPTX
PPTX
Phpbase
MULTIPLE TABLES
ORACLE PL/SQL
Orcal FUNCTIONS
Oracel CURSOR AND EXCEPTIONS
Phpbase

Recently uploaded (20)

PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Pre independence Education in Inndia.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Cell Structure & Organelles in detailed.
PDF
Classroom Observation Tools for Teachers
PDF
Computing-Curriculum for Schools in Ghana
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
master seminar digital applications in india
PPTX
Institutional Correction lecture only . . .
PPTX
GDM (1) (1).pptx small presentation for students
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Lesson notes of climatology university.
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
VCE English Exam - Section C Student Revision Booklet
TR - Agricultural Crops Production NC III.pdf
PPH.pptx obstetrics and gynecology in nursing
Pre independence Education in Inndia.pdf
Microbial diseases, their pathogenesis and prophylaxis
Cell Structure & Organelles in detailed.
Classroom Observation Tools for Teachers
Computing-Curriculum for Schools in Ghana
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
human mycosis Human fungal infections are called human mycosis..pptx
Sports Quiz easy sports quiz sports quiz
master seminar digital applications in india
Institutional Correction lecture only . . .
GDM (1) (1).pptx small presentation for students
STATICS OF THE RIGID BODIES Hibbelers.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Lesson notes of climatology university.
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
VCE English Exam - Section C Student Revision Booklet

OrACLE RELATIONAL

  • 1. THEORETICAL RELATIONAL LANGUAGES Theoretical relational languages to use with the relational model. 1.Relational algebra 2.Relational calculus
  • 2. RELATIONAL ALGEBRA 1. Union 2. Intersection 3. Difference 4. Projection 5. Selection 6. Product 7.Assignment 8. Join 9. Division
  • 3. UNION  The union of two tables results in retrieval of ALL rows that are in one or both tables.  there is a basic requirement to perform a union operation on two tables.  both tables must have the same degree.  the domain of the corresponding columns in two tables must be same.
  • 4. Syntax: TABLE_A=PROJ2002 U PROJ2003 INTERSECTION: The intersection of two tables produces a table with rows that are in both tables. SINTAX: TABLE_B=PROJ2002PROJ2003
  • 5. DIFFERENCE The difference of two tables produces a tables with rows that are present in the first table but not in the second table. SYNTAX: TABLE_D=PROJ2003_PROJ2002 PROJECTION The projection operation returns the “vertical slices” of a table. SYNTAX: TABLE_E=PARTS( PartDes, cost)
  • 6. SELECTION The section operation selects rows from a table based on a condition or conditions. The conditional operators (=,<>,>,>=,<,<=)and the logical operators . SYNTAX: TABLE_F = sel (PARTS :cost >10.00)
  • 7. PRODUCT A product of two table is a combination everything in both tables. It is also known as a cartesian product. SYNTAX TABLE_G=EMPLOYEE.DEPARTMENT ASSIGNMENT: this operation creates a new table from existing Tables .
  • 8. ASSIGNMENT This operation creates a new table new existing tables. We have been doing it throughout all the other operations. EXAMBLES TABLE_A=PROJ2002 U PROJ2003 TABLE_C=PROJ2002 – PROJ2003 JOIN the join is one of the most important operations because of its ability to get related data from a number of tables. EXAMBLES TABLE_H=join(EMPLOYE ,DEPARTMENT : DeptNo=Dept NO)
  • 9. DIVISION The division operation is the most difficult operation to comprehend. EXAMPLE: TABLE_I=PRJPARTS/PROJ RELATIONAL CALCULUS: Relational calculus is a nonprocedural language. SYNTAX Result=(column list):Expression
  • 10. DATA MODELING AND NORMALISATION DATA MODELING A model is a simplified version of real- life, Complex objects.  An excellent communication tool  A simple graphical representation of data
  • 11. DEPENDENY Every table in the database should have a primary key which uniquely identifies an entity.  Total or full dependency  partial dependency  Transitive dependency
  • 12. DATABASE DESING Relational database design involves an attempt to synthesize the database structure to get the “first draft”. NORMAL FORMS  anomalies  first normal form  second normal form  third normal form
  • 13. ANOMALIES A Deletion anomaly results when the deletion of information about one entity to the deletion of information about another entity. FIRST NORMAL FORM The primary is defined. The includes a composite key if a single column cannot be used primary key. SECOND NORMAL KEY  All INF requirements are fulfilled  There is no partial dependency.
  • 14. THIRD NORMAL FILE  All 2nf requirement are fulfilled  There is no transitive dependency. A table that has transitive dependency is not in 3NF, but it need to be decomposed further to achieve 3NF. DEPENDENCY DIAGRAMS The primary key components are highlighted. They are in bold letters and in boxes with a darker border.
  • 15. CONVERSION FROM 1NF TO 2NF First write each primary key components on a separate line because they will become primary key in two new tables. CONVESION FROM 2NF TO 3NF  Move columns with the transitive dependency to a new table.  Keep the primary key of the new table as a foreign key in the existing table.
  • 16. DENORMALIZATION The normalization process splits tables in to smaller table. These tables are joined through common columns to retrieve information from different tables. ANOTHER EXAMPLE OF NORMALIZATION 1.Total dependency 2.Partial dependency 3.Transitive dependency
  • 17. 1. TOTAL DEPENDENY Jery num, points score year ,games player, team id, team name and team Loc columns are dependent on primary key columns player id and year. 2.PARTIAL DEPENDENCY Player name and birth date columns are dependent on primary key column player id only. 3.TRANSITIYE DEPENDENCY Team name and team loc columns are dependent on non –key column team id.