Question

In: Computer Science

COURSE : IT Enterprise systems Consider the Relations below STUDENT Student# Std-Name Address 1 Smith Jeddah...

COURSE : IT Enterprise systems

Consider the Relations below

STUDENT

Student#

Std-Name

Address

1

Smith

Jeddah

2

Bob

Buraidah

3

Alice

Dammam

COURSE

Student#

Course Code

Course-Name

1

IT241

Operating System

2

IT210

Computer Network

2

IT445

Decision Support System

Write a query using the Right Outer Join to retrieve the record from the two relations. Also, construct the table displaying the output of your query.

note: NEED A UNIQUE ANSWER AND NO HANDWRITING PLEASE..

THANK YOU

Solutions

Expert Solution

Query: SELECT T1.Student,T1.StdName,T1.Address,T2.CourseCode,T2.CourseName FROM STUDENT AS T1 RIGHT OUTER JOIN COURSE AS T2 ON T1.Student=t2.Student

SQL Program:

BEGIN TRANSACTION;

/* Create a table called NAMES */
CREATE TABLE STUDENT(Student integer PRIMARY KEY, StdName text, Address text);

/* Create few records in this table */
INSERT INTO STUDENT VALUES(1,'Smith','Jeddah');
INSERT INTO STUDENT VALUES(2,'Bob','Buraidah');
INSERT INTO STUDENT VALUES(3,'Alice','Damman');

CREATE TABLE COURSE(Student integer PRIMARY KEY, CourseCode text, CourseName text);

/* Create few records in this table */
INSERT INTO COURSE VALUES(1,'IT241','Operating System');
INSERT INTO COURSE VALUES(2,'IT210','Computer Network');
INSERT INTO COURSE VALUES(3,'IT445','Decision Support System');


COMMIT;

/* Display all the records from the table */
SELECT * FROM STUDENT;

SELECT * FROM COURSE;

/* Query for Right Outer Join */
SELECT T1.Student,T1.StdName,T1.Address,T2.CourseCode,T2.CourseName FROM STUDENT AS T1 RIGHT OUTER JOIN COURSE AS T2 ON T1.Student=t2.Student

1   Smith   Jeddah   IT241   Operating System
2   Bob   Buraidah   IT210   Computer Network
3   Alice   Damman   IT445   Decision Support System

OUTPUT:


Related Solutions

