Question: Assignment# 5 Due date: 1 0 / 0 3 / 2 0 2 4 5 : 5 9 pm Deliverable: Submit one sql file with
Assignment#
Due date:: pm
Deliverable: Submit one sql file with all the sql statements for questions and Name the file yourfirstnameyourlastNameAssignment#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
FirstName varchar LastName varchar
Downloads
UserID PK FK
ProductID PK FK
DownloadDate datetime
Products
ProductID PK
ProductName varchar
Now, add a new column, ProductPrice to the Products table of the WebDB database. Use
Assignment #
points
Decimal data type with precision and scale allow null values and add a check constraint that allows only values more than $ for this column. points
Change the name of the FirstName column to FirstName in Users table.
Delete the default value from the productname field in products table.
Create an index on the lastname field in the Users table.
Write a script that creates a new
database called WebDB with the
following design:
Why is the answer in this resulting in a mysql error
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
