Sei sulla pagina 1di 2

Last Edited 23-Jan-2014: New login instructions

CS 437 / 537: Database Systems


Assignment 1: Basics
Assigned: Tuesday 21 January, 2014

Instructor:
TAs:
Course page:
Email:

Due: 2359hrs Thursday 30 January, 2014

Avi Silberschatz, AKW 214


Debayan Gupta, Dongqu Chen
http://zoo.cs.yale.edu/classes/cs437
cs437.s14@gmail.com

Instructions

NOTE: The zoo DBMS wont be available till Thursday (23-Jan), which is why the due date for this
assignment is next Thursday, instead of Tuesday.
If you havent already done so, please sign up so that we can create your account.
Youll need to add this class on the zoo. If you dont have a zoo account, please get one at
http://zoo.cs.yale.edu/accounts.html.
For this course, we will be using PostgreSQL (nicknamed postgres), an open-source DBMS
(database management system). Its a client/server system the server (called the
postmaster) accepts connections to a database and performs actions on behalf of the clients.
If you want to use some other DBMS, please speak to one of the TAs. If you are unable or
unwilling to get a zoo account, you can install postgres on your own computer again, please
speak to one of the TAs if you choose to do this.
We will be using psql (a command line SQL interpreter) on the frontend to communicate with
the server. There are many other clients available, such as pgAdmin and OpenOffice Base youre free to use whatever software youre most comfortable with.
After your account has been created, log in to the zoo and run the command:
psql -h lab.zoo.cs.yale.edu U username
Initially, your password will be cs437. To change your password, run:
ALTER USER username WITH PASSWORD new password;
Your username is derived from the email address you signed up with. If you signed up with
debayn.gupta@yale.edu, your username is debayangupta (no special characters).

Last Edited 23-Jan-2014: New login instructions


You dont need to use caps for your commands. Make sure that you use single quotes. You can
quit psql by typing \q or Ctrl+d.

All HWs should be emailed to cs437.s14@gmail.com. You may send text, word, or pdf files (or
some other common format), but all code must be in plain text. So, if youre submitting a pdf,
send an additional text file with the code.
To make things easy for us, please put Assignment X as the subject for each submission (this,
of course, will be Assignment 1).
You are free to use any and all resources you can access, as long as you do the work yourself,
and cite all sources. This means that you can find your definitions on Wikipedia, search for
solutions to SQL issues on forums, etc. You should know this already, but well say it anyway:
You may not collaborate with other students or get other people to do your HW for you.

Part I: Reading (20 points)


As part of each assignment, you are expected to read and critique a paper. Your critique should be in 2
parts, each ~5-10 lines:
1. Summary of the paper. Highlight the primary technical innovations that the paper talks about.
2. Errors, improvements, whatever you found interesting about the paper.
For this HW, your paper is C-Store (http://db.csail.mit.edu/projects/cstore/vldb.pdf).
There will be many things in this paper that you are not expected to understand at this point feel free
to skip those parts. For example, we dont expect you to talk about snapshot isolation (section 6.1 in the
c-store paper). This early in the semester, youre going to end up skipping most of the content. (Well go
over these papers again at the end of the semester.)

Part II: General questions (10 points)


1. List some advantages and disadvantages of using file systems instead of databases for data
storage. [3]
2. What is data independence and why is it important? [2]
3. What is a candidate key? [2]
4. What is a natural join? Why is it dangerous to use natural joins in code? [3]

Part III: Coding (20 points)


Write SQL code to create the schema described in slide 2.8.

Potrebbero piacerti anche