COURSE : IT Enterprise systems Consider the following enterprise scenario and answer the following questions. ABC...
COURSE : IT Enterprise systems Consider the following enterprise scenario and answer the following questions. ABC is a wholesale company that sells electrical equipment and provides a website from which customers can inquiry about products and identify what they want to buy. When costumers order electrical equipment, they place their order on the ABC website. ABC does not own or hold any equipment as inventory. Rather, the ABC orders the equipment from the appropriate supplier and ranges for the equipment...
Consider the following relations: Please answer in the form of symbol. Thank You Student (ssn, name,...
Consider the following relations: Please answer in the form of symbol. Thank You Student (ssn, name, address, major) Course(code, title) Registered(ssn,code) List the titles of all courses List the information of the students majoring in ‘CS’ List the codes of courses for which at least one student is registered (registered courses List the titles of registered courses List the codes of courses for which no student is registered
Given the following 7 relations: MIScompany (name, address, phone, email, FedTaxId, StaTaxId) branch (branchId, name, address,...
Given the following 7 relations: MIScompany (name, address, phone, email, FedTaxId, StaTaxId) branch (branchId, name, address, phone, email, FedTaxId, StaTaxId) employee (empId, driverId, ssno, name, branchId) customer (custId, name, address, driverId, ssno, FedTaxId, StaTaxId) equipment (equipId, name, type, upc, purchaseDate, year, manufacturId, cost, rentFee, branchId ) manufacturer (manufacturId, name, FedTaxId, StaTaxId, phone, email) rental (rentalId, equipId, custId, rentDate&time, returnDate&time, empId) Use relational algebra to retrieve every customer that has not rented any equipment in September 2020. The report should contain...
Given the following 7 relations: MIScompany (name, address, phone, email, FedTaxId, StaTaxId) branch (branchId, name, address,...
Given the following 7 relations: MIScompany (name, address, phone, email, FedTaxId, StaTaxId) branch (branchId, name, address, phone, email, FedTaxId, StaTaxId) employee (empId, driverId, ssno, name, branchId) customer (custId, name, address, driverId, ssno, FedTaxId, StaTaxId) equipment (equipId, name, type, upc, purchaseDate, year, manufacturId, cost, rentFee, branchId ) manufacturer (manufacturId, name, FedTaxId, StaTaxId, phone, email) rental (rentalId, equipId, custId, rentDate&time, returnDate&time, empId) 1) Use relational algebra to list every manufacturer that only makes electric cleaning tool (type of equipment). The report should...
Consider the following relations and relationship property(propertyNo, ownerID, type, rent, address) Newspaper(newspaperNo, name, street, city, zipCode,...
Consider the following relations and relationship property(propertyNo, ownerID, type, rent, address) Newspaper(newspaperNo, name, street, city, zipCode, phoenNo) Advertisement(propertyNo, newspaperNo, date, cost) 1. List the propertyNo of all the properties that have been advertised on “Houston Chronical” 2. List the names of all the newspapers where the properties with rent greater 1000 have been posted.
Write a Java program that outputs the output below Student Name: Andrew Johnson Course: Biology 101...
Write a Java program that outputs the output below Student Name: Andrew Johnson Course: Biology 101 Quiz Average and percent weight (separated by a space): 87 15 Project Average and percent weight (separated by a space): 92 25 Exam Average and percent weight(separated by a space): 85 40 Final Exam and percent weight (separated by a space): 83 20 Final Grade in Biology 101 for Andrew Johnson is 86.7 The largest average was 92 The smallest average was 83 Thank...
A database schema consisting of three relations STUDENT, COURSE, and STAFF is created as follows: CREATE...
A database schema consisting of three relations STUDENT, COURSE, and STAFF is created as follows: CREATE TABLE STUDENT (STU_ID CHAR(4), STUDENT_NAME CHAR(20), ADDRESS CHAR(20), BIRTHDATE DATE, GENDER CHAR(6)); CREATE TABLE COURSE (COURSE_ID CHAR(6), COURSE_TITLE CHAR(20), STAFF_ID CHAR(3), SECTION NUMBER(2)); CREATE TABLE STAFF (STAFF_ID CHAR(3), STAFF_NAME CHAR(20), GENDER CHAR(6), DEPARTMENT CHAR(20), BOSS_ID CHAR(3) SALARY NUMBER(8,2)); Write down SQL statement for each query below: 1) Find out the information of staff members who are female and earn either below $5,000 or above...
In the context of this course, you will be asked to address the issues/questions below for...
In the context of this course, you will be asked to address the issues/questions below for The Walt Disney Company (DIS). When addressing the issues/questions, be sure to do so in the context of this course and Disney. Your primary sources of information will come from the Disney website, in particular “Investor Relations” and the “2017 Annual Report.” Also, look at the web pages for Disney on Yahoo! Finance and/or Morningstar.com. a) Discuss the critical success factors and whether or...
In the context of this course, you will be asked to address the issues/questions below for...
In the context of this course, you will be asked to address the issues/questions below for Marriott International, Inc. (MAR), www.marriott.com. When addressing the issues/questions, be sure to do so in the context of this course and Marriott. You have been appointed as the special assistant to the Chief Executive Officer (CEO), Arne Sorenson, who has asked you to address the following five situations: (a) A fellow MBA alum from Lynn University, who now works in Admission at Lynn University...
Can company’s achieve competitive advantage even if they use the same Enterprise Systems? Address this statement...
Can company’s achieve competitive advantage even if they use the same Enterprise Systems? Address this statement in the context of a company of your choice. In providing your answer state why have you chosen the company and discuss whether this company can achieve competitive advantage using the same enterprise systems as their competitors. Please refer to your readings to support your answer.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT