Question

Complete the following using Microsoft® SQL Server® 2016: Write SQL scripts in Microsoft® SQL Server® for...

Complete the following using Microsoft® SQL Server® 2016:

  • Write SQL scripts in Microsoft® SQL Server® for OLTP that include:
  • A Data Definition Language (DDL) script creating the four tables with appropriate data types, primary and foreign keys
  • Data Manipulation Language (DML) scripts that insert a minimum of five records into each table
  • Select scripts showing the full contents of each table
  • Write and run a test script for Step Two.
  • Save a screenshot of the results.

Create a 6-page Technical Design Document that includes the SQL scripts in Microsoft® SQL Server®, test script, and screenshots.

Compress the Technical Design Document that includes the SQL scripts in Microsoft® SQL Server®, test script, and screenshots into a ZIP file.

Submit the ZIP file.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

This demonstration is using Microsoft SQL Server 2016.

Database :

/*create database OrganizationDB*/
create database OrganizationDB;

/*use OrganizationDB to create table*/
use OrganizationDB;

Tables :

1.Table Name :Employee_Trainer

SQL DDL and DML Script :

/*1.Table Name : Employee_Trainer*/
Create table Employee_Trainer(
Employee_Trainer_ID int primary key identity,
Employee_Trainer_Name varchar(30) not null,
Employee_Trainer_Experience int not null check (Employee_Trainer_Experience > 5),
Employee_Trainer_Technologies text,
Employee_Trainer_Contact varchar(10)
);

/*Inserting records into Trainers*/
insert into Employee_Trainer (Employee_Trainer_Name,Employee_Trainer_Experience,Employee_Trainer_Technologies,Employee_Trainer_Contact)
values('KD Jadhav',10,'Java,C++','8888992233'),
('Tendulkar SR',25,'MongoDB','4455663322'),
('Mahesh Nigde',8,'AngularJS,Angular2,4,5,6,7','123456890'),
('Ajinkya Kamble',6,'ReactJS','7894561230'),
('Rahul D',15,'Responsive web Design','4477889922');

/*selecting records*/
select * from Employee_Trainer;

Screen in SSMS :

/*1. Table Name : Employee_Trainer*/ Create table Employee_Trainer Employee_Trainer_ID int primary key identity, Employee_Tra

****************************************

2.Table Name :Organization_Training

SQL DDL and DML Script :

/*2.Table Name :Organization_Training*/
create table Organization_Training (
Organization_Training_ID int primary key,
Organization_Training_details text not null ,
Organization_Training_Name varchar(50) not null,
Start_Date date,
Number_of_Days int not null,
Employee_Trainer_ID int not null,
foreign key (Employee_Trainer_ID) references Employee_Trainer(Employee_Trainer_ID)
);


/*insert records into Trainings table*/
insert into Organization_Training values (101,'ReactJS','GEP Mumbai','2019-08-29',5,1);
insert into Organization_Training values (102,'Machine Learning','Persistent USA','2019-12-12',25,2);
insert into Organization_Training values (103,'Open Source Technologies','Microsoft India','2019-10-28',10,3);
insert into Organization_Training values (104,'.Net core','Oracle','2019-09-08',6,5);
insert into Organization_Training values (105,'Struts 2','ADP','2020-02-12',3,4);

/*selecting records*/
select * from Organization_Training;

Screen in SSMS :

/*2. Table Name : Organization Training*/ create table Organization Training Organization Training ID int primary key, Organi

****************************************

3.Table Name :ParticipantsDetails

SQL DDL and DML Script :

/*3.Table Name :ParticipantsDetails*/
create table ParticipantsDetails(
ParticipantID int primary key,
ParticipantName varchar(20) not null,
WorkingCompany varchar(20),
contact varchar(10)
);

/*Inserting records*/
insert into ParticipantsDetails (ParticipantID,ParticipantName,WorkingCompany,contact) values
(1,'Yo Mahesh','Magic Software','456237890'),
(2,'Peithvi Shaw','USB Corp','1234560000'),
(3,'Ben Stocks','Dream System','7845123690'),
(4,'Ken Jan','ABCD Corp','8888888888'),
(5,'Sam ram','Swiss Bank','9999999988');

/*selecting records*/
select * from ParticipantsDetails;

Screen in SSMS :

/*3. Table Name : ParticipantsDetails*/ create table ParticipantsDetails ParticipantID int primary key, Participant Name varc

****************************************

4.Table Name :Trainer_Training_Feedback

SQL DDL and DML Script :

/*4.Table Name :Trainer_Training_Feedback*/
create table Trainer_Training_Feedback(
Feedback_ID int primary key,
Participant_ID int not null,
Organization_Training_ID int not null,
Ratings decimal(6,2),
Comments text,
foreign key (Organization_Training_ID) references Organization_Training (Organization_Training_ID),
foreign key (Participant_ID) references ParticipantsDetails(ParticipantID)
);

/*insert records into Trainer_Training_Feedback table*/
insert into Trainer_Training_Feedback values (1,1,101,8,'Excellent');
insert into Trainer_Training_Feedback values (2,2,102,6.5,'Okay');
insert into Trainer_Training_Feedback values (3,3,103,8.0,'Great');
insert into Trainer_Training_Feedback values (4,4,104,2.0,'Needs lots of improvements');
insert into Trainer_Training_Feedback values (5,5,101,10,'Excellent');

