Docsity

Programming Assignment 3 for COMPSCI 410/510 Databases - Printing Company Tree, Lab Reports of Computer Science

Toggle sidebar
bg1
COMPSCI 410/510 Databases (Spring 2009)
Programming Assignment #3, Due on 4/06/2009, Monday (11PM)
Description:
This programming assignment asks you to write a Cprogram to retrieve data from the company
database - print the company tree. That is,
1. Check each employee to see if they have a supervisor. If you find an employee without a
supervisor, then the employee is the company president.
2. Now print the company tree starting from the president.
The C program prints the company tree from MySQL system using mysql provided C API.
The sample programs we discussed in classes of how to use the provided C API can be found in
onyx as follows:
∼jhyeh/cs410/labs/lab3/files/mysql/print company bfs.c
∼jhyeh/cs410/labs/lab3/files/mysql/js supervisor.c
∼jhyeh/cs410/labs/lab3/files/mysql/salary raise.c
∼jhyeh/cs410/labs/lab3/files/mysql/common.c
∼jhyeh/cs410/labs/lab3/files/mysql/common.h
The expected output of your program can be found in
∼jhyeh/cs410/labs/lab3/files/mysql/output.txt
Submission
Submit your programs from onyx by copying the files to an empty directory (with no subdirectories)
and typing the following FROM WITHIN this directory:
submit jhyeh cs410 3

Partial preview of the text

Download Programming Assignment 3 for COMPSCI 410/510 Databases - Printing Company Tree and more Lab Reports Computer Science in PDF only on Docsity!

COMPSCI 410/510 Databases (Spring 2009)

Programming Assignment #3, Due on 4/06/2009, Monday (11PM)

Description:

This programming assignment asks you to write a C program to retrieve data from the company database - print the company tree. That is,

  1. Check each employee to see if they have a supervisor. If you find an employee without a supervisor, then the employee is the company president.
  2. Now print the company tree starting from the president.

The C program prints the company tree from MySQL system using mysql provided C API.

The sample programs we discussed in classes of how to use the provided C API can be found in onyx as follows:

∼jhyeh/cs410/labs/lab3/files/mysql/print company bfs.c ∼jhyeh/cs410/labs/lab3/files/mysql/js supervisor.c ∼jhyeh/cs410/labs/lab3/files/mysql/salary raise.c ∼jhyeh/cs410/labs/lab3/files/mysql/common.c ∼jhyeh/cs410/labs/lab3/files/mysql/common.h

The expected output of your program can be found in

∼jhyeh/cs410/labs/lab3/files/mysql/output.txt

Submission

Submit your programs from onyx by copying the files to an empty directory (with no subdirectories) and typing the following FROM WITHIN this directory:

submit jhyeh cs410 3