
Consider a
SUPpLIER(Sno. Sname)
PART(Pno, Pname)
PROJECT(Jno, Jname)
SUPPLY(Sno, Pno, Jno)
The database records information about suppliers, parts, and projects
andincludes a ternary relationship between suppliers, parts, and projects.
Thisrelationship is a many-many-many relationships. Specify and execute the
followingqueries using the relational algebra
Retrieve the part numbers that are supplied to exactly two projects.
b. Retrieve the names of suppliers who supply more than two parts to
project J11
c. Retrieve the part numbers that are supplied by every supplier.
d. Retrieve the project names that are supplied by supplier S1' only.
e. Retrieve the names of suppliers who supply at least two different parts
each to at least two different projects.

Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images

- Using the instance of the Airport database, formulate the following queries in the relationalalgebra: 1)Display the number of all carriers and the average of their revenues. 2)Display the minimum, the average, and the maximum distances of the flights that arescheduled on October 17th, 2017? 3)Display, for each carrierID, the number of flights and the average of their distances. Examples of how to do it below:arrow_forwardImplement a new independent entity phone in the Sakila database. Attributes and relationships are shown in the following diagram: The diagram uses Sakila naming conventions. Follow the Sakila conventions for your table and column names: All lower case Underscore separator between root and suffix Foreign keys have the same name as referenced primary key Write CREATE TABLE and ALTER TABLE statements that: Implement the entity as a new phone table. Implement the has relationships as foreign keys in the Sakila customer, staff, and store tables. Remove the existing phone column from the Sakila address table. Step 2 requires adding a foreign key constraint to an existing table. Ex: ALTER TABLE customer ADD FOREIGN KEY (phone_id) REFERENCES phone(phone_id) ON DELETE SET NULL ON UPDATE CASCADE; Specify data types as follows: phone_id, phone_number, and country_code have data type INT. phone_type has date type VARCHAR(12) and contains strings like 'Home', 'Mobile', and 'Other'. Apply…arrow_forwardI am having some trouble with this for an assignment in Database. I am trying to create some queries for this homework: Assignment 5: Data Definition language and Transaction in MySQL This is what I am currently working on: On June 3, 2019, customer ‘10010’ makes a payment of $100 in cash. The payment ID is 3428. The query as it is as of this moment: SELECT PAYMENTINSERT INTO PAYMENT (PMT_ID,PMT_DATE,CUS_CODE,PMT_AMT,PMT_TYPE,PMT_DETAILS)VALUES(3428,6-3-2019,10010,100.00,cash,account),UPDATE CUSTOMERSET CUS_BALANCE = CUS_BALANCE + 100WHERE CUS_CODE=10010,COMMIT 2. On May 11, 2019, customer ‘10012’ makes a credit purchase of one unit of product ‘11QER/31’ with a unit price of $110.00; the invoice total is $118.80. The invoice number is 10983, and this invoice has only one product line. [note: no payment has been made here] The Query as of now: BEGIN TRANSACTION; INSERT INTO VOICE VALUES (10983, 10012, ’5-11-2019’), INSERT INTO LINE VALUES (10983, 1, ‘11QER/31’, 1, 110.00), UPDATE…arrow_forward
- Motor Vehicle Dealership Database: Consider Aaron's dealership, a multi-brand vehicle dealership whose database consists of four relations as described below. Using this database, answer questions Vehicle(make, model, manfYear, color, vinNum, type, purchaseld) Stock(stockNum, unitPrice, deliveryDate, vehiclesRemaining) Manufacturer(name, manfCode, plantLocation) Purchase(purchaseld, mCode, numVehicles, orderDate, deliveryStatus) • A vehicle can be one of the following types: Car, Truck, SUV • vinNum →Vehicle Identification Number • manfCode/mCode → a 4 character alphanumeric code for the manufacturer • manfYear → year of vehicle manufacture • purchaseld and stockNum refer to the same item • The delivery status is true if the order has been delivered to the dealership and false otherwise • Manufacturer name may not contain the same data as the make of the Vehicle. For example, • name of the manufacturer: Ford Motor Company • make of the vehicle: Ford Q1. Using SQL, list the names of all…arrow_forwardGiven the database schema below, write a relational algebra expression to get the count of records in the DEPENDENT relation group by Essn. Also, show the result of your query.arrow_forwardQ3) consider you have the Library database with the following relations, where the primary keys are underlined: Book (bookID, name, auther, No.-of-pages, section-name, category) Section(section-name, section-admin, no-of-books, library-code) Library(library-name, address, no-of-sections, manager-name, library-code, country)arrow_forward
- EMPLOYEE Frame Minit Lname Sen Bdate Address Sex Salary Super sen Dno +444 DEPARTMENT Dname Dnumber Mor an Mgr start date DEPT LOCATIONS Dnumber Dlocation PROJECT Prame Prumber Plocation Dnum WORKS ON Ennn Pno Hoir Hours DEPENDENT Esen Dependent name Se Bdate Relationship Reforential integrity constraints displayed on the COMFWNY relational database schema. One possible database state for the COMPANY relational database schema. EMPLOYEE Fname Minit Lname John Frankin T Sex Salary 30000 333445555 5 M 40000 Jo00665555 F 25000 Joe7e54321 43000 J88Ge5556 San Bdate Address Super en Dno 123456789 1965-01-09 731 Fondren, Hounton, TX M 333445555 1955-12-08 638 Voas, Houston, TX Go0087777 1960-01-19 3321 Castle, Spring. TX 987654321 1941-06-20 291 Berry, Bellaire, TX Narayan 666884444 1962-09-15 975 Fire Oak, Humibile, TX M B Smith Wong Zelaya Wallace 5 Alicia 4 Jennifer F 38000 333445655 25000 333445555 M 25000 007654321 M 55000 NULL Ramesh English 453453453 1972-07-31 5631 Rice, Houston, TX F…arrow_forwardThe following relations are part of a general store database: customer(custnum, custname, city, creditlimit) orders(ordernum, orderdate, filled, custnum) orderline(ordernum, productnum, quantity, salesprice) product(productnum, descr, producttype, msrp, onhand) Here is a sample data (assume there are more records)Using PROJECT, SELECT and JOIN, write the sequence of operations to answer each of the following questions: 1a. What are the names and customer numbers of customers who are from Mississauga? 1b.What are the names of products (descry) and product types of products purchased by customers from brapton?arrow_forwardDon't copy again and again that is wrong. Please help me with this question.arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





