Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A mobile product manager wants to build a database to track the team’s mobile pr

ID: 3592282 • Letter: A

Question

A mobile product manager wants to build a database to track the team’s mobile products.

a. Write the SQL Script to create the table for a Product which needs to contain ProductId (PrimaryKey), Product Name, Product Type (Which can only contain the values “Utility”, “Social” or “Game”), Priority and Delivery Date.
Also, write the SQL Script to create the table Developer which contains the Developer’s ID (Primary Key), SSN, First Name, Last Name , CountryofBirth, Birth Date, Job title, Bonus Amount and the Product ID of the product being developed by the developer. In addition, Review the requirements below

i) Add a foreign key to ensure the relationship between the tables.

ii) All columns EXCEPT the Ids and names (Product Name, First Name and Last Name) are NULLABLE.

iii) A Product can have multiple developers working on it, but a developer can only work on one product.

Explanation / Answer

SQL QUERY

SQL Script to create the table for a Product

create table Product

(ProductId int PRIMARY KEY, ProductName varchar(30) NOT NULL, ProductType varchar(30), Priority varchar(10), DeliveryDate DATE, CONSTRAINT chk_ProdType CHECK (ProductType IN ('Utility', 'Social', 'Game')));

SQL Script to create the table Developer

create table Developer

(DeveloperId int PRIMARY KEY, SSN varchar(20),FirstName varchar(30) NOT NULL, LastName varchar(30) NOT NULL, CountryofBirth varchar(20),BirthDate DATE, Jobtitle varchar(20), BonusAmount money,ProductId int,
CONSTRAINT FK_ProductId FOREIGN KEY (ProductId) REFERENCES Product(ProductId));

If any query regarding query please get back to me

Hope it helps you

Thank You

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote