The questions here are based on the Library database whose schema and related information are listed on the last page. Write relational algebra expressions (NOT SQL) to answer the following questions....

The questions here are based on the Library database whose schema and related information are listed on the last page. Write relational algebra expressions (NOT SQL) to answer the following questions. Answering the questions using SQL will result in ZERO.


The questions here are based on the Library database whose schema and related information are listed on the last page. Write relational algebra expressions (NOT SQL) to answer the following questions. Answering the questions using SQL will result in ZERO 1. To identify the company with the largest transportation capacity, find the company with the highest total truck tonnage. Say, Company A has two trucks with tonnage of 10 tons and 2 tons, respectively. Then the total truck tonnage of A is 12 tons. You need to find the company with the largest total. You result should display the name of the company, their address and their total truck tonnage. 2. List the year(s) when more cars were made than trucks. For this question, you can assume that there are some trucks and some cars made every year. 3. Find the number of unique individual (person) who own some car(s) but no trucks. Note that a person owning multiple cars should count as one occurrence, NOT multiple. 4. Find the name of the company where there were at least two occasions that when they bought some car(s), they also bought some truck(s) on the same day. Say, Company A bought two cars and three trucks on Jan 1, 2022. This counts as ONE occasion, NOT two, three or six. 5. Find the address of the bank that owns every vehicle model made by GM. 6. Find the name and driver license of the person who ONLY purchases vehicle(s) made in the current year. That is, the vehicle is made in the same year as the purchase date. For example, if the purchase date for a vehicle is Dec 10, 2021, then the vehicle must be made in 2021. Find the person who did this for very vehicle they bought. 7. For each bank, find out from which vehicle maker they purchased the most number of vehicles. Your result should display the name of the bank, the name of the vehicle maker where they bought the most number of vehicles. 8. Find the vehicle maker with the highest average daily vehicle sale (average number of vehicles sold daily. You need to find the one with the highest average). Note that a vehicle sold to multiple owners (co-own) is one sale, not multiple. To make it simple, let's assume each maker sells at least one vehicle daily. 9. For banks that own both car and truck, list the name of the bank that owns the fewest number of vehicles. 10. List the model names of the top 2 most popular vehicle models (in terms of sales). You can assume that there are NO two models that are equally popular. The result should be displayed in the same row like: Most_Popular Second_Most_Popular Rogue Ram 11. For companies that own at least one car, find the pair of companies (A, B) where every type of car (same made, model and year) A has, B has it as well. Note that (A, B) and (B, A) are considered NOT the same pair. Say Company A has a 2020 Toyota Lexus and a 2017 GM Cadillac, and B has the same cars. Your result should display the names of the companies (A, B). Note that B has 3 every type of cars A has. But B might possess additional type(s) of car that A might or might not possess. This question is indeed quite tricky. If not sure, ask for help on the message board. 12. Find the name of the person(s) who owns both some car(s) and some truck(s). However, every car the person has is solely owned by that person (no co-own), and every truck the person has is shared with someone else (co-own)
Feb 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here