I have some questions about something that I'm working on in an assignment for my database class.
Here is the schema for the questions I'm working on, so that you know what to refer to:
Category(class, function, country, num_guns, max_altitude, max_fuel) Planes(pname, class, year) DogFights(dname, date) Outcomes(pname, dname, result)
The first few questions I worked on I was able to get just fine since they were just using the projection and select operations, but I'm getting a little confused with the next few. I'm guessing that I will likely have to use the cross-product somewhere, but I just don't quite know how I would use it.
The questions are the following: What are the names of the planes that carried the least amount of fuel in the Battle over Pearl Harbor?
What are the names of planes that can carry more fuel than the Memphis Belle?
What are the names of all the planes that participated in a dog fight in which Hard Luck also participated?
Today in our clas, we did go over Cartesian products a little more in relation to relational algebra, and I have got a little bit of an understanding now. In the question just before the ones I posted here, it's asking what class of plane can fly the highest, and I figured it out using an example we did in class today. For that question I figured out the following:
`Category * 𝜌c(Category)
PA <- ∏class(category.max_altitude < c.max_altitude(Category * 𝜌c(Category))
∏class(category) - PA`
So for those questions I posted, would I just do something like this in conjunction with the projection and select operations?