SlideShare une entreprise Scribd logo
1  sur  5
Télécharger pour lire hors ligne
Jennifer Widom
Relational Databases
Querying Relational
Databases
Jennifer Widom
Querying Relational Databases
Steps in creating and using a (relational) database
1. Design schema; create using DDL
2. “Bulk load” initial data
3. Repeat: execute queries and modifications
Jennifer Widom
Querying Relational Databases
Ad-hoc queries in high-level language
– All students with GPA > 3.7 applying to Stanford and MIT only
– All engineering departments in CA with < 500 applicants
– College with highest average accept rate over last 5 years
 Some easy to pose; some a bit harder
 Some easy for DBMS to execute efficiently; some harder
 “Query language” also used to modify data
Jennifer Widom
Querying Relational Databases
Queries return relations (“compositional”, “closed”)
Jennifer Widom
Querying Relational Databases
Query Languages
 Relational Algebra
 SQL
IDs of students with GPA > 3.7 applying to Stanford
Select Student.ID
From Student, Apply
Where Student.ID=Apply.ID
And GPA>3.7 and college=‘Stanford’

Contenu connexe

Similaire à Relational querying

W-JAX Performance Workshop - Database Performance
W-JAX Performance Workshop - Database PerformanceW-JAX Performance Workshop - Database Performance
W-JAX Performance Workshop - Database PerformanceAlois Reitbauer
 
A Behind-the-Scenes Look at Naviance From Both Sides of the Desk
A Behind-the-Scenes Look at Naviance From Both Sides of the DeskA Behind-the-Scenes Look at Naviance From Both Sides of the Desk
A Behind-the-Scenes Look at Naviance From Both Sides of the DeskNaviance
 
2019 DSA 105 Introduction to Data Science Week 5
2019 DSA 105 Introduction to Data Science Week 52019 DSA 105 Introduction to Data Science Week 5
2019 DSA 105 Introduction to Data Science Week 5Ferdin Joe John Joseph PhD
 
Covid Symtoms Analysis Report
Covid Symtoms Analysis ReportCovid Symtoms Analysis Report
Covid Symtoms Analysis ReportSatyamAgarwal28
 
Using the Grades Area for Achievements and Badges - 2014 Brightspace Ignite W...
Using the Grades Area for Achievements and Badges - 2014 Brightspace Ignite W...Using the Grades Area for Achievements and Badges - 2014 Brightspace Ignite W...
Using the Grades Area for Achievements and Badges - 2014 Brightspace Ignite W...D2L Barry
 
Jdbc slide for beginers
Jdbc slide for beginersJdbc slide for beginers
Jdbc slide for beginersAmbarish Rai
 
Selenium_Automation
Selenium_AutomationSelenium_Automation
Selenium_Automationmadhu g
 
Keyword-based Search and Exploration on Databases (SIGMOD 2011)
Keyword-based Search and Exploration on Databases (SIGMOD 2011)Keyword-based Search and Exploration on Databases (SIGMOD 2011)
Keyword-based Search and Exploration on Databases (SIGMOD 2011)weiw_oz
 
Student management system(stms)
Student management system(stms)Student management system(stms)
Student management system(stms)jarajana
 

Similaire à Relational querying (13)

W-JAX Performance Workshop - Database Performance
W-JAX Performance Workshop - Database PerformanceW-JAX Performance Workshop - Database Performance
W-JAX Performance Workshop - Database Performance
 
A Behind-the-Scenes Look at Naviance From Both Sides of the Desk
A Behind-the-Scenes Look at Naviance From Both Sides of the DeskA Behind-the-Scenes Look at Naviance From Both Sides of the Desk
A Behind-the-Scenes Look at Naviance From Both Sides of the Desk
 
INFS730
INFS730INFS730
INFS730
 
INFS730
INFS730INFS730
INFS730
 
ucd mis
ucd misucd mis
ucd mis
 
