Preview

CS457 E HW8

Good Essays
Open Document
Open Document
849 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
CS457 E HW8
1Q) What are GROUP BY with ROLLUP and CUBE operators?
As) The rollup, cube operators are extension of group by clause. The rollup, cube operators can generate the same result set as when you use UNION ALL to combine single grouping queries, however using one of the group by clause operators like rollup, cube, and grouping sets is usually more efficient. These operators don’t support the CHECK SUM _AGG function.

2Q) what is Grouping sets?
As) calculating all possible subtotals in a cube especially those with many dimensions can be quite an intensive process. If you don’t need all the subtotals, this can represent a considerable amount of wasted effort. In order to find subtotal of levels of any cube
For ex: We can use Grouping sets & specify exactly which one we need, saving us to calculate the whole cube. Grouping sets are specified in the group by clause.

3Q) what are composite columns?
As) A composite column is a collection of columns that are treated as a unit during the computation of groupings you can specify the column in parenthesis as in the following statement.
Rollup (year, (Quarter month), day).
In this statement data is not rolled up across year & quarter. (Quarter month) is a composite column which is treats as a unit.

4Q) What is concatenated grouping function is used for?
As) Concatenated grouping function are defined by putting to geher multiple grouping sets, cube or rollups separated by commas, resulting grouping are the cross-product of all groups produced by the individual grouping sets. It might be a little easier to understand

Ex: Grouping sets (a ,b), Grouping sets (c , d)
(a, c)
(a, d)
(b, c)
(b, d)

5Q) What is multiple column sub query?

As) ->It returns more than 1 column to their outer query & can be listed in the outer queries FROM, WHERE & HAVING Clause.
-> If multiple sub query is used in the FROM clause, it creates a temporary table referenced by outer clauses of outer query.
-> This temporary table is more formally called

You May Also Find These Documents Helpful

  • Good Essays

    The SELECT statement is the primary means of extracting data from database tables, and allows you to determine exactly which data you want to extract by means of different comparison operators used in the WHERE clause. This includes the use of specific "wild card" characters which allow you to search for character or number patterns within the data. You can also perform mathematical expressions within the SELECT statement to create derived output. The ORDER BY clause allows you to sort the output data in either ascending (the default) or descending order. Lab #5 will explore all of these applications of the SELECT statement.…

    • 1559 Words
    • 7 Pages
    Good Essays
  • Good Essays

    SEQUEL or SQL is a data language that provides benefits for all types of users. SQL’s purpose is to provide an interface to a relational database such as Oracle Database. Dr. Edgar Frank “Ted” Codd introduced the first commercially available implementation of SQL. Today, SQL is accepted as the standard RDBMS language. The features of SQL include processing sets of data as groups rather than as individual units and providing automatic navigation to the data. It uses statements that are complex and powerful individually, and that therefore stand alone. Flow-control statements were not part of SQL originally, but they are found in the recently accepted optional part of SQL. Flow-control statements are commonly known as "persistent stored modules" (PSM), and the PL/SQL extension to Oracle SQL is similar to PSM.…

    • 452 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    Nt1310 Unit 1

    • 4209 Words
    • 17 Pages

    It parses and also executes the statement Displays the execution plan for the select statement automatically…

    • 4209 Words
    • 17 Pages
    Powerful Essays
  • Satisfactory Essays

    Lab 204 Quiz

    • 2478 Words
    • 10 Pages

    Columns that belong to a different table than the ones in which they reside are called _____…

    • 2478 Words
    • 10 Pages
    Satisfactory Essays
  • Satisfactory Essays

    cis3730_Exam1_Studyguide

    • 512 Words
    • 2 Pages

    Understand the three components of a basic select statement and what do they mean (select, from, where).…

    • 512 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Unit 6 True

    • 287 Words
    • 1 Page

    The FROM keyword is used in a SELECT clause to determine which columns are included in the query. FALSE…

    • 287 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    When you include multiple data sources in a query, you use joins to limit the records that you want to see, based on how the data sources are related to each other. You also use joins to combine records from both data sources, so that each pair of records from the sources becomes one record in the query results. I think that a cross-join would be optimized in the library, so that less data was sent over the network and then merged, so that data didn 't need to be combined.…

    • 337 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    unit 6

    • 360 Words
    • 2 Pages

    8) The FROM keyword is used in a SELECT clause to determine which columns are included in the query.…

    • 360 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    07

    • 4772 Words
    • 25 Pages

    5) The SQL keyword CONSTRAINT is used in conjunction with the SQL keywords PRIMARY KEY and FOREIGN KEY.…

    • 4772 Words
    • 25 Pages
    Good Essays
  • Powerful Essays

    COAS B1 Ch04

    • 4621 Words
    • 28 Pages

    The large object has much less surface area for each ‘unit’ of volume; it has a much lower surface area to volume ratio.…

    • 4621 Words
    • 28 Pages
    Powerful Essays
  • Good Essays

    * Each row of the table holds data that pertain to some entity or a portion of some entity…

    • 805 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Relational Database Paper

    • 547 Words
    • 3 Pages

    The purpose of a query is to retrieve information from a table or tables, which can be based on some type of criteria. To put it simply, a query is designed to get you an answer from data already stored in the database.…

    • 547 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Content Standard: 1. Interpret products of whole numbers, e.g., interpret 5 × 7 as the total number of objects in 5 groups of 7 objects each. [3-OA1]Example: Describe a context in which a total number of objects can be expressed as 5 × 7.…

    • 1022 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Data Integrity

    • 500 Words
    • 3 Pages

    •Cascade: When referenced data is updated, all associated dependent data is correspondingly updated. When a referenced row is deleted, all associated dependent rows are deleted.…

    • 500 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    -Specifies a new base relation by giving it a name, and specifying each of its attributes and their data types (INTEGER, FLOAT, DECIMAL(i,j), CHAR(n), VARCHAR(n))…

    • 3961 Words
    • 21 Pages
    Powerful Essays

Related Topics