Commit 47be9e74 authored by Alvin Cheung's avatar Alvin Cheung
Browse files

setup.sql -> createTables.sql

parent a9ca332e
......@@ -20,7 +20,7 @@ and starter code files.
**What to turn in:**
Customer database schema in `setup.sql`, your completed version of the `Query.java`,
Customer database schema in `createTables.sql`, your completed version of the `Query.java`,
and the test cases that you created with a descriptive name for each case.
You do not need to turn in your `dbconn.properties` file or any other starter files.
......@@ -113,7 +113,7 @@ ordered by increasing flight time, which is the sum of the `actual_time` values
The flight service system consists of the following logical entities:
- **Flights / Carries / Months / Weekdays**: modeled the same way as HW3. We already provide the SQL declaration for Flights commented out in `createTable.sql` that you can use. You might not need to use the other tables but that is entirely up to you.
- **Flights / Carries / Months / Weekdays**: modeled the same way as HW3. We already provide the SQL declaration for Flights commented out in `createTables.sql` that you can use. You might not need to use the other tables but that is entirely up to you.
- **Users**: each user has a username (`varchar`), password (`varchar`), and balance in their account
(`int`). All usernames should be unique in the system. Each user can have any number of reservations. There are no restriction on passwords and you can just store them in plain text. Usernames and passwords should be case sensitive.
......@@ -149,7 +149,7 @@ FLIGHTS (fid int,
)
```
You will need to create any other tables / indexes you need for this assignment in `setup.sql` (see below).
You will need to create any other tables / indexes you need for this assignment in `createTables.sql` (see below).
#### Requirements
......@@ -230,7 +230,7 @@ Refer to the Javadoc in `Query.java` for full specification and the expected res
Your first task is to design and add tables to your flights database. You should decide on the physical layout given the logical data model described above. You can add other tables to your database as well.
**What to turn in**: a single text file called `setup.sql` with `CREATE TABLE` and any `INSERT` statements (and optionally any `CREATE INDEX` statements) needed to implement the logical data model above. We will test your implementation with the flights table populated with HW3 data using the schema above, and then running your `setup.sql`. So make sure your file is runnable on SQL Azure through SQL Server Management Studio or their web interface.
**What to turn in**: a single text file called `createTables.sql` with `CREATE TABLE` and any `INSERT` statements (and optionally any `CREATE INDEX` statements) needed to implement the logical data model above. We will test your implementation with the flights table populated with HW3 data using the schema above, and then running your `createTables.sql`. So make sure your file is runnable on SQL Azure through SQL Server Management Studio or their web interface.
Write a separate script file with `DROP TABLE` or `DELETE FROM` statements;
it's useful to run it whenever you find a bug in your schema or data (don't turn in this file).
......@@ -353,7 +353,7 @@ When auto-commit is set to true, each statement executes in its own transaction.
Implement this method in `Query.java` to clear the contents of any tables you have created for this assignment (e.g., reservations). However, do not drop any of them and do not delete the contents or drop the `flights` table .
After calling this method the database should be in the same state as the beginning, i.e., with the flights table populated and `setup.sql` called. This method is for running the test harness where each test case is assumed to start with a clean database. You will see how this works after running the test harness.
After calling this method the database should be in the same state as the beginning, i.e., with the flights table populated and `createTables.sql` called. This method is for running the test harness where each test case is assumed to start with a clean database. You will see how this works after running the test harness.
### Task 3: Write test cases (14 points)
......@@ -456,7 +456,7 @@ Your task is to write at least 1 test case for each of the 6 commands (you don't
## Submission Instructions
Add your Java code and `setup.sql` that you created to the repo.
Add your Java code and `createTables.sql` that you created to the repo.
**Important**: To remind you, in order for your answers to be added to the git repo, you need to explicitly add each file:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment