SlideShare a Scribd company logo
1 of 96
Chapter 2: Relational Model
Chapter 2: Relational Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.2 Database System Concepts - 5 th  Edition, June 15, 2005
Example of a Relation 2.3 Database System Concepts - 5 th  Edition, June 15, 2005
Attribute Types ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.4 Database System Concepts - 5 th  Edition, June 15, 2005
Relation Schema ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.5 Database System Concepts - 5 th  Edition, June 15, 2005
Relation Instance ,[object Object],[object Object],[object Object],2.6 Database System Concepts - 5 th  Edition, June 15, 2005 Jones Smith Curry Lindsay customer_name Main North North Park customer_street Harrison Rye Rye Pittsfield customer_city customer attributes (or columns) tuples (or rows)
Database ,[object Object],[object Object],[object Object],[object Object],2.7 Database System Concepts - 5 th  Edition, June 15, 2005
The  customer  Relation 2.8 Database System Concepts - 5 th  Edition, June 15, 2005
The  depositor  Relation 2.9 Database System Concepts - 5 th  Edition, June 15, 2005
Why Split Information Across Relations? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.10 Database System Concepts - 5 th  Edition, June 15, 2005
Keys ,[object Object],[object Object],[object Object],[object Object],[object Object],2.11 Database System Concepts - 5 th  Edition, June 15, 2005
Keys (Cont.) ,[object Object],[object Object],[object Object],[object Object],2.12 Database System Concepts - 5 th  Edition, June 15, 2005
Foreign Keys ,[object Object],[object Object],[object Object],2.13 Database System Concepts - 5 th  Edition, June 15, 2005
Schema Diagram 2.14 Database System Concepts - 5 th  Edition, June 15, 2005
Query Languages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.15 Database System Concepts - 5 th  Edition, June 15, 2005
Relational Algebra ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.16 Database System Concepts - 5 th  Edition, June 15, 2005
Select Operation – Example 2.17 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],A B C D         1 5 12 23 7 7 3 10 ,[object Object],A B C D     1 23 7 10
Project Operation – Example ,[object Object],2.18 Database System Concepts - 5 th  Edition, June 15, 2005 A B C     10 20 30 40 1 1 1 2 A C     1 1 1 2 = A C    1 1 2  A,C  ( r )
Union Operation – Example ,[object Object],2.19 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],A B    1 2 1 A B   2 3 r s A B     1 2 1 3
Set Difference Operation – Example ,[object Object],2.20 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],A B    1 2 1 A B   2 3 r s A B   1 1
Cartesian-Product Operation – Example 2.21 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],[object Object],A B   1 2 A B         1 1 1 1 2 2 2 2 C D          10 10 20 10 10 10 20 10 E a a b b a a b b C D     10 10 20 10 E a a b b r s
Rename Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.22 Database System Concepts - 5 th  Edition, June 15, 2005
Composition of Operations ,[object Object],[object Object],[object Object],[object Object],2.23 Database System Concepts - 5 th  Edition, June 15, 2005 A B         1 1 1 1 2 2 2 2 C D           10 10 20 10 10 10 20 10 E a a b b a a b b A B C D E    1 2 2    10 10 20 a a b
Banking Example branch (branch_name, branch_city, assets) customer (customer_name, customer_street, customer_city) account (account_number, branch_name, balance) loan (loan_number, branch_name, amount) depositor (customer_name, account_number) borrower   (customer_name, loan_number) 2.24 Database System Concepts - 5 th  Edition, June 15, 2005
Example Queries ,[object Object],2.25 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object], amount   > 1200  ( loan )  loan_number  ( amount   > 1200  ( loan )) ,[object Object],[object Object]
Example Queries ,[object Object],2.26 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object], customer_name  (  branch_name = “Perryridge” (  borrower.loan_number = loan.loan_number (borrower x loan))) –   customer_name (depositor)  customer_name  (  branch_name=“Perryridge ” (  borrower.loan_number = loan.loan_number ( borrower x loan )))
Example Queries ,[object Object],2.27 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],[object Object]
Additional Operations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.28 Database System Concepts - 5 th  Edition, June 15, 2005
Set-Intersection Operation – Example ,[object Object],[object Object],2.29 Database System Concepts - 5 th  Edition, June 15, 2005 A B    1 2 1 A B   2 3 r s A B   2
Natural Join Operation – Example ,[object Object],2.30 Database System Concepts - 5 th  Edition, June 15, 2005 A B      1 2 4 1 2 C D      a a b a b B 1 3 1 2 3 D a a a b b E      r A B      1 1 1 1 2 C D      a a a a b E      s ,[object Object]
Natural-Join Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.31 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object]
Bank Example Queries ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.32 Database System Concepts - 5 th  Edition, June 15, 2005  balance (account)  -  account.balance ( account.balance < d.balance   ( account   x   d   (account )))
Aggregate Functions and Operations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.33 Database System Concepts - 5 th  Edition, June 15, 2005
Aggregate Operation – Example ,[object Object],2.34 Database System Concepts - 5 th  Edition, June 15, 2005 A B         C 7 7 3 10 ,[object Object],sum ( c  ) 27 ,[object Object]
Aggregate Operation – Example ,[object Object],2.35 Database System Concepts - 5 th  Edition, June 15, 2005 branch_name   g  sum ( balance )  ( account ) branch_name account_number balance Perryridge Perryridge Brighton Brighton Redwood A-102 A-201 A-217 A-215 A-222 400 900 750 750 700 branch_name sum ( balance ) Perryridge Brighton Redwood 1300 1500 700
Aggregate Functions (Cont.) ,[object Object],[object Object],[object Object],2.36 Database System Concepts - 5 th  Edition, June 15, 2005 branch_name   g  sum (balance)  as  sum_balance  ( account )
Outer Join ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.37 Database System Concepts - 5 th  Edition, June 15, 2005
Outer Join – Example ,[object Object],2.38 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],customer_name loan_number Jones Smith Hayes L-170 L-230 L-155 3000 4000 1700 loan_number amount L-170 L-230 L-260 branch_name Downtown Redwood Perryridge
Outer Join – Example ,[object Object],2.39 Database System Concepts - 5 th  Edition, June 15, 2005 loan_number amount L-170 L-230 3000 4000 customer_name Jones Smith branch_name Downtown Redwood Jones Smith null loan_number amount L-170 L-230 L-260 3000 4000 1700 customer_name branch_name Downtown Redwood Perryridge ,[object Object],[object Object]
Outer Join – Example 2.40 Database System Concepts - 5 th  Edition, June 15, 2005 loan_number amount L-170 L-230 L-155 3000 4000 null customer_name Jones Smith Hayes branch_name Downtown Redwood null loan_number amount L-170 L-230 L-260 L-155 3000 4000 1700 null customer_name Jones Smith null Hayes branch_name Downtown Redwood Perryridge null ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Null Values ,[object Object],[object Object],[object Object],[object Object],[object Object],2.41 Database System Concepts - 5 th  Edition, June 15, 2005
Null Values ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.42 Database System Concepts - 5 th  Edition, June 15, 2005
Division Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.43 Database System Concepts - 5 th  Edition, June 15, 2005 r    s
Division Operation – Example 2.44 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],[object Object],A B   1 2 A B            1 2 3 1 1 1 3 4 6 1 2 r s
Another Division Example 2.45 Database System Concepts - 5 th  Edition, June 15, 2005 A B         a a a a a a a a C D         a a b a b a b b E 1 1 1 1 3 1 1 1 ,[object Object],[object Object],D a b E 1 1 A B   a a C   r s
Division Operation (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.46 Database System Concepts - 5 th  Edition, June 15, 2005
Bank Example Queries ,[object Object],2.47 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],[object Object],[object Object]
Bank Example Queries ,[object Object],2.48 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],Bank Example Queries 2.49 Database System Concepts - 5 th  Edition, June 15, 2005  customer_name, branch_name   ( depositor   account )   branch_name  ( branch_city  = “Brooklyn”  ( branch ))
End of Chapter 2
Formal Definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.51 Database System Concepts - 5 th  Edition, June 15, 2005
Select Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.52 Database System Concepts - 5 th  Edition, June 15, 2005
Project Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],2.53 Database System Concepts - 5 th  Edition, June 15, 2005
Union Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.54 Database System Concepts - 5 th  Edition, June 15, 2005
Set Difference Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.55 Database System Concepts - 5 th  Edition, June 15, 2005
Cartesian-Product Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],2.56 Database System Concepts - 5 th  Edition, June 15, 2005
Set-Intersection Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.57 Database System Concepts - 5 th  Edition, June 15, 2005
Assignment Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.58 Database System Concepts - 5 th  Edition, June 15, 2005
Extended Relational-Algebra-Operations ,[object Object],[object Object],[object Object],2.59 Database System Concepts - 5 th  Edition, June 15, 2005
Generalized Projection ,[object Object],[object Object],[object Object],[object Object],[object Object],2.60 Database System Concepts - 5 th  Edition, June 15, 2005
Modification of the Database ,[object Object],[object Object],[object Object],[object Object],[object Object],2.61 Database System Concepts - 5 th  Edition, June 15, 2005
Deletion ,[object Object],[object Object],[object Object],[object Object],[object Object],2.62 Database System Concepts - 5 th  Edition, June 15, 2005
Deletion Examples ,[object Object],2.63 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],r 1      branch_city = “Needham”   ( account branch  ) r 2     account_number ,   branch_name, balance  ( r 1 ) r 3      customer_name, account_number   ( r 2  depositor) account   account –  r 2 depositor   depositor –  r 3 ,[object Object],loan    loan  –    amount 0and amount  50  ( loan ) account    account  –   branch_name = “Perryridge”   ( account  )
Insertion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.64 Database System Concepts - 5 th  Edition, June 15, 2005
Insertion Examples ,[object Object],2.65 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],account    account   {(“A-973”,   “Perryridge”, 1200)} depositor   depositor   {(“Smith”, “A-973”)} r 1   ( branch_name = “Perryridge”  ( borrower  loan)) account    account    loan_number,  branch_name,   200   ( r 1 ) depositor   depositor    customer_name, loan_number  ( r 1 )
Updating ,[object Object],[object Object],[object Object],[object Object],[object Object],2.66 Database System Concepts - 5 th  Edition, June 15, 2005
Update Examples ,[object Object],2.67 Database System Concepts - 5 th  Edition, June 15, 2005 ,[object Object],account     account_number ,  branch_name ,  balance  * 1.06   (  BAL  10000  ( account  ))    account_number ,  branch_name ,  balance  *  1.05  ( BAL  10000  ( account )) account     account_number ,  branch_name ,  balance  * 1.05   ( account )
Figure 2.3. The  branch  relation 2.68 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.6: The  loan  relation 2.69 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.7: The  borrower  relation 2.70 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.9 Result of   branch_name = “Perryridge”  ( loan )   2.71 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.10:  Loan number and the amount of the loan 2.72 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.11: Names of all customers who have either an account or an loan 2.73 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.12:  Customers with an account but no loan 2.74 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.13: Result of  borrower  |X|  loan 2.75 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.14 2.76 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.15 2.77 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.16 2.78 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.17 Largest account balance in the bank 2.79 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.18: Customers who live on the same street and in the same city as Smith 2.80 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.19: Customers with both an account and a loan at the bank 2.81 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.20 2.82 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.21 2.83 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.22 2.84 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.23 2.85 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.24: The  credit_info  relation 2.86 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.25 2.87 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.26: The  pt_works  relation 2.88 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.27 The  pt_works  relation after regrouping 2.89 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.28 2.90 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.29 2.91 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.30 The  employee  and  ft_works relations 2.92 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.31 2.93 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.32 2.94 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.33 2.95 Database System Concepts - 5 th  Edition, June 15, 2005
Figure 2.34 2.96 Database System Concepts - 5 th  Edition, June 15, 2005

More Related Content

What's hot (20)

Dbms ii mca-ch7-sql-2013
Dbms ii mca-ch7-sql-2013Dbms ii mca-ch7-sql-2013
Dbms ii mca-ch7-sql-2013
 
Relational database intro for marketers
Relational database intro for marketersRelational database intro for marketers
Relational database intro for marketers
 
CHAPTER 2 DBMS IN EASY WAY BY MILAN PATEL
CHAPTER 2 DBMS IN EASY WAY BY  MILAN PATELCHAPTER 2 DBMS IN EASY WAY BY  MILAN PATEL
CHAPTER 2 DBMS IN EASY WAY BY MILAN PATEL
 
Assignment#04
Assignment#04Assignment#04
Assignment#04
 
check 11
check 11check 11
check 11
 
ch5
ch5ch5
ch5
 
Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01
 
Normalization
NormalizationNormalization
Normalization
 
Unit04 dbms
Unit04 dbmsUnit04 dbms
Unit04 dbms
 
Lllll
LllllLllll
Lllll
 
Cs501 rel algebra
Cs501 rel algebraCs501 rel algebra
Cs501 rel algebra
 
Assignment#01
Assignment#01Assignment#01
Assignment#01
 
Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)
 
Assignment#08
Assignment#08Assignment#08
Assignment#08
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Relational database language
Relational database languageRelational database language
Relational database language
 
