$29
Overview
In this assignment you will write a program that allows a database user to manage the metadata of their relational data. By metadata, we mean the database’s own information (e.g., database’s name, creation time, owner) as well as the properties of the tables (e.g., table’s names, attributes, constraints)
System Design
You are free (in fact, encouraged) to come up with your own design o For instance, Sqlite3 uses one single file for each “database”
Here is another example:
One Linux directory - a database
One regular file - a table
Implementation
The program should not use external database library/application…
Any programming language is acceptable, e.g., Python, Java, C/C++, Go o Just pick one(s) that you are most comfortable/proficient with
Functionalities:
Database creation, deletion
Table creation, deletion, update, and query
Interface
A similar but simpler interface than Sqlite3 Examples (on a Linux terminal):
# ./<your_program <enter
CREATE DATABASE db_name <enter; <ctrl + d
The shell should prompt whether the command is successful or failed
If failed, don’t crash but gracefully prompt why
Then when you check your file system, it might look like this: ~/your_home/cs457/pa1/db_name
# ./<your_program <enter
USE db_1;
CREATE TABLE test_tbl (a1 int, a2 char(9)); <ctrl+d
1 CS457/657 Spring 2018 – Programming Assignment 1
If successful, then your file system might look like this: ~/your_home/cs457/pa1/db1/test_tbl
Testing
Again, we will test your program on Ubuntu (version 14 or above)
If your program cannot compile on our testbed, we may ask you to demo your program
o Try not to use many exotic libraries… A full test script will be provided
# ~/cs457/pa1/<your_program < PA1_test.sql (expect the standard input)
# <expected output, hopefully…
You don’t need to parse the comment lines (i.e., starting with “- -“)
We will not to test your programs with any other scripts/commends It’s always good to consider more corners cases
Grading (100 points)
This assignment can be completed by a group of 1-3 students o All group members will receive the same score
Design document that clarifies the followings: (10 points)
How your program organizes multiple databases
How your program manages multiple tables
At a very high level, how you implement those required functionalities Source code (90 points)
Coding style, 10 points
Appropriate parenthesis locations, indention, etc.
Coding clarity, 10 points
Always write comments at the beginning of any files Author, date, history, etc.
Always write comments at the beginning of any non-trivial class/function
What this class/function does, high-level algorithm if needed
Write in-line comments for non-trivial blocks of code
Functionality, 70 points
Refer to the test script for detailed breakdowns
Submission
WebCampus
Compress all your source code and report into one package in this format: o <your_netid_pa1
Each group member should submit his/her own copy of the package Late penalty: 10% per day (if you don’t use the 4-day grace period)
2 CS457/657 Spring 2018 – Programming Assignment 1