NYU Database Systems (Spring'2000)
Programming Assignment -1
This assignment will involve developing a small
web-based querying application (without using any DBMSs). I have created a data file containing the following information about
the employees in a company: (download the datafile)
- Social Security Number (SSN) -- unique for
all employees -- a 9-digit number
- First Name -- string
- Last Name -- string
- Department -- string
- Age -- integer
Format of the file: Each "employee
record" will be a separate line, different fields will be
separated by blank spaces, and there will be no blank spaces
within the fields.
You will create a form-based web page, that allows the user to do the following:
- Get all the information about an employee,
by supplying their SSN in a text field
- Get all employees working in a department
- by selecting the department name from a form menu
You can do this by knowing a small amount of C, HTML, and CGI.
- Create the web page using your favorite text editor
(Emacs, vi, ..) or web page creation tool.
- Write the "back-end" program in your favorite
language (preferably, C or C++, but it can also be Java),
which reads in the file, accepts CGI requests, and sends
Read this on web programming with CGI and the cgilib library for
Questions & Answers
- Can I use a fancy 4GL tool like Delphi/PowerBuilder that
lets me create this application in a jiffy? To be fair to
others, and to keep it non-trivial, NO. You have to use a
programming language such as C, C++, Java; and CGI.
- What language should I use for the backend program? -- I recommend C or
C++; but you can do it in Java if you like. However: all the tools I will
be providing to support your programs (cgilib, dbms) will primarily
support C or C++; if you write programs in Java, it is your responsibility
to furnish these tools for yourselves.
What to hand in
You will be graded on a) correctness of the program b) nicety
of code and c) user interface (keep it simple).
- URL of the web page you created (we will be testing it out). -- which means that the web page should be publicly
accessible. So, it may help to do this on the department Sun machines.
- Screenshots of your web-page
- SSN query typed
- Response to SSN query
- Name query typed
- Response to name query
- Example of your error handling -- (e.g., absent
SSN or name typed)
- Printout of your backend code
- Must be VERY WELL documented
When to hand in
- Thursday, Feb 10th (gives you
two full weeks)
- Late assignments will be fined 15% of the marks for every
- Deadline will NOT be extended for anyone
Why are we doing this?
- This assignment will earn you most of the C and CGI
skills needed for the final project and will save lot of
time when you get started on that project.
- It will illustrate some of the difficulties in creating a
database application without using a DBMS. (think about
Vishy Poosala, 1/27/2000
Back to Course Home Page