12 SQL
12 SQL12 SQL
12 SQL
 
Assignment#06
Assignment#06Assignment#06
Assignment#06
 
Ch3
Ch3Ch3
Ch3
 
Assignment#07
Assignment#07Assignment#07
Assignment#07
 

Viewers also liked

SOLUTION MANUAL OF COMMUNICATION NETWORKS BY ALBERTO LEON GARCIA & INDRA WIDJAJA
SOLUTION MANUAL OF COMMUNICATION NETWORKS BY ALBERTO LEON GARCIA & INDRA WIDJAJASOLUTION MANUAL OF COMMUNICATION NETWORKS BY ALBERTO LEON GARCIA & INDRA WIDJAJA
SOLUTION MANUAL OF COMMUNICATION NETWORKS BY ALBERTO LEON GARCIA & INDRA WIDJAJAvtunotesbysree
 
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...vtunotesbysree
 
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSVTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSvtunotesbysree
 
Problem Solving with Algorithms and Data Structure - Graphs
Problem Solving with Algorithms and Data Structure - GraphsProblem Solving with Algorithms and Data Structure - Graphs
Problem Solving with Algorithms and Data Structure - GraphsYi-Lung Tsai
 
Data structure & its types
Data structure & its typesData structure & its types
Data structure & its typesRameesha Sadaqat
 
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...vtunotesbysree
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structureAbrish06
 
Graphs In Data Structure
Graphs In Data StructureGraphs In Data Structure
Graphs In Data StructureAnuj Modi
 
Ocw chp6 2searchbinary
Ocw chp6 2searchbinaryOcw chp6 2searchbinary
Ocw chp6 2searchbinaryPrashant Rai
 
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...vtunotesbysree
 
DATA STRUCTURES
DATA STRUCTURESDATA STRUCTURES
DATA STRUCTURESbca2010
 

Viewers also liked (18)

ch13
ch13ch13
ch13
 
ch8
ch8ch8
ch8
 
Business model
Business modelBusiness model
Business model
 
DISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENT
DISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENTDISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENT
DISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENT
 
Trees data structure
Trees data structureTrees data structure
Trees data structure
 
SOLUTION MANUAL OF COMMUNICATION NETWORKS BY ALBERTO LEON GARCIA & INDRA WIDJAJA
SOLUTION MANUAL OF COMMUNICATION NETWORKS BY ALBERTO LEON GARCIA & INDRA WIDJAJASOLUTION MANUAL OF COMMUNICATION NETWORKS BY ALBERTO LEON GARCIA & INDRA WIDJAJA
SOLUTION MANUAL OF COMMUNICATION NETWORKS BY ALBERTO LEON GARCIA & INDRA WIDJAJA
 
Graphs data Structure
Graphs data StructureGraphs data Structure
Graphs data Structure
 
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
 
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSVTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
 
Problem Solving with Algorithms and Data Structure - Graphs
Problem Solving with Algorithms and Data Structure - GraphsProblem Solving with Algorithms and Data Structure - Graphs
Problem Solving with Algorithms and Data Structure - Graphs
 
Data structure & its types
Data structure & its typesData structure & its types
Data structure & its types
 
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
SOLUTION MANUAL OF COMPUTER ORGANIZATION BY CARL HAMACHER, ZVONKO VRANESIC & ...
 
Lecture8 data structure(graph)
Lecture8 data structure(graph)Lecture8 data structure(graph)
Lecture8 data structure(graph)
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structure
 
Graphs In Data Structure
Graphs In Data StructureGraphs In Data Structure
Graphs In Data Structure
 
Ocw chp6 2searchbinary
Ocw chp6 2searchbinaryOcw chp6 2searchbinary
Ocw chp6 2searchbinary
 
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
 
DATA STRUCTURES
DATA STRUCTURESDATA STRUCTURES
DATA STRUCTURES
 

Similar to ch2 (20)

jhbuhbhujnhyubhbuybuybuybbuhyybuybuybuybybyubyubybybb
jhbuhbhujnhyubhbuybuybuybbuhyybuybuybuybybyubyubybybbjhbuhbhujnhyubhbuybuybuybbuhyybuybuybuybybyubyubybybb
jhbuhbhujnhyubhbuybuybuybbuhyybuybuybuybybyubyubybybb
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
 
Relational Model
Relational ModelRelational Model
Relational Model
 
ch7
ch7ch7
ch7
 
03 Relational Databases.ppt
03 Relational Databases.ppt03 Relational Databases.ppt
03 Relational Databases.ppt
 
3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMS
 
3.ppt
3.ppt3.ppt
3.ppt
 
Relational database concept
Relational database conceptRelational database concept
Relational database concept
 
uniT 4 (1).pptx
uniT 4 (1).pptxuniT 4 (1).pptx
uniT 4 (1).pptx
 
relational model in Database Management.ppt.ppt
relational model in Database Management.ppt.pptrelational model in Database Management.ppt.ppt
relational model in Database Management.ppt.ppt
 
DBMS Unit-2.pdf
DBMS Unit-2.pdfDBMS Unit-2.pdf
DBMS Unit-2.pdf
 
Lec02
Lec02Lec02
Lec02
 
ch6
ch6ch6
ch6
 
Details of RDBMS.ppt
Details of RDBMS.pptDetails of RDBMS.ppt
Details of RDBMS.ppt
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01Sm relationaldatamodel-150423084157-conversion-gate01
Sm relationaldatamodel-150423084157-conversion-gate01
 
Relation model part 1
Relation model part 1Relation model part 1
Relation model part 1
 
Rdbms
RdbmsRdbms
Rdbms
 
Ch3 a
Ch3 aCh3 a
Ch3 a
 
Ch3
Ch3Ch3
Ch3
 

More from KITE www.kitecolleges.com (20)

BrainFingerprintingpresentation
BrainFingerprintingpresentationBrainFingerprintingpresentation
BrainFingerprintingpresentation
 
week-11x
week-11xweek-11x
week-11x
 
PPT (2)
PPT (2)PPT (2)
PPT (2)
 
week-10x
week-10xweek-10x
week-10x
 
week-1x
week-1xweek-1x
week-1x
 
week-18x
week-18xweek-18x
week-18x
 
ch14
ch14ch14
ch14
 
ch16
ch16ch16
ch16
 
holographic versatile disc
holographic versatile discholographic versatile disc
holographic versatile disc
 
week-22x
week-22xweek-22x
week-22x
 
week-16x
week-16xweek-16x
week-16x
 
week-5x
week-5xweek-5x
week-5x
 
week-6x
week-6xweek-6x
week-6x
 
week-3x
week-3xweek-3x
week-3x
 
Intro Expert Systems test-me.co.uk
Intro Expert Systems test-me.co.ukIntro Expert Systems test-me.co.uk
Intro Expert Systems test-me.co.uk
 
ch17
ch17ch17
ch17
 
ch4
ch4ch4
ch4
 
week-7x
week-7xweek-7x
week-7x
 
week-9x
week-9xweek-9x
week-9x
 
week-4x
week-4xweek-4x
week-4x
 

Recently uploaded

AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 

Recently uploaded (20)

AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 

