Database 2019-02: Difference between revisions

From Innovation
Jump to: navigation, search
 
(33 intermediate revisions by the same user not shown)
Line 4: Line 4:
!Class Info
!Class Info
|-
|-
| '''Class'''  || ETA00137 - 데이터베이스
| '''Class'''  || ETA00007 - 데이터베이스
|-
|-
| '''Lecturer''' || Seongjin Lee
| '''Lecturer''' || Seongjin Lee
Line 10: Line 10:
| '''Time and Place''' ||  407-202 Tuesday 16:00-20:00  
| '''Time and Place''' ||  407-202 Tuesday 16:00-20:00  
|-
|-
| '''Office Hour''' || Tuesday: 16:00-20:00
| '''Office Hour''' || Tuesday: 14:00-16:00
|-
|-
| '''Contacts''' ||  Office: 407-314
| '''Contacts''' ||  Office: 407-314
Line 67: Line 67:
All discussions and assignments are to be submitted in Piazza. Enroll into the class through the following link.
All discussions and assignments are to be submitted in Piazza. Enroll into the class through the following link.


== Lecture Plan ==
== Lecture Plan ==
{|class="wikitable"
{|class="wikitable"
|-
|-
| width="25px" style="background: Turquoise; text-align:center;" | #
| width="25px" style="background: Turquoise; text-align:center;" | #
| width="50%" style="background: Turquoise; text-align:left;" | Topic & material
| width="50%" style="background: Turquoise; text-align:left;" | Topic & material
| width="5%" style="background: Turquoise; text-align:left;" | Readings
| width="5%" style="background: Turquoise; text-align:left;" | Readings
| width="45%" style="background: Turquoise; text-align:left;" | Assignments
| width="45%" style="background: Turquoise; text-align:left;" | Assignments
|-
|-
| style="text-align:center;" | 1
| style="text-align:center;" | 1
| style="vertical-align: top;"| '''Course Overview and Database History'''
| style="vertical-align: top;"| '''Course Overview and Database History'''
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day01/Day01_Intro.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day01/Day01_Intro.pdf pdf] ]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day01/Day01_Intro.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day01/Day01_Intro.pdf pdf] ]
<br> '''Worksheet:'''
<br> '''Worksheet:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day01/dataset_1.db DB]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day01/dataset_1.db DB]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day01/DB-WS01a.ipynb Worksheet 1a]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day01/DB-WS01a.ipynb Worksheet 1a]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day01/DB-WS01b.ipynb Worksheet 1b]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day01/DB-WS01b.ipynb Worksheet 1b]
<br> If you haven't installed Jupyter, then please consult [[#JupyterInstall | Jupyter Installation Guide]]
<br> If you haven't installed Jupyter, then please consult [[#JupyterInstall | Jupyter Installation Guide]]
| style="vertical-align: top;"|
<br> '''Video:'''
| style="vertical-align: top;"|
<br> [https://www.youtube.com/watch?v=Xx1PyWyWkeo&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=2 Overview Part 1 (16:14)]
<br> [https://www.youtube.com/watch?v=_GypJDuTCMA&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=3 Overview Part 2 (14:48)]
<!-- Topic 2 -->
| style="vertical-align: top;"|
|-
| style="vertical-align: top;"|
| style="text-align:center;" | 2
| style="vertical-align: top;"| '''SQL Introduction Part I'''
<!-- Topic 2 -->
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/Day02_SQL_p1.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/Day02_SQL_p1.pdf pdf] ]
|-
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/Day02_worksheet.ipynb Notebook] ][ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/Day02_worksheet_eng.ipynb English] ]
| style="text-align:center;" | 2
<br> '''Worksheet:'''
| style="vertical-align: top;"| '''SQL Introduction Part I'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/dataset_1.db DB]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/Day02_SQL_p1.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/Day02_SQL_p1.pdf pdf] ]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/DB-WS02a.ipynb Worksheet 2a]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/Day02_worksheet.ipynb Notebook] ][ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/Day02_worksheet_eng.ipynb English] ]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/DB-WS02b.ipynb Worksheet 2b]
<br> '''Worksheet:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/DB-WS02c.ipynb Worksheet 2c]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/dataset_1.db DB]
| style="vertical-align: top;"| Ch. 6
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/DB-WS02a.ipynb Worksheet 2a]
| style="vertical-align: top;"| '''Assignment 1 '''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/DB-WS02b.ipynb Worksheet 2b]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day02/DB-WS02c.ipynb Worksheet 2c]
<br> '''Video:'''
<br> [https://www.youtube.com/watch?v=egNBweUhpEI&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=4 Basic SQL 1 Part 1 Schema (18:35)]
<br> [https://www.youtube.com/watch?v=isorfcTBxVY&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=5 Basic SQL 1 Part 2 Single Table Query (10:20)]
<br> [https://www.youtube.com/watch?v=TpOO2YiIoZg&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=6 Basic SQL 1 Part 3 Multi table query (9:48)]
<br> [https://www.youtube.com/watch?v=itroznpVhM4&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=7 Basic SQL 1 Part 4 Join Ex (9:25)]
<br> [https://www.youtube.com/watch?v=EznSrTJlqOM&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=8 Basic SQL 1 Part 5 Join Semantic (10:05)]
| style="vertical-align: top;"| Ch. 6
| style="vertical-align: top;"| '''Assignment 1 '''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/HW1.ipynb Assignment 1] [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/en/HW1.ipynb [English]]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/HW1.ipynb Assignment 1] [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/en/HW1.ipynb [English]]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/correct_output.txt Correct Output] [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/en/correct_output.txt [English]]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/correct_output.txt Correct Output] [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/en/correct_output.txt [English]]
Line 105: Line 114:
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/sanity_check.py Sanity checker script (run on the terminal)] [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/en/sanity_check.py [English]]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/sanity_check.py Sanity checker script (run on the terminal)] [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/en/sanity_check.py [English]]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/submit.py Answer Template] [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/en/submit.py [English]]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/submit.py Answer Template] [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/en/submit.py [English]]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/submission_instructions.txt Instructions on submitting the assignment] [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/en/submission_instructions.txt [English]]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/submission_instructions.txt Instructions on submitting the assignment] [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/en/submission_instructions.txt [English]]
 
<br>
|-
<br>Due 20191008
|
<br>
| video: [https://www.youtube.com/watch?v=JC9hxJbEZAk&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=4 Basic SQL 01][https://www.youtube.com/watch?v=3TocKYagbto&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=3 Basic SQL 02]
<br>[https://docs.google.com/forms/d/e/1FAIpQLSc77xOpv5Pjtgn9rJau3iXshMjMRbjRk_LLeDtLkRG0oi1Yhw/viewform?usp=sf_link quiz]
|
|
<!-- Topic 3 -->
<!-- Topic 3 -->
|-
|-
| style="text-align:center;" | 3
| style="text-align:center;" | 3
| style="vertical-align: top;"| '''SQL Introduction Part II'''
| style="vertical-align: top;"| '''SQL Introduction Part II'''
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/Day_03_SQL_p2.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/Day_03_SQL_p2.pdf pdf] ]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/Day_03_SQL_p2.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/Day_03_SQL_p2.pdf pdf] ]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/Day03_worksheet.ipynb Notebook] ]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/Day03_worksheet.ipynb Notebook] ]
<br> '''Worksheet:'''
<br> '''Worksheet:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/dataset_1.db DB]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/dataset_1.db DB]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/DB-WS03a.ipynb Worksheet 3a]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/DB-WS03a.ipynb Worksheet 3a]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/DB-WS03b.ipynb Worksheet 3b]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/DB-WS02b.ipynb Worksheet 3b]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/DB-WS03c.ipynb Worksheet 3c]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day03/DB-WS03c.ipynb Worksheet 3c]
<br> '''Video:'''
| style="vertical-align: top;"| Ch. 6
<br> [https://www.youtube.com/watch?v=fBS3J9gIyqs&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=9 Basic SQL 2 01 (multiset operations) 8:09]
| style="vertical-align: top;"|
<br> [https://www.youtube.com/watch?v=IDIsWemryn4&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=10 Basic SQL 2 02 (nested query) 8:50]
<br> [https://www.youtube.com/watch?v=NnIrnl3RwP4&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=11 Basic SQL 2 03 (nested query 2) 7:12]
<br> [https://www.youtube.com/watch?v=Sn2eC9Jtkoc&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=16 Basic SQL 2 04 (aggregation) 14:10]
<!-- Topic 4 -->
<br> [https://www.youtube.com/watch?v=fjJDOX3eTj4&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=17 Basic SQL 2 05 (join) 11:46]
|-
| style="vertical-align: top;"| Ch. 6
| style="text-align:center;" | 4
| style="vertical-align: top;"| [https://docs.google.com/forms/d/e/1FAIpQLSf-eEsyro27h4yWYmfMVuC-RoWudJ9c1RWIebCbACpF46BpIg/viewform?usp=sf_link quiz]
| style="vertical-align: top;"| '''Databas Design with ER Diagrams'''
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day04/Day_04_ER.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day04/Day_04_ER.pdf pdf] ]
<br> '''Worksheet:'''
<!-- Topic 4 -->
<br> We are going to create an ER diagram in class with pencil and paper
|-
| style="vertical-align: top;"| Ch. 2
| style="text-align:center;" | 4
| style="vertical-align: top;"|
| style="vertical-align: top;"| '''Databas Design with ER Diagrams'''
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day04/Day_04_ER.pptx pptx] ][ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day04/Day_04_ER.pdf pdf] ]
<br> '''Worksheet:'''
<br> We are going to create an ER diagram in class with pencil and paper
<!-- Topic 5 -->
<br> '''Video:'''
|-
<br> [https://www.youtube.com/watch?v=K5MctgUSZ7A&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=12 ER Model Part 1 Entity Set (9:37)]
| style="text-align:center;" | 5
<br> [https://www.youtube.com/watch?v=sgrWRbxlexo&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=14 ER Model Part 2 Relationship (10:22)]
| style="vertical-align: top;"| '''Database Design Theory Part I'''
<br> [https://www.youtube.com/watch?v=3PS2iQgNfTw&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=13 ER Model Part 3 Multiplicity (11:48)]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day05/Day_05_Design_p1.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day05/Day_05_Design_p1.pdf pdf] ]
<br> [https://www.youtube.com/watch?v=QL27ml4cn60&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=15 ER Model Part 4 Design Consideration (6:08)]
<br> '''Worksheet:'''
<br> [https://www.youtube.com/watch?v=Hc7pwv0Fncw&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=18 ER Model Part 5 Subclass ISA (8:31)]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day05/DB-WS05a.ipynb Worksheet 5a]
<br> [https://www.youtube.com/watch?v=VGo8QcMw11o&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=19 ER Model Part 6 Constraints and Weak entity set (8:58)]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day05/closure_v2.py Closure visualization tool for python v2]
| style="vertical-align: top;"| Ch. 2
[http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day05/closure_v3.py / python v3]
| style="vertical-align: top;"| [[https://docs.google.com/forms/d/e/1FAIpQLSdJ-DTRM1RYhJhY5MuZbSfsl7bTH781bf70JiQ0T43d83MYTg/viewform?usp=sf_link quiz]] [[http://open.gnu.ac.kr/lecslides/2019-2-DB/Activity/ER_diagram.pdf worksheet]]
| style="vertical-align: top;"| Ch. 3.2-3.7
| style="vertical-align: top;"|
<!-- Topic 5 -->
|-
| style="text-align:center;" | 5
<!-- Topic 6 -->
| style="vertical-align: top;"| '''Database Design Theory Part I'''
|-
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day05/Day_05_Design_p1.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day05/Day_05_Design_p1.pdf pdf] ]
| style="text-align:center;" | 6
<br> '''Worksheet:'''
| style="vertical-align: top;"| '''Database Design Theory Part II'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day05/DB-WS05a.ipynb Worksheet 5a]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/Day_06_Design_p2.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/Day_06_Design_p2.pdf pdf] ]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day05/closure_v2.py Closure visualization tool for python v2]
<br> '''Worksheet:'''
[http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day05/closure_v3.py / python v3]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/DB-WS06a.ipynb Worksheet 6a]
<br> '''Video:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/DB-WS06a.ipynb Worksheet 6b]
<br> [https://www.youtube.com/watch?v=5nKKbcTpioI&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=23 Normal forms (10:39)]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/closure_v2.py Closure visualization tool for python v2]
<br> [https://www.youtube.com/watch?v=-kyE0HYQih0&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=20 Functional Dependencies (10:18)]
[http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/closure_v3.py / python v3]
<br> [https://www.youtube.com/watch?v=pNseyqwugbo&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=21 Finding FDs (14:35)]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/DB-WS-3NF.ipynb Excercises on 3rd Normal Form]
<br> [https://www.youtube.com/watch?v=nkVmt1NOfcU&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=22 Closure Part 1 (7:48)]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/DB-WS-MVDs.ipynb Excercises on Multi-Valued Dependency]
<br> [https://www.youtube.com/watch?v=r_FFYD29fdI&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=24 Closure Part 2 (7:43)]
| style="vertical-align: top;"|
| style="vertical-align: top;"| Ch. 3.2-3.7
| style="vertical-align: top;"| '''Assignment 2'''
| style="vertical-align: top;"| [[https://docs.google.com/forms/d/e/1FAIpQLSf1zr-cBgxv9f19lBntJpyCgd87R5IRMsQGdPjAagvqkehlyg/viewform?usp=sf_link quiz]] [[http://open.gnu.ac.kr/lecslides/2019-2-DB/Activity/FDandClosure.pdf worksheet]]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments2/HW2.ipynb Assignment 2]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments2/submit.py Answer Template]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments2/submission_instructions.txt Instructions on submitting the assignment]
<!-- Topic 6 -->
<!-- Topic 7 -->
|-
|-
| style="text-align:center;" | 6
| style="text-align:center;" | 7
| style="vertical-align: top;"| '''Database Design Theory Part II'''
| style="vertical-align: top;"| '''Transactions'''
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/Day_06_Design_p2.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/Day_06_Design_p2.pdf pdf] ]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day07/Day_07_TXNs.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day07/Day_07_TXNs.pdf pdf] ]
<br> '''Worksheet:'''
<br> '''Worksheet:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/DB-WS06a.ipynb Worksheet 6a]
| style="vertical-align: top;"| Ch. 8.6
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/DB-WS06a.ipynb Worksheet 6b]
| style="vertical-align: top;"|
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/closure_v2.py Closure visualization tool for python v2]
[http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/closure_v3.py / python v3]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/DB-WS-3NF.ipynb Excercises on 3rd Normal Form]
<!-- Topic 8 -->
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day06/DB-WS-MVDs.ipynb Excercises on Multi-Valued Dependency]
|-
<br> '''Video:'''
| style="text-align:center;" | 8
<br> [https://www.youtube.com/watch?v=uoRKjrGoLc8&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=25 BCNF (11:59)]
| style="vertical-align: top;"| '''Concurrency and Locks'''
<br> [https://www.youtube.com/watch?v=W5UyIzld6R4&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=26 Decomposition (12:36)]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/Day_08_Con_lock.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/Day_08_Con_lock.pdf pdf] ]
| style="vertical-align: top;"|
<br> '''Worksheet:'''
| style="vertical-align: top;"| '''Assignment 2'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/DB-WS08a.ipynb Worksheet 8a]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments2/HW2.ipynb Assignment 2]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/txn_viewer_v2.py Transaction visulization tool for pyton v2]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments2/submit.py Answer Template]
[http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/txn_viewer_v3.py / python v3]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments2/submission_instructions.txt Instructions on submitting the assignment]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/txnViewer.js Transaction visulation java script]
<br><br> [https://docs.google.com/forms/d/e/1FAIpQLSeQ-5cmY8Ymlz4VkFngOQQywX_EWk_2op2wiKixXZEfFJKZkw/viewform?usp=sf_link quiz]
| style="vertical-align: top;"| Ch. 18.1-18.4
| style="vertical-align: top;"|
<!-- Topic 7 -->
|-
| style="text-align:center;" | 7
<!-- Topic 9 -->
| style="vertical-align: top;"| '''Transactions'''
|-
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day07/Day_07_TXNs.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day07/Day_07_TXNs.pdf pdf] ]
| style="text-align:center;" | 9
<br> '''Worksheet:'''
| style="vertical-align: top;"| '''Buffer Manager and Introduction to External Merge algorithm'''
<br> '''Video:'''
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/Day_09_BM_EM.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/Day_09_BM_EM.pdf pdf] ]
<br> [https://www.youtube.com/watch?v=Xqb6cCANVIo&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=30 Transaction Introduction (6:18)]
<br> '''Worksheet:'''
<br> [https://www.youtube.com/watch?v=RT5aCN_KeIc&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=27 Motivation of Transaction (9:20)]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/DB-WS09a.ipynb Worksheet 9a]
<br> [https://www.youtube.com/watch?v=4ooLrwpO8Yg&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=28 Properties of Transaction (6:47)]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/EMS_Demo.ipynb External Merge Sort Workseet]
<br> [https://www.youtube.com/watch?v=nOhpNG2gR0M&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=29 Atomicity and durability via logging (12:34)]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/io_backend_v2.py Buffer manager engine for pyton v2]
| style="vertical-align: top;"| Ch. 8.6
[http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/io_backend_v3.py / python v3]
| style="vertical-align: top;"| [https://docs.google.com/forms/d/e/1FAIpQLSdI4tB4k0iRJdbgIk5iFRtqhwPrNtRdy7bksxp63ziVjvVXRw/viewform?usp=sf_link quiz]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/display_tools.py Display helper]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/compModel.js Modeling java script]
| style="vertical-align: top;"| Ch. 11.4
<!-- Topic 8 -->
| style="vertical-align: top;"|
|-
| style="text-align:center;" | 8
| style="vertical-align: top;"| '''Concurrency and Locks'''
<!-- Topic 10 -->
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/Day_08_Con_lock.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/Day_08_Con_lock.pdf pdf] ]
|-
<br> '''Worksheet:'''
| style="text-align:center;" | 10
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/DB-WS08a.ipynb Worksheet 8a]
| style="vertical-align: top;"| '''More on External Merge Sort'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/txn_viewer_v2.py Transaction visulization tool for pyton v2]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day10/Day_10_EMS.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day10/Day_10_EMS.pdf pdf] ]
[http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/txn_viewer_v3.py / python v3]
<br> '''Worksheet:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day08/txnViewer.js Transaction visulation java script]
| style="vertical-align: top;"|
<br> '''Video:'''
| style="vertical-align: top;"|
<br> [https://www.youtube.com/watch?v=ffIXWmZxY8I&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=31 Interleaving and Scheduling (10:15)]
<br> [https://www.youtube.com/watch?v=NqGA_KfsGqI&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=32 Conflicts (6:07)]
<br> [https://www.youtube.com/watch?v=F-9hfCO1u8g&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=33 Conflict Serializability (11:16)]
<!-- Topic 11 -->
<br> [https://www.youtube.com/watch?v=olj00HmP71U&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=34 Strict Two-phase locking (9:31)]
|-
| style="vertical-align: top;"| Ch. 18.1-18.4
| style="text-align:center;" | 11
| style="vertical-align: top;"| <br> [https://docs.google.com/forms/d/e/1FAIpQLSf_esRp4usgvJiNizGHEpk8W_JAZzfCvp3tD5flxpxo-aES5A/viewform?usp=sf_link quiz] <br><br><br><font color="red"> '''Exam on 29th, up to Day 08 at 16:30 in room 417-202 '''</font>
| style="vertical-align: top;"| '''Indexing'''
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day11/Day_11_Indexes.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day11/Day_11_Indexes.pdf pdf] ]
<br> '''Worksheet:'''
<!-- Topic 9 -->
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day11/DB-WS11a.ipynb Worksheet 11a]
|-
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day11/complaint.db Database for the worksheet]
| style="text-align:center;" | 9
| style="vertical-align: top;"| Ch. 13.1-13.3
| style="vertical-align: top;"| '''Buffer Manager and Introduction to External Merge algorithm'''
| style="vertical-align: top;"|
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/Day_09_BM_EM.pptx pptx] ]
<br> '''Worksheet:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/DB-WS09a.ipynb Worksheet 9a]
<!-- Topic 12 -->
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/EMS_Demo.ipynb External Merge Sort Workseet]
|-
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/io_backend_v2.py Buffer manager engine for pyton v2]
| style="text-align:center;" | 12
[http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/io_backend_v3.py / python v3]
| style="vertical-align: top;"| '''Join part 1'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/display_tools.py Display helper]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day12/Day12_Joins_p1.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day12/Day12_Joins_p1.pdf pdf] ]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day09/compModel.js Modeling java script]
<br> '''Worksheet:'''
<br><br> '''Video:'''
| style="vertical-align: top;"| Ch. 15
<br> [https://www.youtube.com/watch?v=C1Wq15UxzQ4&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=35 Disk, Buffer, and File system (8:55)]
| style="vertical-align: top;"|
<br> [https://www.youtube.com/watch?v=hJVlt8sLMC4&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=36 External Mege (8:00)]
| style="vertical-align: top;"| Ch. 11.4
| style="vertical-align: top;"|
<!-- Topic 13 -->
|-
| style="text-align:center;" | 13
<!-- Topic 10 -->
| style="vertical-align: top;"| '''Join part 1'''
|-
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day13/Day13_Joins_p2.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day13/Day13_Joins_p2.pdf pdf] ]
| style="text-align:center;" | 10
<br> '''Worksheet:'''
| style="vertical-align: top;"| '''More on External Merge Sort'''
| style="vertical-align: top;"| Ch. 15
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day10/Day_10_EMS.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day10/Day_10_EMS.pdf pdf] ]
| style="vertical-align: top;"|
<br> '''Worksheet:'''
<br><br> '''Video:'''
<br> [https://www.youtube.com/watch?v=z4S-puXQJPk&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=37 External Merge Sort (5:40)]
<!-- Topic 14 -->
<br> [https://www.youtube.com/watch?v=Gt5JHc0OsJs&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=38 External merge sort on larger files (3:00)]
|-
<br> [https://www.youtube.com/watch?v=48scgv9CXpE&list=PLWm33cHVRby7Av1hirp_TUWAnmWLvw8Nr&index=39 Optimizations for sorting (6:28)]
| style="text-align:center;" | 14
| style="vertical-align: top;"|
| style="vertical-align: top;"| '''Relational Algebra'''
| style="vertical-align: top;"|
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/Day_14_Algebra.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/Day_14_Algebra.pdf pdf] ]
<br> '''Worksheet:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/DB-WS014a.ipynb Worksheet 9a]
<!-- Topic 11 -->
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/DB-WS14a_tree.png Picture used for the Worksheet]
|-
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/relation_algebra_v2.py Relational Algebra for pyton v2]
| style="text-align:center;" | 11
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/display_tools.py Display helper]
| style="vertical-align: top;"| '''Indexing'''
| style="vertical-align: top;"| Ch. 2 and 16.3
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day11/Day_11_Indexes.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day11/Day_11_Indexes.pdf pdf] ]
| style="vertical-align: top;"|
<br> '''Worksheet:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day11/DB-WS11a.ipynb Worksheet 11a]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day11/complaint.db Database for the worksheet]
<!-- Topic 15 -->
| style="vertical-align: top;"| Ch. 13.1-13.3
|-
| style="vertical-align: top;"|
| style="text-align:center;" | 15
| style="vertical-align: top;"| '''Query Optimization'''
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/Day_15_Optimization.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/Day_15_Optimization.pdf pdf] ]
<!-- Topic 12 -->
<br> '''Worksheet:'''
|-
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/DB-WS015a.ipynb Worksheet 15a]
| style="text-align:center;" | 12
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/DB-WS015b.ipynb Worksheet 15b]
| style="vertical-align: top;"| '''Join part 1'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/complaint.db Database for the worksheet]
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day12/Day12_Joins_p1.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day12/Day12_Joins_p1.pdf pdf] ]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/relation_algebra_v2.py Relational Algebra for pyton v2]
<br> '''Worksheet:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/display_tools.py Display helper]
| style="vertical-align: top;"| Ch. 15
| style="vertical-align: top;"|
| style="vertical-align: top;"|
| style="vertical-align: top;"|
|}
<!-- Topic 13 -->
 
|-
 
| style="text-align:center;" | 13
 
| style="vertical-align: top;"| '''Join part 2'''
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day13/Day13_Joins_p2.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day13/Day13_Joins_p2.pdf pdf] ]
<br> '''Worksheet:'''
| style="vertical-align: top;"| Ch. 15
| style="vertical-align: top;"|
<!-- Topic 14 -->
|-
| style="text-align:center;" | 14
| style="vertical-align: top;"| '''Relational Algebra'''
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/Day_14_Algebra.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/Day_14_Algebra.pdf pdf] ]
<br> '''Worksheet:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/DB-WS014a.ipynb Worksheet 9a]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/DB-WS14a_tree.png Picture used for the Worksheet]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/relation_algebra_v2.py Relational Algebra for pyton v2]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day14/display_tools.py Display helper]
| style="vertical-align: top;"| Ch. 2 and 16.3
| style="vertical-align: top;"| <br><br><br><font color="red"> '''Exam on Dec 10th 16:00 in room 417-202 '''</font>
<!-- Topic 15 -->
|-
| style="text-align:center;" | 15
| style="vertical-align: top;"| '''Query Optimization'''
[ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/Day_15_Optimization.pptx pptx] ] [ [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/Day_15_Optimization.pdf pdf] ]
<br> '''Worksheet:'''
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/DB-WS015a.ipynb Worksheet 15a]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/DB-WS015b.ipynb Worksheet 15b]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/complaint.db Database for the worksheet]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/relation_algebra_v2.py Relational Algebra for pyton v2]
<br> [http://open.gnu.ac.kr/lecslides/2018-2-DB/Lectures/Day15/display_tools.py Display helper]
| style="vertical-align: top;"|
| style="vertical-align: top;"|
|}
<div id="JupyterInstall"></div>
<div id="JupyterInstall"></div>



Latest revision as of 11:28, 13 December 2019

Class Information

Class Info
Class ETA00007 - 데이터베이스
Lecturer Seongjin Lee
Time and Place 407-202 Tuesday 16:00-20:00
Office Hour Tuesday: 14:00-16:00
Contacts Office: 407-314
Email: insight at gnu dot ac dot kr

Course Introduction

In Database Management System (DBMS), we study the database which is organized and structured collection of data. DBMS is a software system which acts as intermediary between user or application and the data. It allows to navigate through the data and analyze the data. In this course, we are going to learn the core mechanism that holds the system together.

Goal

In this course, we are going to learn the essence of data base management system. Students are going to learn the following concepts.

  • Relational model
  • Entity-relational model
  • SQL
  • External, conceptual, physical levels of DMBS
  • Data definition language, Data manipulation language, query language
  • Data structures
  • Index
  • Transaction and Concurrency



Text Book

Main Textbook

Not necessarily required to buy the book

Supplementary Textbook

  • Database Systems : the Complete Book (Paperback) | Garcia-Molina, Ullman 지음 |Pearson Education Asia [link ][1판 번역본 ]
  • 만화로 쉽게 배우는 데이터베이스, Takahashi Mana 지음, 홍희정 옮김, Azuma Shouko 그림, 성안당
  • 데이터베이스 시스템 (AN INTRODUCTION TO DATABASE SYSTEMS), C.J. Date, Pearson, 2004


Evaluation

Categories Ratio Categories Ratio
Attendance 10 Quiz 10
Assignments 10 Midterm 30
Project 10 Final 30
Total 100%
  • All exams are closed book and closed notes
  • Any request for regrade must be made within one week of the time that the paper is returned, with no exception. You should describe in writing why the score is incorrect or graded unfairly. The written argument must be self-contained and can be evaluated based only on what is written on the paper.

Discussion

Please provide your info on this T.B.D.

All discussions and assignments are to be submitted in Piazza. Enroll into the class through the following link.

Lecture Plan

# Topic & material Readings Assignments
1 Course Overview and Database History

[ pptx ] [ pdf ]
Worksheet:
DB
Worksheet 1a
Worksheet 1b
If you haven't installed Jupyter, then please consult Jupyter Installation Guide
Video:
Overview Part 1 (16:14)
Overview Part 2 (14:48)

2 SQL Introduction Part I

[ pptx ] [ pdf ] [ Notebook ][ English ]
Worksheet:
DB
Worksheet 2a
Worksheet 2b
Worksheet 2c
Video:
Basic SQL 1 Part 1 Schema (18:35)
Basic SQL 1 Part 2 Single Table Query (10:20)
Basic SQL 1 Part 3 Multi table query (9:48)
Basic SQL 1 Part 4 Join Ex (9:25)
Basic SQL 1 Part 5 Join Semantic (10:05)

Ch. 6 Assignment 1


Assignment 1 [English]
Correct Output [English]
DB for the assignment (must be unzipped) [English]
Sanity checker script (run on the terminal) [English]
Answer Template [English]
Instructions on submitting the assignment [English]

Due 20191008

quiz

3 SQL Introduction Part II

[ pptx ] [ pdf ] [ Notebook ]
Worksheet:
DB
Worksheet 3a
Worksheet 3b
Worksheet 3c
Video:
Basic SQL 2 01 (multiset operations) 8:09
Basic SQL 2 02 (nested query) 8:50
Basic SQL 2 03 (nested query 2) 7:12
Basic SQL 2 04 (aggregation) 14:10
Basic SQL 2 05 (join) 11:46

Ch. 6 quiz


4 Databas Design with ER Diagrams

[ pptx ][ pdf ]
Worksheet:
We are going to create an ER diagram in class with pencil and paper
Video:
ER Model Part 1 Entity Set (9:37)
ER Model Part 2 Relationship (10:22)
ER Model Part 3 Multiplicity (11:48)
ER Model Part 4 Design Consideration (6:08)
ER Model Part 5 Subclass ISA (8:31)
ER Model Part 6 Constraints and Weak entity set (8:58)

Ch. 2 [quiz] [worksheet]


5 Database Design Theory Part I

[ pptx ] [ pdf ]
Worksheet:
Worksheet 5a
Closure visualization tool for python v2 / python v3
Video:
Normal forms (10:39)
Functional Dependencies (10:18)
Finding FDs (14:35)
Closure Part 1 (7:48)
Closure Part 2 (7:43)

Ch. 3.2-3.7 [quiz] [worksheet]



6 Database Design Theory Part II

[ pptx ] [ pdf ]
Worksheet:
Worksheet 6a
Worksheet 6b
Closure visualization tool for python v2 / python v3
Excercises on 3rd Normal Form
Excercises on Multi-Valued Dependency
Video:
BCNF (11:59)
Decomposition (12:36)

Assignment 2


Assignment 2
Answer Template
Instructions on submitting the assignment

quiz

7 Transactions

[ pptx ] [ pdf ]
Worksheet:
Video:
Transaction Introduction (6:18)
Motivation of Transaction (9:20)
Properties of Transaction (6:47)
Atomicity and durability via logging (12:34)

Ch. 8.6 quiz


8 Concurrency and Locks

[ pptx ] [ pdf ]
Worksheet:
Worksheet 8a
Transaction visulization tool for pyton v2 / python v3
Transaction visulation java script
Video:
Interleaving and Scheduling (10:15)
Conflicts (6:07)
Conflict Serializability (11:16)
Strict Two-phase locking (9:31)

Ch. 18.1-18.4
quiz


Exam on 29th, up to Day 08 at 16:30 in room 417-202


9 Buffer Manager and Introduction to External Merge algorithm

[ pptx ]
Worksheet:
Worksheet 9a
External Merge Sort Workseet
Buffer manager engine for pyton v2 / python v3
Display helper
Modeling java script

Video:
Disk, Buffer, and File system (8:55)
External Mege (8:00)

Ch. 11.4


10 More on External Merge Sort

[ pptx ] [ pdf ]
Worksheet:

Video:
External Merge Sort (5:40)
External merge sort on larger files (3:00)
Optimizations for sorting (6:28)


11 Indexing

[ pptx ] [ pdf ]
Worksheet:
Worksheet 11a
Database for the worksheet

Ch. 13.1-13.3


12 Join part 1

[ pptx ] [ pdf ]
Worksheet:

Ch. 15


13 Join part 2

[ pptx ] [ pdf ]
Worksheet:

Ch. 15


14 Relational Algebra

[ pptx ] [ pdf ]
Worksheet:
Worksheet 9a
Picture used for the Worksheet
Relational Algebra for pyton v2
Display helper

Ch. 2 and 16.3


Exam on Dec 10th 16:00 in room 417-202


15 Query Optimization

[ pptx ] [ pdf ]
Worksheet:
Worksheet 15a
Worksheet 15b
Database for the worksheet
Relational Algebra for pyton v2
Display helper



Working Environment Setup

Step 1: Installing Jupiter Notebook

Gentle reminder that, jupyter notebook best works at Linux


Option 1: Installation via Anaconda

It is recommended that you install Jupyter Notebook via Anaconda

  1. Download & install Anaconda for Python here
  2. Run jupyter notebook to confirm that it is properly installed

If Anaconda doesn't have jupyter: you can try running

conda install jupyter


Option 2: Installation via pip

You can also install via the python package manager pip

  1. Make sure you have installed
    • python and pip
  2. Make sure pip is updated to its latest version
    pip install --user --upgrade pip
  3. Install Jupyter Notebook
    pip install --user --upgrade jupyter


Installing other kernels and versions of python

When you are using Python3 and want to switch to Python2 in the notebook,

python2 -m pip install ipykernel

python2 -m ipykernel install —user

After restarting the Jupyter, you can chose different kernel in Jupyter notebook.

Step 2: Installing Other Dependencies

Git

Git is a version control system which we use to store the various course material; you can download from here

  • you can download the course material from here
  • If you want the up-to-date version of the course material, checkout the course repository from the git by typing the following command

IPython-SQL

python-sql allows you to use SQL queries inside jupyter notebooks; install using pip

  • pip install --user --upgrade ipython-sql

other modules

you will be needing

  • markdown
  • numpy
  • pandas

Step 3: Getting Started

Getting the latest course materials

You can always access the latest course materials on the course website. You can download all at once and keep them synced by using git. To get started with this, run:

git clone https://github.com/resourceful/lecture_db YourDestination

Now you should have all the materials in Database; to get the latest version, run the following command in the repository.

git pull

To read the notebook

In the directory where the relevant course materials are, run:

jupyter notebook


Course Credit

Much of the materials of this lecture is based on CS145 of Stanford.