SlideShare ist ein Scribd-Unternehmen logo
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!

Weitere ähnliche Inhalte

Was ist angesagt?

ΠΛΗ10 ΜΑΘΗΜΑ 1.3 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ10 ΜΑΘΗΜΑ 1.3 (ΕΚΤΥΠΩΣΗ)ΠΛΗ10 ΜΑΘΗΜΑ 1.3 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ10 ΜΑΘΗΜΑ 1.3 (ΕΚΤΥΠΩΣΗ)
Dimitris Psounis
 
Machine Learning: Generative and Discriminative Models
Machine Learning: Generative and Discriminative ModelsMachine Learning: Generative and Discriminative Models
Machine Learning: Generative and Discriminative Models
butest
 
Combinations and permutations
Combinations and permutationsCombinations and permutations
Combinations and permutations
indu psthakur
 
ΠΛΗ30 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 4
ΠΛΗ30 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 4ΠΛΗ30 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 4
ΠΛΗ30 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 4
Dimitris Psounis
 
ΠΛΗ20 ΜΑΘΗΜΑ 0.1 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ20 ΜΑΘΗΜΑ 0.1 (ΕΚΤΥΠΩΣΗ)ΠΛΗ20 ΜΑΘΗΜΑ 0.1 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ20 ΜΑΘΗΜΑ 0.1 (ΕΚΤΥΠΩΣΗ)
Dimitris Psounis
 
εισαγωγή στην La tex για φοιτητές (latex greek-book-manual-math)
εισαγωγή στην La tex για φοιτητές (latex greek-book-manual-math)εισαγωγή στην La tex για φοιτητές (latex greek-book-manual-math)
εισαγωγή στην La tex για φοιτητές (latex greek-book-manual-math)
Christos Loizos
 
14. Query Optimization in DBMS
14. Query Optimization in DBMS14. Query Optimization in DBMS
14. Query Optimization in DBMS
koolkampus
 
ΠΛΗ20 ΜΑΘΗΜΑ 1.2 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ20 ΜΑΘΗΜΑ 1.2 (ΕΚΤΥΠΩΣΗ)ΠΛΗ20 ΜΑΘΗΜΑ 1.2 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ20 ΜΑΘΗΜΑ 1.2 (ΕΚΤΥΠΩΣΗ)
Dimitris Psounis
 

Was ist angesagt? (20)

Combinatorics
CombinatoricsCombinatorics
Combinatorics
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
 
DMQL(Data Mining Query Language).pptx
DMQL(Data Mining Query Language).pptxDMQL(Data Mining Query Language).pptx
DMQL(Data Mining Query Language).pptx
 
ΠΛΗ10 ΜΑΘΗΜΑ 1.3 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ10 ΜΑΘΗΜΑ 1.3 (ΕΚΤΥΠΩΣΗ)ΠΛΗ10 ΜΑΘΗΜΑ 1.3 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ10 ΜΑΘΗΜΑ 1.3 (ΕΚΤΥΠΩΣΗ)
 
Predicate calculus
Predicate calculusPredicate calculus
Predicate calculus
 
Parametric & Non-Parametric Machine Learning (Supervised ML)
Parametric & Non-Parametric Machine Learning (Supervised ML)Parametric & Non-Parametric Machine Learning (Supervised ML)
Parametric & Non-Parametric Machine Learning (Supervised ML)
 
Machine Learning: Generative and Discriminative Models
Machine Learning: Generative and Discriminative ModelsMachine Learning: Generative and Discriminative Models
Machine Learning: Generative and Discriminative Models
 
Combinations and permutations
Combinations and permutationsCombinations and permutations
Combinations and permutations
 
A Simple Introduction to Word Embeddings
A Simple Introduction to Word EmbeddingsA Simple Introduction to Word Embeddings
A Simple Introduction to Word Embeddings
 
Hyperparameter Tuning
Hyperparameter TuningHyperparameter Tuning
Hyperparameter Tuning
 
ΠΛΗ30 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 4
ΠΛΗ30 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 4ΠΛΗ30 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 4
ΠΛΗ30 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 4
 
Kruskal’s algorithm
Kruskal’s algorithmKruskal’s algorithm
Kruskal’s algorithm
 
ΠΛΗ20 ΜΑΘΗΜΑ 0.1 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ20 ΜΑΘΗΜΑ 0.1 (ΕΚΤΥΠΩΣΗ)ΠΛΗ20 ΜΑΘΗΜΑ 0.1 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ20 ΜΑΘΗΜΑ 0.1 (ΕΚΤΥΠΩΣΗ)
 
εισαγωγή στην La tex για φοιτητές (latex greek-book-manual-math)
εισαγωγή στην La tex για φοιτητές (latex greek-book-manual-math)εισαγωγή στην La tex για φοιτητές (latex greek-book-manual-math)
εισαγωγή στην La tex για φοιτητές (latex greek-book-manual-math)
 
Case based reasoning technique
Case based reasoning techniqueCase based reasoning technique
Case based reasoning technique
 
Regular expression
Regular expressionRegular expression
Regular expression
 
14. Query Optimization in DBMS
14. Query Optimization in DBMS14. Query Optimization in DBMS
14. Query Optimization in DBMS
 
combinatorics
combinatoricscombinatorics
combinatorics
 
ΠΛΗ20 ΜΑΘΗΜΑ 1.2 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ20 ΜΑΘΗΜΑ 1.2 (ΕΚΤΥΠΩΣΗ)ΠΛΗ20 ΜΑΘΗΜΑ 1.2 (ΕΚΤΥΠΩΣΗ)
ΠΛΗ20 ΜΑΘΗΜΑ 1.2 (ΕΚΤΥΠΩΣΗ)
 
Inclusion exclusion principle
Inclusion exclusion principleInclusion exclusion principle
Inclusion exclusion principle
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
Avinash Rai
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
heathfieldcps1
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
ashishpaul799
 

Kürzlich hochgeladen (20)

Advances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfAdvances in production technology of Grapes.pdf
Advances in production technology of Grapes.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
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptx
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 

Assignment1 solution