2. Specify the query using relational algebra
Retrieve the name (first name, last name) of the employee who is either a manager or a supervisor.
*Don't just copy and paste from another chegg post.
******************************************************************************************
Please Upvote the answer as it matters to me a lot :)
*****************************************************************************************
As per HomeworkLib expert answering guidelines,Experts are supposed to
answer only certain number of questions/sub-parts in a post.Please
raise the remaining as a new question as per HomeworkLib
guidelines.
******************************************************************************************

2. Specify the query using relational algebra Retrieve the name (first name, last name) of the...
Write relational algebra expressions to retrieve the following
information from the music database. Use the most appropriate
operations for each query. In particular, use joins when
appropriate.
(a) For each composer, give the composer’s name and the total
number of pieces that (s)he has written, including composers who
have not written any pieces.
(b) For each type of instrument, give the instrument type
together with the total number of orchestral pieces which use that
type of instrument.
clef name opus_num...
Relational algebra (RA) For the database schema shown below, write RA query for each of the following. (State any reasonable assumptions only if necessary) employee (person_name, street, city) works(person_name, company_name, salary) company (company_name, city) Questions: Find person names, streets and cities of employees who work for two different companies. For each company, find person name, salary, street and city for the highest paid employee of that company. For each company, find total number of employees and total number of cities...
1. Write a query to list the first name and last name of those pilots who were hired after January 1, 2010. Sort your result by the ascending order of last name. Within matching last names, order by first name. 2. Write a query to list flight number, pilot number, pilot last name for all flights whose destinations are using the IN keyword. 3. Write a query to list the names and telephone numbers of the passengers who have reservations...
Due date: November 6, 2018 (Tuesday) Problems: 1. Specify the following queries on the database schema shown in Figure 3.6 using both the tuple relational calculus and the domain relational calculus. You don't need to show the result of each query if applied to the database of Figure 3.6. (a) Retrieve the names of employees in department 5 who work more than 10 hours per week on the 'ProductX' project (b) List the names of employees who have a dependent...
Intro to database systems: Q7. Formulate the following SQL query in relational algebra using an efficient way. The schema is given in the following. Emp(eno, ename, title, city) Proj(pno, pname, budget, city) Works(eno, pno, since) SELECT ename FROM Works , Emp WHERE Works.pno = ‘P150’ AND Works.eno = Emp.eno
Give the following queries in the relational algebra using the following relational schema: Student (sid, name, age, address, email, cgpa) enrolledIn (sid, modulecode, grade) module (modulecode, modulename, credits, lecturername) a) What are the names of students enrolled in module code “cs3020”? b) Give the module code of all the modules that are taught by the teacher named “Altaf”? c) Who teaches the module with code”cs1500”? d) Give the name of all the teachers teaching the student with id”12f6778”.
Write query using (USE ONLY SUBQUERIES) to find first name and last name of all customers that have rented a “music” movie order by last name. Using Sakila database
using the University database we have provided you with the creation script using the relational schema of a University as shown below. You should run this script in MySQL Workbench and use this database to extract the necessary information. The script is based on the following relational schema: Subject (subjectCode, departmentName) TeachingStaff (employeeNumber, firstName, surname, departmentName) Instructs (employeeNumber, subjectCode, studentID, position) Student (studentID, studentSurname, studentInitials, gender) TeachingCredentials (employeeNumber, degreecode, uni, awardYear) Enrolment (studentId, degreeCode, year, uni, timeMode, placeMode, completed) Grades...
Using the relational schema for the College Applications database, write relational algebra expressions that perform the following problems. Complete 5 out of 6 for full credit. Apply(sID, cName, major, decision) Student(sID, sName, GPA, sizeHS) College(cName, state, enrollment) 1. List the ids and names of the students that applied to the CS Dept at MIT. 2. For students that have applied to a college, list the student’s id, name and number of different colleges the students has applied to. 3. List...
Query 1: Retrieve names of all the projects as well as First and Last name of managers if they are working on any of these projects. Database: //STEP #1: CREATE TABLE employee ( fname varchar(15) not null, minit varchar(1), lname varchar(15) not null, ssn char(9), bdate date, address varchar(50), sex char, salary decimal(10,2), Super_ssn char(9), dno char(4), primary key (ssn)); CREATE TABLE department ( dname varchar(25) not null, dnumber char(4), Mgr_ssn char(9) not null, Mgr_start_date date, primary key (dnumber)); CREATE...