Question: Add a column named Date _ Recorded to the Crimes table. This column needs to hold date values and should be set to the current
Add a column named DateRecorded 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 Probofficers 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 characters.
Part :
In Part you have designed and created tables for the City Jail database. These tables don't include any constraints. Review the information in Chapters and case studies to determine what constraints you might need for the City Jail database.
First, using the format in the following chart, create a list of constraints needed. Second, create and execute all the SQL statements needed to add these constraints. Follow these steps to create and alter the tables:
First, drop the APPEALS, CRIMEOFFICERS, and CRIMECHARGES tables constructed in Chapter These three tables are to be built last, using a CREATE TABLE command that includes all the necessary constraints.
Second, use the ALTER TABLE command to add all constraints to the existing tables. Note that the sequence of constraint addition has an impact. Any tables referenced by FOREIGN KEYs must already have the PRIMARY KEY created.
Third, use the CREATE TABLE command, including all constraints, to build the three tables dropped in the first step.
Table Name
Columns
Constraint Type Condition
Part :
Execute the CityJailsql You can find it under lessons Folder on Blackboard script to rebuild the CRIMINALS and CRIMES tables of the City Jail database. The statements at the beginning of this script drop existing tables in your schema with the same table names.
Review the script so that you're familiar with the table structure and constraints, and then do the following:
Create and execute statements to perform the following DML activities. Save the changes permanently to the database.
a Create a script to allow a user to add new criminals providing prompts to the user to the CRIMINALS table.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
