-1

I just started learning Database Relational Algebra, and I got stuck on this question.

Find the ships of bb type that was first sunk

I couldn't figure out how to get first value, thanks for your help.

Classes(class, type, country, numGuns, bore, displacement) Ships(name, class, launched) Battles(name, date) Outcomes(ship, battle, result)

Other question that I don't know whether I'm right or wrong, I will be really grateful if you guys check it for me.

Find the ship names that not engaged in any battle. πname ship(σbattle=∅(Outcomes)

sorry I'm not good at English

Doan Van Thang
  • 989
  • 1
  • 10
  • 21
  • Hi. Please read hits googling 'stackexchange homework'. Show your work--how did you come up with that answer? Show what parts you can do. Also--there is no one RA (relational algebra). They differ in operators, arguments & even what a relation is. So please tell us what one you are using. Eg your textbook name & edition & where in it. RA is a programming language so see [mcve]. Google 'run relational algebra online'. "∅" is not zero, it is the empty set. PS Why are you asking for battles that are equal to ∅ or 0? Find all ships; find ships that battled; which ships had no battles? – philipxy Oct 12 '18 at 18:52
  • These are both faqs. Please always google many clear, concise & specific versions/phrasings of your question/problem/goal with & without your particular strings/names & read many answers. Add relevant keywords you discover to your searches. If you don't find an answer then post, using 1 variant search as title & keywords for tags. See the downvote arrow mouseover text. When you do have a non-duplicate code question to post please read & act on [mcve]. Please ask one question per post. [Re querying.](https://stackoverflow.com/a/24425914/3404097) – philipxy Oct 12 '18 at 19:03

1 Answers1

0

The first ship sunk will be the one with the lowest date; this means it will have the same date as the minimum date of all ships sunk.

Scott Hunter
  • 48,888
  • 12
  • 60
  • 101