Description
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 high-level 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 one possible design:
-
One Linux directory -> a database o One regular file -> a table
Implementation
-
The program should not use an external database library or an existing SQL parser/compiler.
-
Choose your own programming language, e.g., Python, Java, C/C++, Go
-
Please pick one that you are most comfortable/proficient with
-
-
If you want to choose a language not mentioned above, please contact the TA before you start coding
-
-
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>;
-
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_directory/cs457/pa1/db_name
-
-
-
-
# ./<your_program> <enter>
-
-
USE db_1; CREATE TABLE test_tbl (a1 int, a2 char(9));
-
If successful, then your file system might look like this:
-
-
-
-
-
-
~/your_home_directory/cs457/pa1/db1/test_tbl
-
-
-
2
CS457/657 Database Management Systems, University of Nevada, Reno