Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need to use relational algebra - so like this notation for example LName='Rockwood Lake' ( Phone, SID (CatchReport) LName (Swim)) Cannot use phrases like HAVING,

Need to use relational algebra

- so like this notation for example LName='Rockwood Lake' ( Phone, SID (CatchReport) LName (Swim))

Cannot use phrases like HAVING, ELSE GROUP BY only relation algebra

Selection, Projection, Cartesian product, Union, and Set Difference, Join, Natural Join, Set difference, Division, Aggregation

Schema: Member(MName, Phone, Street, MCity, Province, Postal)

CaughtReport(Phone, TagID, Date, Time, BID, SwimID, Weight, Condition)

Pound(PName, PCity)

PoundGround(PName, PoundGroundID, Location, NickName)

breed(BID, BName, Descriptions)

Q1. Based on the number of dogs caught, are there more labs, bulldogs or more GermanSheps in all pounds located in Guelph? The result should be displayed in the same row like: labs. bulldogs GermanSheps

Q2. Find the member(s) who never caught dogs in pounds located outside their own city (where they live). For this question, assume that a member never catches any dogs in a pound if they never submitted any catch report for that pound. Note that this includes member who has never caught dogs (never submitted any catch report). Your result should display the names of the members, their phones and cities.

Q3. Find out how many times Lilly Collins and Emily Blunt caught some labs on the same day

Q4. Find the pound with the highest average number of dogs caught per person. Say, over the years, John caught 9 dogs in Guelph Pound and Katty caught 123. The average number of dogs caught per person for Guelph Pound is 66. You need to find the name of the pound with the highest average.

Q5. Find the pair of members who catch dogs together most frequently (submitted some catch report on the same day and in the same Poundground most frequently). If John and Kate Caught dogs in Pound 10 on Jan 10, 2021, this is considered catching together once regardless how many catch reports being submitted on that day. Be aware of duplicates. Duplicates should be removed, including the same two persons but in different orders. For example, (Cameron Diaz, Helen Mirren) and (Helen Mirren, Cameron Diaz) are considered the same pair. Your result should display their names.

Thanks!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

How much overlap should be provided between APs? Why?

Answered: 1 week ago