SlideShare a Scribd company logo
1 of 40
Database System Conceps : CH2 Exercises and solutions
Relation Algebra ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Problem 2.1.
Problem 2.1.a. σ (Street = M_street ∧ City = M_city) ( 위  relation) t1 ← employee  manages t2 ← ρ manager (manager_name, m_street, m_city) (employee) Person_name Street City Manager_name M_street M_city Person_name Street City Manager_name Manager_name M_street M_city
Problem 2.1.a. t1 ← employee  manages t2 ← ρ manager (manager_name, m_street, m_city) (employee) Π (person_name)  σ (Street = M_street ∧ City = M_city) (t1  t2) Person_name Street City Manager_name M_street M_city Person_name Street City Manager_name Manager_name M_street M_city
Problem 2.1.a. t1 ← employee  manages t2 ← ρ manager (manager_name, m_street, m_city) (employee) Π (person_name)  σ (Street = M_street ∧ City = M_city) (t1  t2)
Problem 2.1.b.
Problem 2.1.b. wrong answer! Set different operation  할 때에  attribute 의 수가 동일해야 함 ! person_name company_name salary person_name
Problem 2.1.c.
Problem 2.1.c.
Problem 2.1.c.
Problem 2.3.a.
Problem 2.3.a. wrong answer! Update  할 때에 정보의 누수를 조심 !
Problem 2.3.b.
Problem 2.5.a.
Problem 2.5.b. & 2.5.c
Problem 2.5.d. & 2.5.e
Problem 2.6.
Problem 2.6.a.
Problem 2.6.a.
Problem 2.6.b. & 2.6.c
Problem 2.7.a.
Problem 2.7.b.
Problem 2.7.b.
Problem 2.7.c.
Problem 2.8.a. t1 account_number count(customer_name)
Problem 2.8.b. account customer 1 customer 2 customer 3
Problem 2.8.b. account customer 1 customer 2 customer 3 depositor 1 account 1 customer 1 depositor 2 account 2 customer 2 depositor 3 account 3 customer 3
Problem 2.8.b. account customer 1 customer 2 customer 3 customer 1 customer 2 customer 3 account 1 account 2 account 3 depositor 1 account 1 customer 1 depositor 2 account 2 customer 2 depositor 3 account 3 customer 3
Problem 2.8.b. account customer 1 customer 2 customer 3 customer 1 customer 2 customer 3 account depositor 1 account 1 customer 1 depositor 2 account 2 customer 2 depositor 3 account 3 customer 3
Problem 2.8.b.
Problem 2.9.a. t1 t2 company_name count-distinct(person_name) max(count-tistinct(person_name)
Problem 2.9.b.
Problem 2.9.b.
Problem 2.9.c.
Problem 2.11.a
Problem 2.11.b.
Problem 2.11.c. common mistake! t1 name 이 존재하지 않음 ! empno count_distinct(isbn) empno name office age isbn title authors publisher date
Problem 2.11.c. & 2.11.d
Thanks to listening! :D 질문이 있다면 ? e-mail :  [email_address] twitter :  http://twitter.com/tm_kor facebook :  http://bit.ly/alTaCE always open!

More Related Content

What's hot (11)

GMAT Geometry - everything you need to know
GMAT Geometry - everything you need to know GMAT Geometry - everything you need to know
GMAT Geometry - everything you need to know
 
Excel assignment
Excel assignmentExcel assignment
Excel assignment
 
word excel pp
word excel ppword excel pp
word excel pp
 
HTML practical file
HTML practical fileHTML practical file
HTML practical file
 
4 ac1 02_que_20201113
4 ac1 02_que_202011134 ac1 02_que_20201113
4 ac1 02_que_20201113
 
Html
HtmlHtml
Html
 
Build a Website Using HTML + CSS
Build a Website Using HTML + CSSBuild a Website Using HTML + CSS
Build a Website Using HTML + CSS
 
Html tables examples
Html tables   examplesHtml tables   examples
Html tables examples
 
Html 5 tags
Html  5 tagsHtml  5 tags
Html 5 tags
 
cxc.Mathsexam1
cxc.Mathsexam1cxc.Mathsexam1
cxc.Mathsexam1
 
Final Transcript BBA
Final Transcript BBAFinal Transcript BBA
Final Transcript BBA
 

Similar to Assignment1 solution

Linear programming - Model formulation, Graphical Method
Linear programming  - Model formulation, Graphical MethodLinear programming  - Model formulation, Graphical Method
Linear programming - Model formulation, Graphical Method
Joseph Konnully
 
Vcs slides on or 2014
Vcs slides on or 2014Vcs slides on or 2014
Vcs slides on or 2014
Shakti Ranjan
 
You can use a calculator to do numerical calculations. No graphing.docx
You can use a calculator to do numerical calculations. No graphing.docxYou can use a calculator to do numerical calculations. No graphing.docx
You can use a calculator to do numerical calculations. No graphing.docx
jeffevans62972
 
Sample Exam Questions on Python for revision
Sample Exam Questions on Python for revisionSample Exam Questions on Python for revision
Sample Exam Questions on Python for revision
afsheenfaiq2
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
IIUM
 

Similar to Assignment1 solution (20)

LinearProgramming-Graphicalnethod.ppt
LinearProgramming-Graphicalnethod.pptLinearProgramming-Graphicalnethod.ppt
LinearProgramming-Graphicalnethod.ppt
 
Linear programming - Model formulation, Graphical Method
Linear programming  - Model formulation, Graphical MethodLinear programming  - Model formulation, Graphical Method
Linear programming - Model formulation, Graphical Method
 
linearprogramming.pdf
linearprogramming.pdflinearprogramming.pdf
linearprogramming.pdf
 
Group members
Group membersGroup members
Group members
 
Vcs slides on or 2014
Vcs slides on or 2014Vcs slides on or 2014
Vcs slides on or 2014
 
Oop project
Oop projectOop project
Oop project
 
Idea for ineractive programming language
Idea for ineractive programming languageIdea for ineractive programming language
Idea for ineractive programming language
 
Proyecto parcial ii_grupo2.docx
Proyecto parcial ii_grupo2.docxProyecto parcial ii_grupo2.docx
Proyecto parcial ii_grupo2.docx
 
Introduction to Optimum Design 4th Edition Arora Solutions Manual
Introduction to Optimum Design 4th Edition Arora Solutions ManualIntroduction to Optimum Design 4th Edition Arora Solutions Manual
Introduction to Optimum Design 4th Edition Arora Solutions Manual
 
901131 examples
901131 examples901131 examples
901131 examples
 
1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx
 
TALLER PARCIAL II CÁLCULO 3246 (CASTRO,SALAZAR,SHIGUANGO)
TALLER PARCIAL II CÁLCULO 3246 (CASTRO,SALAZAR,SHIGUANGO)TALLER PARCIAL II CÁLCULO 3246 (CASTRO,SALAZAR,SHIGUANGO)
TALLER PARCIAL II CÁLCULO 3246 (CASTRO,SALAZAR,SHIGUANGO)
 
NPTEL QUIZ.docx
NPTEL QUIZ.docxNPTEL QUIZ.docx
NPTEL QUIZ.docx
 
Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj...
 Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj... Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj...
Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj...
 
You can use a calculator to do numerical calculations. No graphing.docx
You can use a calculator to do numerical calculations. No graphing.docxYou can use a calculator to do numerical calculations. No graphing.docx
You can use a calculator to do numerical calculations. No graphing.docx
 
QT Slides Class One
QT Slides Class OneQT Slides Class One
QT Slides Class One
 
Sample Exam Questions on Python for revision
Sample Exam Questions on Python for revisionSample Exam Questions on Python for revision
Sample Exam Questions on Python for revision
 
Strategic intervention materials on mathematics 2.0
Strategic intervention materials on mathematics 2.0Strategic intervention materials on mathematics 2.0
Strategic intervention materials on mathematics 2.0
 
LalitBDA2015V3
LalitBDA2015V3LalitBDA2015V3
LalitBDA2015V3
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

Assignment1 solution