ch2

  • 2.
  • 3. Example of a Relation 2.3 Database System Concepts - 5 th Edition, June 15, 2005
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. The customer Relation 2.8 Database System Concepts - 5 th Edition, June 15, 2005
  • 9. The depositor Relation 2.9 Database System Concepts - 5 th Edition, June 15, 2005
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Schema Diagram 2.14 Database System Concepts - 5 th Edition, June 15, 2005
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24. Banking Example branch (branch_name, branch_city, assets) customer (customer_name, customer_street, customer_city) account (account_number, branch_name, balance) loan (loan_number, branch_name, amount) depositor (customer_name, account_number) borrower (customer_name, loan_number) 2.24 Database System Concepts - 5 th Edition, June 15, 2005
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68. Figure 2.3. The branch relation 2.68 Database System Concepts - 5 th Edition, June 15, 2005
  • 69. Figure 2.6: The loan relation 2.69 Database System Concepts - 5 th Edition, June 15, 2005
  • 70. Figure 2.7: The borrower relation 2.70 Database System Concepts - 5 th Edition, June 15, 2005
  • 71. Figure 2.9 Result of  branch_name = “Perryridge” ( loan ) 2.71 Database System Concepts - 5 th Edition, June 15, 2005
  • 72. Figure 2.10: Loan number and the amount of the loan 2.72 Database System Concepts - 5 th Edition, June 15, 2005
  • 73. Figure 2.11: Names of all customers who have either an account or an loan 2.73 Database System Concepts - 5 th Edition, June 15, 2005
  • 74. Figure 2.12: Customers with an account but no loan 2.74 Database System Concepts - 5 th Edition, June 15, 2005
  • 75. Figure 2.13: Result of borrower |X| loan 2.75 Database System Concepts - 5 th Edition, June 15, 2005
  • 76. Figure 2.14 2.76 Database System Concepts - 5 th Edition, June 15, 2005
  • 77. Figure 2.15 2.77 Database System Concepts - 5 th Edition, June 15, 2005
  • 78. Figure 2.16 2.78 Database System Concepts - 5 th Edition, June 15, 2005
  • 79. Figure 2.17 Largest account balance in the bank 2.79 Database System Concepts - 5 th Edition, June 15, 2005
  • 80. Figure 2.18: Customers who live on the same street and in the same city as Smith 2.80 Database System Concepts - 5 th Edition, June 15, 2005
  • 81. Figure 2.19: Customers with both an account and a loan at the bank 2.81 Database System Concepts - 5 th Edition, June 15, 2005
  • 82. Figure 2.20 2.82 Database System Concepts - 5 th Edition, June 15, 2005
  • 83. Figure 2.21 2.83 Database System Concepts - 5 th Edition, June 15, 2005
  • 84. Figure 2.22 2.84 Database System Concepts - 5 th Edition, June 15, 2005
  • 85. Figure 2.23 2.85 Database System Concepts - 5 th Edition, June 15, 2005
  • 86. Figure 2.24: The credit_info relation 2.86 Database System Concepts - 5 th Edition, June 15, 2005
  • 87. Figure 2.25 2.87 Database System Concepts - 5 th Edition, June 15, 2005
  • 88. Figure 2.26: The pt_works relation 2.88 Database System Concepts - 5 th Edition, June 15, 2005
  • 89. Figure 2.27 The pt_works relation after regrouping 2.89 Database System Concepts - 5 th Edition, June 15, 2005
  • 90. Figure 2.28 2.90 Database System Concepts - 5 th Edition, June 15, 2005
  • 91. Figure 2.29 2.91 Database System Concepts - 5 th Edition, June 15, 2005
  • 92. Figure 2.30 The employee and ft_works relations 2.92 Database System Concepts - 5 th Edition, June 15, 2005
  • 93. Figure 2.31 2.93 Database System Concepts - 5 th Edition, June 15, 2005
  • 94. Figure 2.32 2.94 Database System Concepts - 5 th Edition, June 15, 2005
  • 95. Figure 2.33 2.95 Database System Concepts - 5 th Edition, June 15, 2005
  • 96. Figure 2.34 2.96 Database System Concepts - 5 th Edition, June 15, 2005