Programming Assignment 2: Basic Data Manipulation Solved

$24.99 $18.99

Overview In this assignment you will write a program that allows a database user to insert, delete, modify, and query their data on basic tables (i.e., no table joins). It is assumed that the database and table structures (i.e., their metadata) are available, which should have been completed in the first assignment. System Design You…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Categorys:

Description

5/5 – (2 votes)

Overview

In this assignment you will write a program that allows a database user to insert, delete, modify, and query their data on basic tables (i.e., no table joins). It is assumed that the database and table structures (i.e., their metadata) are available, which should have been completed in the first assignment.

System Design

  • You will decide how to physically store the data o In lectures: row-based, column based, etc.

o As always, you are free (in fact, encouraged) to come up with your own design

  • If in your first assignment you decided to use the mapping of directory-database and file-table, then the following is one possible physical layout of the file for table Product (pid, name, price):

pid int | name varchar(20) | price float 1 | laptop | 1999.99

2 | mobile phone | 899.99

3 | monitor | 1399.99

  • Once you decide the physical layout, you will then need to think about how those four operations (insert, delete, modify, and query) will be implemented.

o Again, if you follow the above file-table design:

    • Insert: append to the last line?

    • Modify and query: should be easy

    • Delete: move the tuples around?

Implementation

  • The program should not use external database library/application… o E.g., don’t write a wrapper over Sqlite3

  • Any programming language is acceptable, e.g., Python, Java, C/C++, Go o Just pick one(s) that you are most comfortable/proficient with

    • Or, contact the TA about your programming language before you start o But keep in mind we will test your code in Linux with OS-level utilities (e.g., files)

    • So, probably not: C#, Object-C, JavaScript, Prolog…

  • Functionalities:

  1. SQL: insert tuples, delete tuples, modify tuples, basic select on tuples

Interface

  • A similar but simpler interface than Sqlite3

Submission

  • WebCampus

  • Compress all your source code and documents into one package in this format: o <your_netid>_pa2

  • Late penalty: 10% per day

2

CS457/657 – Programming Assignment 2

Programming Assignment 2: Basic Data Manipulation Solved
$24.99 $18.99