C M S I 4 8 6
IN T R O D U C T I O N T O DA T A B A S E SY S T E M S
Fall 2005
Assignment 0913
The goal of this assignment is to kickstart you into databases — grab the database software, build it, run
it, and use it a bit. Don’t worry about understanding everything. Yet.
Not for Submission
1. Read Chapter 1 in SKS.
2. Skim Chapter 4 in SKS for any information that you need to finish the homework for submis-
sion. Or, use the Web — no shortage of information there.
3. If you’re interested, read Chapter 26 in SKS. This will give you some background and informa-
tion on PostgreSQL, our reference database for this course.
For Submission
This is an “oral” submission — assuming that the Keck Lab is available, I want to walk around and see
each of you do this on a workstation, whether it is Keck’s or your own. If the lab isn’t available at class
time, then we’ll work something out within the week, and I’ll let you know.
1. Go to the PostgreSQL Web site, download a recent final release (8.x or 7.x), compile it, and in-
stall it. For Keck machine users, Caskey has said that it’s OK to install in your Keck home di-
rectory. Yes, part of the work is reading and understanding the README, INSTALL, and any
other accompanying documentation to figure things out. Don’t delete the source directory when
you’re all done — I’ll want to look at it during our lab session.
2. Once installed, learn how to do the following:
a. Start and stop the database server.
b. Create a new database.
c. Create a simple database table using the psql command line interface.
d. Load some data into the table through psql.
e. Retrieve data from that table through psql.
Extra Credit
Unbelievable! Extra credit this early in the semester — if show me that you can do all of the following:
1. Configure psql so that its command line behaves much like bash — arrow keys navigate through
command history, current command is inline-editable, and hitting the Tab key attempts comple-
tions. If your machine automatically configures itself this way, you still need to tell me how it
managed to “just work.”
2. Get PostgreSQL to work over the network: that is, start the database server on one machine, then
communicate with it from another machine.
3. Figure out how to make the PostgreSQL server “permanent” — that is, always on. The tech-
nique varies depending on the operating system; figure it out on the system that you’ll most
likely use as your database server (may not be possible for the Keck machines, but at least figure
out how to do it).