Reference no: EM131518295
The following memo was used to create an initial database design (E-R model) for the City Jail that indicates entities, attributes (columns), primary keys, and relationships.
MEMO
To: Database Consultant
From: City Jail Information Director
Subject: Establishing a Crime-Tracking Database System
It was a pleasure meeting with you last week. I look forward to working with your company to create a much-needed crime-tracking system. As you requested, our project group has outlined the crime-tracking data needs we anticipate. Our goal is to simplify the process of tracking criminal activity and provide a more efficient mechanism for data analysis and reporting. Please review the data needs outlined below and contact me with any questions. Criminals: name, address, phone number, violent offender status (yes/no), probation status (yes/no), and aliases
Crimes: classification (felony, misdemeanor, other), date charged, appeal status (closed, can appeal, in appeal), hearing date, appeal cutoff date (always 60 days after the hearing date), arresting officers (can be more than one officer), crime codes (such as burglary, forgery, assault; hundreds of codes exist), amount of fine, court fee, amount paid, payment due date, and charge status (pending, guilty, not guilty) Sentencing: start date, end date, number of violations (such as not reporting to probation officer), and type of sentence ( jail period, house arrest, probation) Appeals: appeal filing date, appeal hearing date, status (pending, approved, and disapproved) Note: Each crime case can be appealed up to three times. Police officers: name, precinct, badge number, phone contact, status (active/inactive)
Additional notes:
- A single crime can involve multiple crime charges, such as burglary and assault.
- Criminals can be assigned multiple sentences. For example, a criminal might be required to serve a jail sentence followed by a period of probation.
Using the City Jail database from P:pgignaccomp214CityJail_8.sql
Use a sql sub-query statement to answer the following:
1. List the name of each officer who has reported more than the average number of crimes officers have reported.
2. List the names of all criminals who have committed less than average number of crimes and aren't listed as violent offenders.
3. List appeal information for each appeal that has a less than average number of days between the filing and hearing dates.
4. List the names of probation officers who have had a less than average number of criminals assigned.
5. List each crime that has had the highest number of appeals recorded.