/*selecting records*/
select * from Trainer_Training_Feedback;

Screen in SSMS :

/*4. Table Name : Trainer_Training_Feedback*/ create table Trainer_Training Feedback Feedback_ID int primary key, Participant

****************************************

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
Complete the following using Microsoft® SQL Server® 2016: Write SQL scripts in Microsoft® SQL Server® for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Complete the following steps in Microsoft® SQL Server® 2016 Create a table. This table will tell...

    Complete the following steps in Microsoft® SQL Server® 2016 Create a table. This table will tell you what price the inventory item started at, what it currently is, and what it ends at. The primary key must be a combination of the inventory number and the current price date. Elements to include in your table are as follows: Inventory Number Integer Inventory Description Text Date Price Previous Date Date Price Current Date Date Price End Date Inventory Price Decimal

  • For this hands-on project, you will use the SQL Server named instance SQLSERVERHOA, and the HandsOnOne...

    For this hands-on project, you will use the SQL Server named instance SQLSERVERHOA, and the HandsOnOne database and tables you created in previous chapters. The objective of this activity is to practice generating keys and encrypting/decrypting data. Document each step by taking a screen shot of the Query Editor window after successfully executing each SQL query. 1.In SQL Server Management Studio, open a new Query Editor window, which you will use for completing all steps in this activity. 2.Create a...

  • This is questions of Accounting Information Systems 1) Fo a database. Each row in this spreadsheet...

    This is questions of Accounting Information Systems 1) Fo a database. Each row in this spreadsheet represents a: ur Tet Industries tracks customer information using various Microsoft Excel spreadsheets stored in a. Field b. Record c. File d. Database 2) A d tables is a. What is the correct term for the database field in Table 1? latabase field in Table 1 that serves as a unique identifier in Table 2 and is used to link both of the a....

  • Oracle 12c SQL - Chapter 5: Case Study: City Jail, Part II Note: You are limited...

    Oracle 12c SQL - Chapter 5: Case Study: City Jail, Part II Note: You are limited to using the Oracle Live interface to create solutions for the problems below. SQL Live does not allow as many commands, statements, and symbols as full Oracle SQL. Specifically, the ampersand substitution variable symbol (&) may not be used for any of the solutions below because Oracle Live does not recognize it. Oracle Live is available to use here: https://livesql.oracle.com/apex/f?p=590:1000 Execute the CityJail_5.sql script...

  • Part I. Create a library check-out database using Microsoft SQL Server that stores data about books,...

    Part I. Create a library check-out database using Microsoft SQL Server that stores data about books, patrons, and the check-out process. Books (BookID, BookName, Author, YearPublished) Patrons (PatronsID, PatronsName, PatronsAddress, PatronsBirthday) CheckInOut (TransactionID, PatronID, BookID, CheckOutDate, NumDay, ReturnDate, Late, Fees, Paid) - the NumDay field contains the number of days patrons can keep the book, if the return date is over the number of day, then the Late field will have a Y value and a fee of $1.00 per...

  • Write the following SQL statements in Microsoft Access by using the Books database from Week 2...

    Write the following SQL statements in Microsoft Access by using the Books database from Week 2 Assignment 2. Once complete, copy and paste the SQL statements in a Microsoft Word document: Write SQL statements: To update the publisher name from READ WITH US to READ FOR US To verify the updated name field for the publisher with ID 6 To make the following updates to the Publisher table (be careful with WHERE): Make Contact="John Travolta" for publisher with ID number...

  • Problem 1-5 using the table below in the picture to be answered in Microsoft SQL. Thanks...

    Problem 1-5 using the table below in the picture to be answered in Microsoft SQL. Thanks 4. Write SQL queries to answer the following questions, a. How many students were enrolled in secoon 14 b. How many students were enrolled in ISM 3113 5. Write an SOL query to answer the following question Which students were not enrolled in any courses on Problems and Exercises 6 through 14 are based on Figure 7-15. The problem set continues from Chapter 6,...

  • Question 1.Write a SQL statement for each of the following questions based on the above tables...

    Question 1.Write a SQL statement for each of the following questions based on the above tables (50 Points). 1) Create “Enrollment” table. 2) Change the credits of “Database” course from 2 to 3. 3) List the course titles (not Course_No) and grades John Doe had taken. 4) Calculate average of Café Balance, and name new field as Average Balance. 5) Create a roster for “Database” course (list student ID, last name, first name, major, and status for each student enrolled...

  • - - Requirements Building upon your project 1 and project 2, the park will be a Star Wars themed ...

    - - Requirements Building upon your project 1 and project 2, the park will be a Star Wars themed park. You must design additional parts of the database and create the following SQL Script. Step 1: Create table audits via triggers The system must log any insertion, deletion, or updates to the following tables Employee table (project 1) Job table (project 1) ProjectMain table (Project 2) ActivityMain table (Project 2) . . For each one of the table above, you...

  • For this set of Review Questions, we will create and use a database for the Wedgewood...

    For this set of Review Questions, we will create and use a database for the Wedgewood Pacific Corporation (WPC) that is similar to the Microsoft Access database we created and used in Chapters 1 and 2. Founded in 1957 in Seattle, Washington, WPC has grown into an internationally recognized organization. The company is located in two buildings. One building houses the Administration, Accounting, Finance, and Human Resources departments, and the second houses the Production, Marketing, and Information Systems departments. The...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT