This is a command line program that enables the user to select, insert, update, and delete data from a simple Postgres table called students.
The students table is defined as follows:
STUDENTS | |
---|---|
student_id | bigserial |
first_name | varchar(100) |
last_name | varchar(100) |
Note: before running this program, you will need to do the following in Postgres:
The full source code for db_menu.c is available at http://www.cs.sjsu.edu/~bruce/programs/spring_2017_cs_160_section_3/db_menu/db_menu.c (right mouse click then select "Save link as" to download).
A makefile to compile db_menu.c is available at http://www.cs.sjsu.edu/~bruce/programs/spring_2017_cs_160_section_3/db_menu/Makefile (right mouse click then select "Save link as" to download).
To compile db_menu.c, type make within a shell command prompt in the same directory containining db_menu.c and your Makefile.
Spring 2017, CS-160-03:
Lectures:
Assignments:
Handouts:
Programs: