Please Solve This query

  • Hi this is the scenario please solve this query waiting for immediate response please

    The database of naval ships that took part in World War II is under consideration. The database has the following relations:

    Classes(class, type, country, numGuns, bore, displacement)

    Ships(name, class, launched)

    Battles(name, date)

    Outcomes(ship, battle, result)

    Ships in classes are arranged to a single project. A class is normally assigned the name of the first ship in the class under consideration (head ship); otherwise, the class name does not coincide with any ship name in the database.

    The Classes relation includes the class name, type (bb for a battle ship, or bc for a battle cruiser), country where the ship was built, number of main guns, gun caliber (diameter of the gun barrel, in inches), and displacement (weight in tons). The Ships relation includes the ship name, its class name, and launch year. The Battles relation covers the name and date of a battle the ships participated; while the result of their participation in the battle (sunk, damaged, or unharmed - OK) is in the Outcomes relation. Note: the Outcomes relation may include the ships not included in the Ships relation.

  • Since this appears to have the potential of being homework or class project, the first thing many of us would like to see is what have you done so far to solve your problem. Second, where are you having problems in regards to solving your problem.

    We have no problems helping you with this project, but please don't expect us to do your work for you. If this is a class project, doing so is considered plagarism and is also academic dishonesty.

    We will give you suggestions, pointers, tips, what ever it takes to help you develop the actual solution; we just won't write it for you.

  • anshu84onnet (4/28/2010)


    solve this query waiting for immediate response

    What query? You've provided a crude outline of a database - there's no query specification within your post.

    โ€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.โ€ - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • I admire your teacher. This homework problem actually sounds like a bit of fun to solve rather than the usual library or shopping cart examples.

    But the other guys are right. You haven't defined clearly what you want, and since this is homework, you need to show us what you've done as honest effort.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • My take on this post is (s)he wants us to build the actual database.

    Read Books Online. It has all sorts of useful information on how to do this task.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Or you could start here: http://www.sqlservercentral.com/articles/Stairway+Series/69801/

  • please solve this query waiting for immediate response

    I'll echo Lynn, how have you approached this problem? Also, you will find that online forums are not geared to providing "immediate response". Sometimes it happens, but often it doesn't.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Aw man! You sunk my battleship!!

    The Redneck DBA

  • anshu84onnet (4/28/2010)


    Hi this is the scenario please solve this query waiting for immediate response please

    Please send $1,000 USD to my PayPal account as a down payment and I'll get started on it right away. ๐Ÿ˜‰

    If this is a homework problem/school project, you need to do a whole lot of work yourself so you actually learn something along the way.

    If this is a real project for a business, you should hire someone who actually knows something about SQL Server.

    For sure, this isn't a question that will be answered on a forum.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply