With the RelaX relational algebra calculator, and using the UIBK Pizza database, write a relational algebra expression that results in the names of all the people that eat pepperoni pizza at a pizzeria that does not serve cheese pizza.
If you have any doubts, please give me comment...
name
(((
pizza =
'pepperoni' Eats)
Serves) -
((
pizza =
'cheese' Eats)
Serves))
With the RelaX relational algebra calculator, and using the UIBK Pizza database, write a relational algebra...
Consider a database with the following schema: Person ( name, age, gender ) name is a key Frequents ( name, pizzeria ) (name, pizzeria) is a key Eats ( name, pizza ) (name, pizza) is a key Serves ( pizzeria, pizza, price ) (pizzeria, pizza) is a key Write SQL clauses for the queries given: e. Find all pizzerias that are frequented by only females or only males. f. For each person, find all pizzas the person eats that are...
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...
1. Given the following database schema owner(owner_name, age) owns(owner_name, num_cats) Write relational algebra for the following: Find the name of all owners above the age of 50 Find the name of all owners who own fewer than 5 cats Find the name of all owners who are below the age of 24 and own more than 4 cats 2. Given the following database schema person(name, age, account_id) account(account_id, balance) Write a relational algebra for the following Find the name of...
Relational algebra pls. Appreciate it!(Queries are
detailed)
Consider the following relational database that stores information about bars and customers: Drinker (name, address) Bar (name, address) Beer (name, brewer) Frequents (drinker, bar, times a week) Likes (drinker, beer) Serves (bar, beer, price) Write the following queries in relational algebra: (5 points) Find all drinkers who frequent only those bars that serve some beers they like. 5 points) Find all drinkers who frequent every bar that serves some beers they like (10...
Given the following relational database schema (primary keys are bold and underlined). Answer questions 2.1 to 2.4 Orders(orderld, customerld, dateOrdered, dateRequired, status) Customer(customerld, customerLastName, customerStreet, customerCity, customerState, customer Lip OrderDetails(orderld.productld, quantity, lineNumber, amount) Products(productld, name, description, quantity, unitPrice) Account(accountNumber, customerld, dateOpened, creditCard, mailingStreet, mailingCity, mailingState, mailingZip) 2.1 (2 Points) List all possible foreign keys. For each foreign key list both the referencing and referenced relations. 2.2 (2 Points) Devise a reasonable database instance by filling the tables with data of...
Using the CAP database handout. Write the relational algebra
statement to answer the following question. Then write the SQL
statement to answer the same question.
Get aids of agents who place individual orders in dollar value
greater than $500 for customers living in Kyoto.
Chanter 2 The Relational Model O'Neil, P., & O'Neil, E (200). Database prineiples programming performance (2d ed.). San Franciscu: Morgan Kaufmann. PRODUCTS pd pname city p0 combl111400C.so p02brushNewark 2030000.S0 pzorDuluth 150600 1.00 CUSTOMERS Cname city discat...
Write relational algebra formulas what will satisfy the
following queries:
A- What are the names of all the planes that participated in a
dog fight in which Hard Luck (a name of a plane) also
participated?
B- What are the names of all the dogfights that must have
happened entirely under 30,000 feet?
1. Shown below is the relational database schema for a database which contains details regarding bus journeys from Tronoh to various destinations: BusOperator (opCode, opName) Journey(QpCode,GestinationCode price) Destination (destinationCode, destinationName, distance) a. Formulate the following queries using relational algebra: . Get the name of bus operators (e.g., Plusliner, Sri Maju etc.) that provide journeys which are priced at more than RM50.00. (3 marks ii. List the names of a destinations along with their prices provided by Plusliner. 3 marks] b....
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...
5.10 Express each of the following queries in relational algebra and (ii) SQL using the Student Registration System schema of Figure 3.4. a. List all courses that are taught by professors who belong to the EE or MGT departments. Exercises 189 b. List the names of all students who took courses both in spring 1997 and fall 1998 38 CHAPTER 3 The Relational Data Model FIGURE 3.4 Fragment of the Student Registration database schema STUDENT (Id:INTEGER, Name:STRING, Address:STRING, Statu PROFESSOR...