Queries

Gary Herron gherron at islandtraining.com
Thu Feb 26 01:45:36 EST 2009


mmcclaf wrote:
> I have to make  some queries for 4 tables I have. The following
> relations are:
>
> Classes(class, type, country, numGuns, bore, displacement)
> Ships (name, class, launched)
> Battles (name, date)
> Outcomes (ship, battle, result)
>
> The three queries I'm stuck on are the following:
>
> 1. Find the classes that have only one ship as a member of that class
> (not all ships are listed in the Ship table)
> 2. Find the countries that had both battleships and battlecruisers
> (those fall under type in Classes)
> 3. Find those ships that "lived to fight another day"; they were
> damaged in one battle, but later fought in another.
>
> The best way for me to understand would be relational algebra for each
> of the statements.
>   


Sounds like a homework assignment.    Good luck with it.


> Any help in this would be greatly appreciated.
> --
> http://mail.python.org/mailman/listinfo/python-list
>   




More information about the Python-list mailing list