Question: Assignment# 5 Due date: 1 0 / 0 3 / 2 0 2 4 5 : 5 9 pm Deliverable: Submit one sql file with

Assignment#5
Due date:10/03/20245:59 pm
Deliverable: Submit one sql file with all the sql statements for questions 1,2,3,4, and 5. Name the file yourfirstname_yourlastName_Assignment#5.sql.
Write a script that creates a new database called WebDB with the following design:
Define UserID and ProductID as identity columns. Allow null values for EmailAddress in the Users table and DownloadDate in Downloads table. Other columns in all three tables should not have any null values. Set a default value of Computer for the ProductName in Products table.
Users
UserID PK
EmailAddress varchar(255)
FirstName varchar(50) LastName varchar(70)
Downloads
UserID PK, FK
ProductID PK, FK
DownloadDate datetime
Products
ProductID PK
ProductName varchar (50)
1. Now, add a new column, ProductPrice to the Products table of the WebDB database. Use
1
Assignment #5
(3 points)
Decimal data type with precision 5 and scale 2, allow null values and add a check constraint that allows only values more than $500 for this column. (5 points).
2. Change the name of the FirstName column to First_Name in Users table.
3. Delete the default value from the productname field in products table.
4. Create an index on the lastname field in the Users table.
2
Write a script that creates a new
database called WebDB with the
following design:
Why is the answer in this resulting in a 1064 mysql error
Assignment# 5 Due date: 1 0 / 0 3 / 2 0 2 4 5 : 5

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!