2019 DSA 105 Introduction to Data Science Week 5
2019 DSA 105 Introduction to Data Science Week 52019 DSA 105 Introduction to Data Science Week 5
2019 DSA 105 Introduction to Data Science Week 5
 
Covid Symtoms Analysis Report
Covid Symtoms Analysis ReportCovid Symtoms Analysis Report
Covid Symtoms Analysis Report
 
Using the Grades Area for Achievements and Badges - 2014 Brightspace Ignite W...
Using the Grades Area for Achievements and Badges - 2014 Brightspace Ignite W...Using the Grades Area for Achievements and Badges - 2014 Brightspace Ignite W...
Using the Grades Area for Achievements and Badges - 2014 Brightspace Ignite W...
 
Jdbc slide for beginers
Jdbc slide for beginersJdbc slide for beginers
Jdbc slide for beginers
 
Jdbc
JdbcJdbc
Jdbc
 
Selenium_Automation
Selenium_AutomationSelenium_Automation
Selenium_Automation
 
Keyword-based Search and Exploration on Databases (SIGMOD 2011)
Keyword-based Search and Exploration on Databases (SIGMOD 2011)Keyword-based Search and Exploration on Databases (SIGMOD 2011)
Keyword-based Search and Exploration on Databases (SIGMOD 2011)
 
Student management system(stms)
Student management system(stms)Student management system(stms)
Student management system(stms)
 

Plus de Tianlu Wang

14 pro resolution
14 pro resolution14 pro resolution
14 pro resolutionTianlu Wang
 
13 propositional calculus
13 propositional calculus13 propositional calculus
13 propositional calculusTianlu Wang
 
12 adversal search
12 adversal search12 adversal search
12 adversal searchTianlu Wang
 
11 alternative search
11 alternative search11 alternative search
11 alternative searchTianlu Wang
 
21 situation calculus
21 situation calculus21 situation calculus
21 situation calculusTianlu Wang
 
20 bayes learning
20 bayes learning20 bayes learning
20 bayes learningTianlu Wang
 
19 uncertain evidence
19 uncertain evidence19 uncertain evidence
19 uncertain evidenceTianlu Wang
 
18 common knowledge
18 common knowledge18 common knowledge
18 common knowledgeTianlu Wang
 
17 2 expert systems
17 2 expert systems17 2 expert systems
17 2 expert systemsTianlu Wang
 
17 1 knowledge-based system
17 1 knowledge-based system17 1 knowledge-based system
17 1 knowledge-based systemTianlu Wang
 
16 2 predicate resolution
16 2 predicate resolution16 2 predicate resolution
16 2 predicate resolutionTianlu Wang
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolutionTianlu Wang
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic searchTianlu Wang
 
08 uninformed search
08 uninformed search08 uninformed search
08 uninformed searchTianlu Wang
 

Plus de Tianlu Wang (20)

L7 er2
L7 er2L7 er2
L7 er2
 
L8 design1
L8 design1L8 design1
L8 design1
 
L9 design2
L9 design2L9 design2
L9 design2
 
14 pro resolution
14 pro resolution14 pro resolution
14 pro resolution
 
13 propositional calculus
13 propositional calculus13 propositional calculus
13 propositional calculus
 
12 adversal search
12 adversal search12 adversal search
12 adversal search
 
11 alternative search
11 alternative search11 alternative search
11 alternative search
 
10 2 sum
10 2 sum10 2 sum
10 2 sum
 
22 planning
22 planning22 planning
22 planning
 
21 situation calculus
21 situation calculus21 situation calculus
21 situation calculus
 
20 bayes learning
20 bayes learning20 bayes learning
20 bayes learning
 
19 uncertain evidence
19 uncertain evidence19 uncertain evidence
19 uncertain evidence
 
18 common knowledge
18 common knowledge18 common knowledge
18 common knowledge
 
17 2 expert systems
17 2 expert systems17 2 expert systems
17 2 expert systems
 
