Hi,
For a join between 2 tables, the table which is writen on the left hamd side of the join is called a left table and a table which is written on the right hand side of the join is called right hand side table. In the given question, if we join student table with course table, the student table is considered as left table and course table is right table.
Also, it is asked in the question to use the right join. Joon will work on the basis of join condition. We need to find the colimn which is common in both student and course relation. The common column is student#. So, we need to use this column in the join condition. Also, as it is a right join it will return the unmatched rows from the right table which is course table.
Query-
select * from student s right outer join course c on s.student_number=c.student_number;
Output-
student# | std-name | Address | student# | course | course_name |
1 | Khan | Madina | 1 | IT342 | Enterprise systems |
2 | Mohammad | Yanbu | 2 | IT407 | Professional Issues |
null | null | null | 3 | IT445 | DSS |
w with explanation please Pg. 02 Question Two Leaming Outcomers) Question Two 10 Marks Create a...
5. Consider database system with two tables at different two sites as follow: Site 1 Student Table Student-ID Student -NAME Address 200 Records, each record 50 bytes Student-ID = 10 bytes, Student -NAME 20 bytes, Address 20 bytes Site 2 Course Table Course - ID Course -Name Student-ID 40 records, each record 50 bytes Course -ID 20 bytes, Course -NAME 30 bytes Consider the queryQ For each Student, retrieve student-NAME and Course -Name for all students who study courses Suppose...
Question 1. Execute the join of the two relations and verify that there are spurious false. 2. Do the same for all 3 possible decompositions given above. 3. Verify that the last partition of the attributes (D3) does not produce spurious tuples and only D1, and D2 produce spurious tuples. Problem on Join SQL Functional dependencies and decomposition Two FDs exist in the relation TEACH(student,course,instructor): – fd1: { student, course} → instructor – fd2: instructor → course • {student, course}...
Question 1 (5 marks) Consider two relations called Item and Orderltem. Imagine that relation Item has 160,000 tuples and Orderltem has 200,000 tuples. Both relations store 100 tuples per a page. Consider the following SQL statement SELECT * FROM Item INNER JOIN OrderItem ON Item.ItemID-OrderItem. ItemID; We wish to evaluate an equijoin between Orderltem and Item, with an equality condition Item.ltemID Orderltem.ItemID. There are 802 buffer pages available in memory for this operation. Both relations are stored as (unsorted) heap...
Can someone please help me solve the following database management question a - d please help uestion-4 The relational database schema of Question-3 is reproduced here. COURSE (NUMBER, TITLE, ENROLLED) RANK-1 (CNUMBER, R1-SSN) RANK-2 (CNUMBER, R2-SSN) TALLEST (CNUMBER, TALL-SSN) STUDENT (SSN, NAME, MAJOR, SEX, GPA) Formulate the following queries in soL. (30] (a) List the course numbers in which "Jack Hernandez" is the first ranked student. You are not allowed to use any JOIN operation and your answer must be...
This is third time im posting this Question COURSE; introduction to database Please, No handwriting thanks for your efforts Design the database by following . Execute the sample requested queries. . ER Diagram. . All schemas before and after normalization. . All SQL statements of: -Creating tables. - Inserting data in tables. -Queries. 5. Screenshots from MySQL (or any other software you use) Question is - Database system for a Wholesale Management System Consider a database system for a Wholesale...
This is third time im posting this Question COURSE; introduction to database Please, No handwriting thanks for your efforts Design the database by following . Execute the sample requested queries. . ER Diagram. . All schemas before and after normalization. . All SQL statements of: -Creating tables. - Inserting data in tables. -Queries. 5. Screenshots from MySQL (or any other software you use) Question is - Database system for a Wholesale Management System Consider a database system for a Wholesale...
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...
Please provide the relation algebra, the oracle SQL code and the output tuples for the following (Answer #6 only the BONUS question). I have the others actually I have the BONUS, but I want to compare with your solution to make sure I did it correctly. Thank you very much! LAB exercises 2 Write the Oracle DML query codes for the following questions and take the screen shot of the output. 1. Retrieve the name and address of all employees...
The lab for this week addresses taking a logical database design (data model) and transforming it into a physical model (tables, constraints, and relationships). As part of the lab, you will need to download the zip file titled CIS336Lab3Files from Doc Sharing. This zip file contains the ERD, Data Dictionary, and test data for the tables you create as you complete this exercise. Your job will be to use the ERD Diagram found below as a guide to define the...