Explore BrainMass
Share

Explore BrainMass

    Subquery vs. Join.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Please help me with this question:
    Which is better to use, a subquery or a JOIN? Why?
    Show an example of each to support your reasoning.
    Communicate with a relational database to create tables, and query and manipulate data.
    Use normalizing and data integrity methodologies when designing a database.
    Create and manage databases and their related components.

    © BrainMass Inc. brainmass.com October 10, 2019, 5:20 am ad1c9bdddf
    https://brainmass.com/business/management-information-systems/subquery-join-501804

    Solution Preview

    ** Please see the attached file for Word formatted version of the solution **

    There are ongoing arguments among experts about the superiority of sub-query vs JOIN. Both sides have their reasons to support their position. From my point of view, there are several axis of being "better":
    - better performance
    - better readability
    - better maintainability
    - better flexibility and so on

    In JOINs RDBMS can create an execution plan that is better for our query and can predict what data should be loaded to be processed and save time, unlike the ...

    Solution Summary

    This solution compares sub-query with JOIN, and provides an example of each database system to support the assessment.

    $2.19