17 1 knowledge-based system
17 1 knowledge-based system17 1 knowledge-based system
17 1 knowledge-based system
 
16 2 predicate resolution
16 2 predicate resolution16 2 predicate resolution
16 2 predicate resolution
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolution
 
15 predicate
15 predicate15 predicate
15 predicate
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic search
 
08 uninformed search
08 uninformed search08 uninformed search
08 uninformed search
 

Dernier

Escort Service in Al Barsha +971509530047 UAE
Escort Service in Al Barsha +971509530047 UAEEscort Service in Al Barsha +971509530047 UAE
Escort Service in Al Barsha +971509530047 UAEvecevep119
 
Mapeh Music QUARTER FOUR Grade nine haha
Mapeh Music QUARTER FOUR Grade nine hahaMapeh Music QUARTER FOUR Grade nine haha
Mapeh Music QUARTER FOUR Grade nine hahaJoshuaAcido2
 
Bai tap thuc hanh Anh 6 Mai Lan Huong.docx
Bai tap thuc hanh Anh 6 Mai Lan Huong.docxBai tap thuc hanh Anh 6 Mai Lan Huong.docx
Bai tap thuc hanh Anh 6 Mai Lan Huong.docxbichthuyt81
 
Escort Service in Al Nahda +971509530047 UAE
Escort Service in Al Nahda +971509530047 UAEEscort Service in Al Nahda +971509530047 UAE
Escort Service in Al Nahda +971509530047 UAEvecevep119
 
Escort Service in Al Qusais +971509530047 UAE
Escort Service in Al Qusais +971509530047 UAEEscort Service in Al Qusais +971509530047 UAE
Escort Service in Al Qusais +971509530047 UAEvecevep119
 
Escort Service in Al Rigga +971509530047 UAE
Escort Service in Al Rigga +971509530047 UAEEscort Service in Al Rigga +971509530047 UAE
Escort Service in Al Rigga +971509530047 UAEvecevep119
 
The Masque of the Red Death Storyboard 2023
The Masque of the Red Death Storyboard 2023The Masque of the Red Death Storyboard 2023
The Masque of the Red Death Storyboard 2023magalybtapia
 
Escort Service in Al Jaddaf +971509530047 UAE
Escort Service in Al Jaddaf +971509530047 UAEEscort Service in Al Jaddaf +971509530047 UAE
Escort Service in Al Jaddaf +971509530047 UAEvecevep119
 
layered-cardboard-sculptures-miika-nyyssonen.pdf
layered-cardboard-sculptures-miika-nyyssonen.pdflayered-cardboard-sculptures-miika-nyyssonen.pdf
layered-cardboard-sculptures-miika-nyyssonen.pdfbaroquemodernist
 
Roadrunner Motel, Motel/Residence. Tucumcari, NM
Roadrunner Motel, Motel/Residence. Tucumcari, NMRoadrunner Motel, Motel/Residence. Tucumcari, NM
Roadrunner Motel, Motel/Residence. Tucumcari, NMroute66connected
 
San Jon Motel, Motel/Residence, San Jon, NM
San Jon Motel, Motel/Residence, San Jon, NMSan Jon Motel, Motel/Residence, San Jon, NM
San Jon Motel, Motel/Residence, San Jon, NMroute66connected
 
Subway Stand OFF storyboard by Raquel Acosta
Subway Stand OFF storyboard by Raquel AcostaSubway Stand OFF storyboard by Raquel Acosta
Subway Stand OFF storyboard by Raquel Acostaracosta58
 
Vocal Music of the Romantic Period ~ MAPEH.pptx
Vocal Music of the Romantic Period ~ MAPEH.pptxVocal Music of the Romantic Period ~ MAPEH.pptx
Vocal Music of the Romantic Period ~ MAPEH.pptxMikaelaKaye
 
