Question: You designed the new database for City Jail. Now you need to create all the tables for the database. First, create all the tables using

You designed the new database for City Jail. Now you need to create all the tables for the database. First, create all the tables using the information outlined in Section A. Second, make the modifications outlined in Section B. Save all SQL statements used to accomplish these tasks.

Section A:

Data Description Table Column Length Scale Default Value Aliases Alias_iD Numeric 6. Criminal_ID Numeric 6. Alias VariabTable Column Data Description Length Scale Default Value V_status Fixed character N (for No) P_status Fixed character N

Data Description Table Column Length Scale Default Value Aliases Alias_iD Numeric 6.

Criminal_ID Numeric 6. Alias Variable character 10 Criminals Criminal_ID Numeric 6. Variable


Section B

  • Add a default value of U for the Classification column of the Crimes table.
  • Add a column named Date_Recorded to the Crimes table. This column needs to hold date values and should be set to the current date by default.
  • Add a column to the Prob_officers table to contain the pager number for each officer. The column needs to accommodate a phone number, including area code. Name the column Pager#.
  • Change the Alias column in the Aliases table to accommodate up to 20 characters.

Data Description Table Column Length Scale Default Value Aliases Alias_iD Numeric 6. Criminal_ID Numeric 6. Alias Variable character 10 Criminals Criminal_ID Numeric 6. Variable character Last 15 Variable character First 10 Variable character 30 Street City Variable character 20 Fixed character State Zip Fixed character Phone Fixed character 10 Table Column Data Description Length Scale Default Value V_status Fixed character N (for No) P_status Fixed character N (for No) Crimes Crime_ID Numerie Criminal_ID Numerie Classification Fixed character Data_charged Date Status Fixed character Hearing date Date Appeal_cut_date Date Sentences Sentence_ID Numerie Criminal_ID Numerie Type Fixed character Prob_ID Numeric Start_date Date End_date Date Violations Numeric Prob_officers Prob_ID Numerie Last Variable character 15 First Variable character 10 Street Variable character 30 City Variable character 20 State Fixed character Zip Fixed character Phone Fixed character 10 Email Variable character 30 Status Fixed character A (for Active)

Step by Step Solution

3.34 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Section A CREATE TABLE aliases aliasid NUMBER6 criminalid NUMBER6 alias VARCHAR210 CREATE TABLE crim... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

1803_60b8c1212215a_716066.pdf

180 KBs PDF File

Word file Icon

1803_60b8c1212215a_716066.docx

120 KBs Word File

Students Have Also Explored These Related Oracle 12c SQL Questions!