Menu

HS2021 Database Design and Use

HS2021 Database Design and Use
Trimester 2 2016
Date Due: Friday Week 12, 2016 by 5:00 PM Marks: Weighting 20%
Group Number _____________
Student Name (Block letters) Student Number:
___________________________ _____________
___________________________ _____________
___________________________ _____________ Assignment Description: In this assignment you will use your normalized “City Jail” database you have created in your assignment one. You will form a group (2-3 students) and implement your designed City Jail database using Oracle SQL developer 12c. You will also perform different types of SQL queries on it to sharpen your SQL skills to implement and manage the database. Please submit your assignment using the attached template.
Assignment Tasks need to be executed:
• Discuss with in your group to find the best normalized “City Jail” database design to implement in Oracle database.
• Write down all the SQL statements require to construct the entire City Jail database. Execute all SQL queries in Oracle SQL developer 12c to implement the “City Jail” database in Oracle 12c. The CREATE TABLE statements should be created as a group.
• Execute the following queries individually and provide your answers in the attached template:
o Group member One:
? Insert 5 different entries in each table. You can create fictitious data to create those entries.
? Add a column named Mail_flag to the CRIMINALS table. The column should be assigned a data type CHAR (1).
? Set the Mail_flag column to ‘N’ for all criminals who don’t have a street address recorded in the database.
? Change the phone number for a criminal to 7225659032.
? Remove a specific criminal from the database. Make sure you remove all the associated information relevant to that criminal.
o Group member Two:
? List the following information for all crimes that have a period greater than 14 days between the date charged and the hearing date: crime ID, classification, date changed, hearing date, and number of days between the date charged and the hearing date.
? Produce a list showing each active police officer and his or her community assignment, indicated by the second letter of the precent code. Display the community description listed the following chart, based on the second letter of the precent code.
Second letter of precinct Code Description
A Shady Grove
B Centre City
C Bay Landing
? Display the criminal name and probation start date for all criminals who have a probation period greater than two months. Also, display the date that’s two months from the beginning the probation period, which will serve as a review date.
o Group member Three (Ignore this section if you are a group of 2): –
? List all criminals along with crime status and appeal status (if applicable). The report need to include the criminal ID, name, crime classification, date change, appeal filling date, and appeal status. Show all criminals, regardless of whether they have filled an appeal.
? List all criminals along with crime information. The reports need to include the criminal ID, name, crime classification, date charged, crime code, and fine amount. Include only crimes classified as “Other”. Sort the list by criminal ID and date changed.
? Create an alphabetic list of all criminals, including criminal ID, name, violent offender, status, parole status, and any known aliases.
• Create SQL statements to drop all the tables you have created.
**NOTE: Group members may receive different marks, based on their individual component.
Repost structure and assignment submission:
Content of your report
• Execute all the task mentioned in “Assignment Tasks need to be executed” section and write a report using the Assignment 2 Template as attached.
• The report has to include all the SQL queries you have built and executed.
Assignment Submission Guideline:
You need to submit both online and hardcopy
• Online: submit the softcopy via BlackBoard
• Hardcopy: Submit via assignment submission box
Assignment Date Due: Friday Week 12 Friday, 2016 by 5:00 PM
Marks allocation:
Assignment components Description marks
Quality of the database and team work – Group marks Students worked as a team and proper database designing guideline was followed to achieve requirements of the assignment. 10%
Correctness of the query and appropriateness of the report — Individual marks All constructed and executed queries should run and retrieve/amend information as instructed. 10%