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

What's hot

Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
Ishucs
 
SQL : Structured Query Language
SQL : Structured Query LanguageSQL : Structured Query Language
SQL : Structured Query Language
Abhishek Gautam
 
Assignment 4
Assignment 4Assignment 4
Assignment 4
SneaK3
 
Understanding excel’s error values
Understanding excel’s error valuesUnderstanding excel’s error values
Understanding excel’s error values
Vijay Perepa
 
Functions of ms excel 2003
Functions of ms excel 2003Functions of ms excel 2003
Functions of ms excel 2003
gaurav jain
 
joins and subqueries in big data analysis
joins and subqueries in big data analysisjoins and subqueries in big data analysis
joins and subqueries in big data analysis
SanSan149
 
Notes of Information technology
Notes of Information technology Notes of Information technology
Notes of Information technology Asif Jamal
 
Ms excel
Ms excelMs excel
Oracle: Joins
Oracle: JoinsOracle: Joins
Oracle: Joins
DataminingTools Inc
 
Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4Farhan Chishti
 
Join sql
Join sqlJoin sql
Join sql
Vikas Gupta
 
SQL JOIN
SQL JOINSQL JOIN
SQL JOIN
Ritwik Das
 
Spreadsheets 101
Spreadsheets 101Spreadsheets 101
Spreadsheets 101
Bradley Gaines
 
Basic Formulas - Excel 2013 Tutorial
Basic Formulas - Excel 2013 TutorialBasic Formulas - Excel 2013 Tutorial
Basic Formulas - Excel 2013 Tutorial
SpreadsheetTrainer
 
Sql joins
Sql joinsSql joins
Sql joins
Berkeley
 

What's hot (20)

Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
 
SQL : Structured Query Language
SQL : Structured Query LanguageSQL : Structured Query Language
SQL : Structured Query Language
 
Assignment 4
Assignment 4Assignment 4
Assignment 4
 
Joins and unions
Joins and unionsJoins and unions
Joins and unions
 
Understanding excel’s error values
Understanding excel’s error valuesUnderstanding excel’s error values
Understanding excel’s error values
 
Functions of ms excel 2003
Functions of ms excel 2003Functions of ms excel 2003
Functions of ms excel 2003
 
Excel Chapter 2
Excel Chapter 2Excel Chapter 2
Excel Chapter 2
 
joins and subqueries in big data analysis
joins and subqueries in big data analysisjoins and subqueries in big data analysis
joins and subqueries in big data analysis
 
Notes of Information technology
Notes of Information technology Notes of Information technology
Notes of Information technology
 
Ms excel
Ms excelMs excel
Ms excel
 
Joins SQL Server
Joins SQL ServerJoins SQL Server
Joins SQL Server
 
Oracle: Joins
Oracle: JoinsOracle: Joins
Oracle: Joins
 
Joins And Its Types
Joins And Its TypesJoins And Its Types
Joins And Its Types
 
Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4
 
Join sql
Join sqlJoin sql
Join sql
 
SQL JOIN
SQL JOINSQL JOIN
SQL JOIN
 
Spreadsheets 101
Spreadsheets 101Spreadsheets 101
Spreadsheets 101
 
Basic Formulas - Excel 2013 Tutorial
Basic Formulas - Excel 2013 TutorialBasic Formulas - Excel 2013 Tutorial
Basic Formulas - Excel 2013 Tutorial
 
Sql joins
Sql joinsSql joins
Sql joins
 
Zlookup function
Zlookup functionZlookup function
Zlookup function
 

Similar to OrACLE RELATIONAL

Join in SQL - Inner, Self, Outer Join
Join in SQL - Inner, Self, Outer JoinJoin in SQL - Inner, Self, Outer Join
Join in SQL - Inner, Self, Outer Join
Souma Maiti
 
Normal forms
Normal formsNormal forms
Normal forms
Samuel Igbanogu
 
Ism normalization pine valley 2012
Ism normalization pine valley 2012Ism normalization pine valley 2012
Ism normalization pine valley 2012
Akshit R Shah
 
1683368767418684.pdf
1683368767418684.pdf1683368767418684.pdf
1683368767418684.pdf
Janoakre
 
JOINS.pptx
JOINS.pptxJOINS.pptx
JOINS.pptx
ArunkumarT51
 
Database design normalization note and exercise
Database design normalization note and exerciseDatabase design normalization note and exercise
Database design normalization note and exercise
dilnawaz56788
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
Hammad Rasheed
 
Structured Query Language (SQL)
Structured Query Language (SQL)Structured Query Language (SQL)
Structured Query Language (SQL)
Hammad Rasheed
 
database .pptx
database .pptxdatabase .pptx
database .pptx
Mohammad Adnan
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationNickkisha Farrell
 
databaess.pptx
databaess.pptxdatabaess.pptx
databaess.pptx
Janoakre
 
Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
DilanAlmsa
 
Normalization
NormalizationNormalization
Normalization
Wangu Thupa
 
set operators.pptx
set operators.pptxset operators.pptx
set operators.pptx
Anusha sivakumar
 
SQL Joins.pptx
SQL Joins.pptxSQL Joins.pptx
SQL Joins.pptx
Ankit Rai
 
Distributed database
Distributed databaseDistributed database
Distributed database
NasIr Irshad
 
MS SQLSERVER:Joining Databases
MS SQLSERVER:Joining DatabasesMS SQLSERVER:Joining Databases
MS SQLSERVER:Joining Databases
sqlserver content
 

Similar to OrACLE RELATIONAL (20)

Join in SQL - Inner, Self, Outer Join
Join in SQL - Inner, Self, Outer JoinJoin in SQL - Inner, Self, Outer Join
Join in SQL - Inner, Self, Outer Join
 
Normal forms
Normal formsNormal forms
Normal forms
 
Ism normalization pine valley 2012
Ism normalization pine valley 2012Ism normalization pine valley 2012
Ism normalization pine valley 2012
 
1683368767418684.pdf
1683368767418684.pdf1683368767418684.pdf
1683368767418684.pdf
 
JOINS.pptx
JOINS.pptxJOINS.pptx
JOINS.pptx
 
Database design normalization note and exercise
Database design normalization note and exerciseDatabase design normalization note and exercise
Database design normalization note and exercise
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
Structured Query Language (SQL)
Structured Query Language (SQL)Structured Query Language (SQL)
Structured Query Language (SQL)
 
database .pptx
database .pptxdatabase .pptx
database .pptx
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - Normalization
 
databaess.pptx
databaess.pptxdatabaess.pptx
databaess.pptx
 
Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
 
Normalization
NormalizationNormalization
Normalization
 
set operators.pptx
set operators.pptxset operators.pptx
set operators.pptx
 
SQL Joins.pptx
SQL Joins.pptxSQL Joins.pptx
SQL Joins.pptx
 
Research gadot
Research gadotResearch gadot
Research gadot
 
DuplicatesExcelDemo
DuplicatesExcelDemoDuplicatesExcelDemo
DuplicatesExcelDemo
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Normlaization
NormlaizationNormlaization
Normlaization
 
MS SQLSERVER:Joining Databases
MS SQLSERVER:Joining DatabasesMS SQLSERVER:Joining Databases
MS SQLSERVER:Joining Databases
 

More from ASHABOOPATHY

Unit4
Unit4Unit4
Unit3
Unit3Unit3
Unit2
Unit2Unit2
Unit3
Unit3Unit3
Unit1
Unit1Unit1
Unit2
Unit2Unit2
Unit1
Unit1Unit1
MULTIPLE TABLES
MULTIPLE TABLES MULTIPLE TABLES
MULTIPLE TABLES
ASHABOOPATHY
 
ORACLE PL/SQL
ORACLE PL/SQLORACLE PL/SQL
ORACLE PL/SQL
ASHABOOPATHY
 
Orcal FUNCTIONS
Orcal FUNCTIONSOrcal FUNCTIONS
Orcal FUNCTIONS
ASHABOOPATHY
 
Oracel CURSOR AND EXCEPTIONS
Oracel CURSOR AND EXCEPTIONSOracel CURSOR AND EXCEPTIONS
Oracel CURSOR AND EXCEPTIONS
ASHABOOPATHY
 
Ora1
Ora1Ora1
Phpbase
PhpbasePhpbase
Phpbase
ASHABOOPATHY
 

More from ASHABOOPATHY (13)

Unit4
Unit4Unit4
Unit4
 
Unit3
Unit3Unit3
Unit3
 
Unit2
Unit2Unit2
Unit2
 
Unit3
Unit3Unit3
Unit3
 
Unit1
Unit1Unit1
Unit1
 
Unit2
Unit2Unit2
Unit2
 
Unit1
Unit1Unit1
Unit1
 
MULTIPLE TABLES
MULTIPLE TABLES MULTIPLE TABLES
MULTIPLE TABLES
 
ORACLE PL/SQL
ORACLE PL/SQLORACLE PL/SQL
ORACLE PL/SQL
 
Orcal FUNCTIONS
Orcal FUNCTIONSOrcal FUNCTIONS
Orcal FUNCTIONS
 
Oracel CURSOR AND EXCEPTIONS
Oracel CURSOR AND EXCEPTIONSOracel CURSOR AND EXCEPTIONS
Oracel CURSOR AND EXCEPTIONS
 
Ora1
Ora1Ora1
Ora1
 
Phpbase
PhpbasePhpbase
Phpbase
 

Recently uploaded

Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 

Recently uploaded (20)

Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 

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.