Costume Breakdown for Olivia Cox 23.pdf
Costume Breakdown for Olivia Cox  23.pdfCostume Breakdown for Olivia Cox  23.pdf
Costume Breakdown for Olivia Cox 23.pdfLauraFagan6
 
New_Cross_Over (Comedy storyboard sample)
New_Cross_Over (Comedy storyboard sample)New_Cross_Over (Comedy storyboard sample)
New_Cross_Over (Comedy storyboard sample)DavonBrooks
 
Value Aspiration And Culture Theory of Architecture
Value Aspiration And Culture Theory of ArchitectureValue Aspiration And Culture Theory of Architecture
Value Aspiration And Culture Theory of ArchitectureDarrenMasbate
 
Teepee Curios, Curio shop, Tucumcari, NM
Teepee Curios, Curio shop, Tucumcari, NMTeepee Curios, Curio shop, Tucumcari, NM
Teepee Curios, Curio shop, Tucumcari, NMroute66connected
 
Dxb Call Girl +971509430017 Indian Call Girl in Dxb By Dubai Call Girl
Dxb Call Girl +971509430017 Indian Call Girl in Dxb By Dubai Call GirlDxb Call Girl +971509430017 Indian Call Girl in Dxb By Dubai Call Girl
Dxb Call Girl +971509430017 Indian Call Girl in Dxb By Dubai Call GirlYinisingh
 
Lindy's Coffee Shop, Restaurants-cafes, Albuquerque, NM
Lindy's Coffee Shop, Restaurants-cafes, Albuquerque, NMLindy's Coffee Shop, Restaurants-cafes, Albuquerque, NM
Lindy's Coffee Shop, Restaurants-cafes, Albuquerque, NMroute66connected
 
Kristy Soto's Industrial design Portfolio
Kristy Soto's Industrial design PortfolioKristy Soto's Industrial design Portfolio
Kristy Soto's Industrial design PortfolioKristySoto
 

Dernier (20)

Escort Service in Al Barsha +971509530047 UAE
Escort Service in Al Barsha +971509530047 UAEEscort Service in Al Barsha +971509530047 UAE
Escort Service in Al Barsha +971509530047 UAE
 
Mapeh Music QUARTER FOUR Grade nine haha
Mapeh Music QUARTER FOUR Grade nine hahaMapeh Music QUARTER FOUR Grade nine haha
Mapeh Music QUARTER FOUR Grade nine haha
 
Bai tap thuc hanh Anh 6 Mai Lan Huong.docx
Bai tap thuc hanh Anh 6 Mai Lan Huong.docxBai tap thuc hanh Anh 6 Mai Lan Huong.docx
Bai tap thuc hanh Anh 6 Mai Lan Huong.docx
 
Escort Service in Al Nahda +971509530047 UAE
Escort Service in Al Nahda +971509530047 UAEEscort Service in Al Nahda +971509530047 UAE
Escort Service in Al Nahda +971509530047 UAE
 
Escort Service in Al Qusais +971509530047 UAE
Escort Service in Al Qusais +971509530047 UAEEscort Service in Al Qusais +971509530047 UAE
Escort Service in Al Qusais +971509530047 UAE
 
Escort Service in Al Rigga +971509530047 UAE
Escort Service in Al Rigga +971509530047 UAEEscort Service in Al Rigga +971509530047 UAE
Escort Service in Al Rigga +971509530047 UAE
 
The Masque of the Red Death Storyboard 2023
The Masque of the Red Death Storyboard 2023The Masque of the Red Death Storyboard 2023
The Masque of the Red Death Storyboard 2023
 
Escort Service in Al Jaddaf +971509530047 UAE
Escort Service in Al Jaddaf +971509530047 UAEEscort Service in Al Jaddaf +971509530047 UAE
Escort Service in Al Jaddaf +971509530047 UAE
 
layered-cardboard-sculptures-miika-nyyssonen.pdf
layered-cardboard-sculptures-miika-nyyssonen.pdflayered-cardboard-sculptures-miika-nyyssonen.pdf
layered-cardboard-sculptures-miika-nyyssonen.pdf
 
