Logged in as: guest Log in

Announcements


  • December 16: Your Final Exam can be downloaded from this link. Remember to use your UNC ONYEN to identify yourself. You will have until 11:00am to complete your test and submit it using the supplied link at the bottom of your test or here. You may, and are encouraged to, bank intermediate submissions. Once the submission system times out, no further uploads will be allowed. 
  • December 13: I will hold a final study session tomorrow 12/14 from 3pm-5pm in SN325 (the conference room down the hall from my office).
  • December 10: If there is interest, I am considering adding a Final study session. It would most likely be on 12/14 in the afternoon. Stay tuned for anncocement of a time and place.
  • December 1: Unfortunately, I will be unable to attend my office hours today. I will reschedule for tomorrow afternoon.
  • November 18: The final problem set, Problem Set #5 is now online. It is due on 12/02. If you have problems downloading the notebook from this link use the one in the schedule.
  • November 16: The grades for the second midterm are now online. I have regraded problems 3 and 14 to reflect our discussions in class.
  • November 11: The second midterm is now online. Remember to use your UNC ONYEN to identify yourself. Recall that your ONYEN is the userid before the '@' in your unc email address. You will have until 11:00am to complete your test and submit it using the supplied link at the bottom of your test or here. You may, and are encouraged to, bank intermediate submissions. Once the submission system times out, no further uploads will be allowed. 
  • November 2: Problem Set #4 is now on-line and due on 11/14.  If you have problems downloading the notebook from this link use the one in the schedule.
  • October 28: The seocond midterm has been rescheduled for November 11th.
  • October 12: Here are some hints and clarifications on Problem Set 3
    • An "mid" identifes a Monkepo "species", not any particular appearance.
    • Your Monkepo table should contain one row for each distinct Mokepo "species" 
      (of which there are less than 200).
    • Your Appearance table should have one row for each line from the file you were given.
    • Your Type table should have one or two rows for every row in the Monkepo table
    • In part 5. You should return the rarest and most common monkepo of each type regardless of whether it is a major or minor class.

                                               Type,  Rarest, MostCommon
                                               Toxic,    xxxx,    yyyy
                                               Boring,  xxxx,    zzzz
      It is possible that the same monkepo could be the most common or rarest for more than one type.
  • October 4: Problem Set #3 is now on-line and due on 10/17.  If you have problems downloading the notebook from this link use the one in the schedule.
  • September 30: The first midterm can be downloaded from here. Remember to use your UNC ONYEN to identify yourself. By the way, your ONYEN is the userid before the '@' in your unc email address. Do not include the "@live.unc.edu" domain name information. You will have until 11:00am to complete your test and submit it using the supplied link at the bottom of your test or here. You may, and are encouraged to, bank intermediate submissions. Once the submission system times out, no further uploads will be allowed. 
  • September 16: A revised Problem Set #2 V1.1 is now online. I fixed "double-bat-questions".
  • September 16: Problem Set #2 is now online and is due on 9/26 before midnight.
  • September 12: The problem set has be revised to 1.2. The changes are relatively minor, and will likely not effect your answer unless you are particularly punctilious. They include some clarification of whose siblings, ancestors, and decendents are requested, and reference to the name of a movie was changed to title.
  • September 7: Download the revised version 1.1 of the problem set (small typos fixed)
  • September 7: Problem Set #1 is now on-line and is due on 9/16 before midnight.
  • August 24: First day of class and the course syllabus.

Course Description


Databases are an indispensable tool for managing information, and a course on the principles and practice of database systems is now an integral part of any computer science curricula. This course covers the fundamentals of modern database management systems, in particular relational database systems.

The material covered in Comp 521 can be broken into three areas of emphasis. The first area includes database foundation material such as the relational model, relational algebra, relational calculus, and normal forms. The second area of emphasis is database application programming and includes among others the topics of Structured Query Language (SQL), eXtensible Markup Language (XML), integrating databases into programs, web-based database usage, and triggers and active databases. The third area of emphasis is the systems side of databases, which includes database indexing, efficient query evaluation, the transaction-based model, concurrency, and security.

This course is suitable for computer science majors at both undergraduate and graduate levels. Students who wish to take this course should have some programming experience in a modern language and knowledge of data structures. There will be five homeworks, two mid-terms, and a final exam.

Book, Course Information, and Prerequisites


Database Textbook

Textbook (optional): Database Management Systems, Third edition
by Raghu Ramakrishnan and Johannes Gehrke
McGraw-Hill Higher Education © 2003, ISBN: 0072465638.
Credit Hours: 3
Location: FB007
Time: TTh 9:30-10:45PM
URL: http://csbio.unc.edu/mcmillan/?run=Courses.Comp521F16
Prerequisite: COMP 401, Comp 411 or equivalents
Some background in data structures (Comp 410) is also helpful.

Course Instructors



Leonard Instructor: Leonard McMillan
Office: SN316
email: mcmillan@cs.unc.edu

Bhavya TA: Bhavya Deepak Vyas
Office: SN312
email: bdvyas@cs.unc.edu


Office Hours:

Leonard McMillan: Wednesdays 3pm-5pm
Bhavya Deepak Vyas: Monday12-1pm, Tuesday - Thursday1-2pm

Schedule


Week 1:
W 8/24 Lecture 1: Introduction and Overview (pdf)  
F 8/26 Lecture 2: Entities and Relations (pdf)  
Week 2:
M 8/29 Lecture 3: The Trouble with Files (pdf) File used in class
W 8/31 Lecture 4: The Relational Model (pdf)  
F 9/ 2 Lecture 5: Defining Relations (cont)  
Week 3:
M 9/ 5 Labor Day (no class)
W 9/ 7 Lecture 6: Relational Algebra (pdf) PS1
F 9/ 9 Lecture 7: Relational Calculus (pdf)  
Week 4:
M 9/12 Lecture 8: SQL: Basic Queries (pdf) Notebook
W 9/14 Lecture 9: SQL: Advanced Queries (pdf)  
F 9/16 Lecture 10: SQL: Hands On PS2 (PS1 due)
Week 5:
M 9/19 Lecture 11: SQL: Constraints and Triggers (pdf)  
W 9/21 Lecture 12: SQL: Modifications and Transactions (pdf)  
F 9/23 Lecture 13: Embedding SQL in Applications (pdf)  
Week 6:
M 9/26 Lecture 14: More on Embedding SQL Notebook (PS2 due)
W 9/28 Lecture 15: XML Data Description (pdf)  
F 9/30 Midterm #1 (Covers Lectures 1-13)
Week 7:
M 10/ 3 Lecture 16: Overview of Storage and Indexing (pdf) PS3
W 10/ 5 Lecture 17: Disks and Block-based Devices (pdf)  
F 10/ 7 Lecture 18: Page and Buffer Management (cont)  
Week 8:
M 10/10 Lecture 19: Tree-Structured Indexing (pdf)  
W 10/12 Lecture 20: Hash-based Indexing (pdf)  
F 10/14 Lecture 21: Indexing: Hands On  
Week 9:
M 10/17 Lecture 22: Overview of Query Evaluation (pdf) (PS3 due)
W 10/19 Lecture 23: Overview of Query Evaluation*  
F 10/21 Fall Break (no class)
Week 10:
M 10/24 Lecture 24: External Sorting (pdf)  
W 10/26 Instructor out of town (no class)
F 10/28 Lecture 25: External Sorting (cont)  
Week 11:
M 10/31 Lecture 26: Evaluation of Relational Operators (pdf)  
W 11/ 2 Lecture 27: Schema Refinement and Normal Forms (pdf) PS4
F 11/ 4 Lecture 28: Schema Refinement and Normal Forms (cont)  
Week 12:
M 11/ 7 Lecture 29: Database design and Tuning (pdf)  
W 11/ 9 Lecture 30: Database design and Tuning (cont)  
F 11/11 Midterm #2 (Covers Lectures 14-26)
Week 13:
M 11/14 Lecture 31: Transaction Management (pdf) (PS4 due)
W 11/16 Lecture 32: Transaction Management (cont) Midterm returned
F 11/18 Lecture 33: Concurrency Control (pdf) PS5
Week 14:
M 11/21 Lecture 34: Concurrency Control (cont)  
W 11/23 Thanksgiving (no class)
F 11/25 Thanksgiving (no class)
Week 15:
M 11/28 Lecture 35: Crash Recovery (pdf)  
W 11/30 Lecture 36: Crash Recovery (cont)  
F 12/ 2 Lecture 37: Processing BIG data with Hadoop (pdf) (PS5 due)
Week 16:
M 12/ 5 Lecture 38: Pig and Hive programming with Hadoop (pdf)  
W 12/ 7 Lecture 39: Farewell (pdf)  
Week 17:
F 12/16 Final Exam: 8am-12pm

Course Resources

Anaconda:

For this class, the recommended package manager is Anaconda. It is supported on Windows, Mac and Linux systems. Please ensure you do the following:

1. Select the correct OS.

2. Download Anaconda for Python 2.7.

It can be downloaded from the following location:

https://www.continuum.io/downloads

 

If you already installed Python 3.0:

Please look at the following tutorial to get an idea for how to install Python 2.7 as well and run it on Anaconda:

http://stackoverflow.com/questions/30492623/using-both-python-2-x-and-python-3-x-in-ipython-notebook

 

Jupyter:

This is the application we will be using for our code development and testing. It will usually be downloaded along with the Anaconda package mentioned above, but if you face problems running it you can download Jupyter separately from the below location:

http://jupyter.readthedocs.io/en/latest/install.html

(This website also has useful walkthrus for Anaconda, and even recommends using Anaconda to install Jupyter).

 

SQLite:

In a shell window, type 'sqlite3' and one of two things will happen:

A. It will open a command prompt saying 'sqlite>'. In this case, type '.quit' and hit enter. This will take you back to your regular command prompt.

B. It will give an error saying sqlite3 is not recognized as an internal or external command. In this case you will have to install SQLite on your machine. This is done easily enough through Anaconda.

  • Enter the command 'conda install sqlite'
  • After a few commands, it will ask whether you would like to proceed.
  • Type 'y' and hit enter.
  • Try typing in the 'sqlite3' command again and refer to point A.

Sailors Database



Site built using pyWeb version 1.10
© 2010 Leonard McMillan, Alex Jackson and UNC Computational Genetics