Question: The development team has finalized implementing the new user interface that will allow users to delete posts and comments. However, the development team leader has

The development team has finalized implementing the new user interface that will allow users to delete posts and comments. However, the development team leader has contacted you because this new feature requires the database to keep track of when a post or comment is deleted. Your job is to modify the table structure (see diagram above) to allow this feature to be implemented by adding a column called 'deleted' into the table of the comments and users.
To solve this requirement, it has been recommended that you create a new column called 'deleted' and that you set the default value of this new column to 0 so that you continue to show all the information that has been stored thus far. The new feature will set this new column to 1 when users delete comments and posts. Accordingly, complete the following SQL statements to submit the changes to the database
Important note: follow recommended letter casing (e.g., uppercase) to receive credit
SQL statement for adding delete column in Post
Blank 1 TABLE Blank 2
ADD Blank 3 'deleted' TINYINT
NULL DEFAULT Blank 4
AFTER 'author_id';
SQL statement for adding delete column in Comment
Blank 5 TABLE Blank 6
ADD Blank 7 'deleted' TINYINT
NULL DEFAULT Blank 8
AFTER 'author_id';
The development team has finalized implementing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Programming Questions!