Roadrunner Motel, Motel/Residence. Tucumcari, NM
Roadrunner Motel, Motel/Residence. Tucumcari, NMRoadrunner Motel, Motel/Residence. Tucumcari, NM
Roadrunner Motel, Motel/Residence. Tucumcari, NM
 
San Jon Motel, Motel/Residence, San Jon, NM
San Jon Motel, Motel/Residence, San Jon, NMSan Jon Motel, Motel/Residence, San Jon, NM
San Jon Motel, Motel/Residence, San Jon, NM
 
Subway Stand OFF storyboard by Raquel Acosta
Subway Stand OFF storyboard by Raquel AcostaSubway Stand OFF storyboard by Raquel Acosta
Subway Stand OFF storyboard by Raquel Acosta
 
Vocal Music of the Romantic Period ~ MAPEH.pptx
Vocal Music of the Romantic Period ~ MAPEH.pptxVocal Music of the Romantic Period ~ MAPEH.pptx
Vocal Music of the Romantic Period ~ MAPEH.pptx
 
Costume Breakdown for Olivia Cox 23.pdf
Costume Breakdown for Olivia Cox  23.pdfCostume Breakdown for Olivia Cox  23.pdf
Costume Breakdown for Olivia Cox 23.pdf
 
New_Cross_Over (Comedy storyboard sample)
New_Cross_Over (Comedy storyboard sample)New_Cross_Over (Comedy storyboard sample)
New_Cross_Over (Comedy storyboard sample)
 
Value Aspiration And Culture Theory of Architecture
Value Aspiration And Culture Theory of ArchitectureValue Aspiration And Culture Theory of Architecture
Value Aspiration And Culture Theory of Architecture
 
Teepee Curios, Curio shop, Tucumcari, NM
Teepee Curios, Curio shop, Tucumcari, NMTeepee Curios, Curio shop, Tucumcari, NM
Teepee Curios, Curio shop, Tucumcari, NM
 
Dxb Call Girl +971509430017 Indian Call Girl in Dxb By Dubai Call Girl
Dxb Call Girl +971509430017 Indian Call Girl in Dxb By Dubai Call GirlDxb Call Girl +971509430017 Indian Call Girl in Dxb By Dubai Call Girl
Dxb Call Girl +971509430017 Indian Call Girl in Dxb By Dubai Call Girl
 
Lindy's Coffee Shop, Restaurants-cafes, Albuquerque, NM
Lindy's Coffee Shop, Restaurants-cafes, Albuquerque, NMLindy's Coffee Shop, Restaurants-cafes, Albuquerque, NM
Lindy's Coffee Shop, Restaurants-cafes, Albuquerque, NM
 
Kristy Soto's Industrial design Portfolio
Kristy Soto's Industrial design PortfolioKristy Soto's Industrial design Portfolio
Kristy Soto's Industrial design Portfolio
 

Relational querying

  • 2. Jennifer Widom Querying Relational Databases Steps in creating and using a (relational) database 1. Design schema; create using DDL 2. “Bulk load” initial data 3. Repeat: execute queries and modifications
  • 3. Jennifer Widom Querying Relational Databases Ad-hoc queries in high-level language – All students with GPA > 3.7 applying to Stanford and MIT only – All engineering departments in CA with < 500 applicants – College with highest average accept rate over last 5 years  Some easy to pose; some a bit harder  Some easy for DBMS to execute efficiently; some harder  “Query language” also used to modify data
  • 4. Jennifer Widom Querying Relational Databases Queries return relations (“compositional”, “closed”)
  • 5. Jennifer Widom Querying Relational Databases Query Languages  Relational Algebra  SQL IDs of students with GPA > 3.7 applying to Stanford Select Student.ID From Student, Apply Where Student.ID=Apply.ID And GPA>3.7 and college=‘Stanford’