Difference between functions along with or without grouping, Database Management System

Assignment Help:

Explain the difference between using functions along with and without grouping attributes in relational algebra. Give examples.

Ans: Group functions are used to group data of similar type.
GAMMA = grouping and aggregation
Applying GAMMAL(R)
• Group R according to all the grouping attributes on list L.
1. That is: form one group for each distinct list of values for those attributes in R.
• Within each group, compute AGG(A ) for each aggregation on list L.
• Result has one tuple for each group:
1. The grouping attributes and
2. Their group's aggregations.
Example: Grouping /Aggregation
R = ( A B C )
1 2 3
4 5 6
1 2 5
GAMMAA,B,AVG(C) (R) = ?
First, group R by A and B :
A B C
1 2 3
1 2 5
4 5 6
Then, average C within groups:
A B AVG(C)
1 2 4
4 5 6


Related Discussions:- Difference between functions along with or without grouping

What is the use of raid, What is the use of RAID? A variety of disk-org...

What is the use of RAID? A variety of disk-organization methods, collectively called redundant arrays of independent disks are used to better the performance and reliability.

Define views in relational algebra, Views in relational algebra:   1. B...

Views in relational algebra:   1. Basic expression contains either  a) A relation in the database. b) A constant relation. 2.  General expressions are madde out of sma

Define database management system, Normal 0 false false fal...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Define the terms key attribute and value set, Define the terms i) Key attr...

Define the terms i) Key attribute ii) Value set Key attribute: An entity type usually has an attribute whose values are exact from each individual entity in the collection. Su

Finkelstein methodology, PART MARKING: For this section, we will use part m...

PART MARKING: For this section, we will use part marking. This means we will supply model answers to all questions but we will only mark six questions. We will choose these randoml

Database Management System, please give me introduction to full data in D B...

please give me introduction to full data in D B M S in a short assignment

1) Information about a bank is about customer, 1) Information a...

1) Information about a bank is about customers and their account. Customer has a name, address which consists of house number, area and city, and one or more phone numbers. Ac

Define dba database administrator, Define DBA database administrator? ...

Define DBA database administrator? DBA : A database administrator (DBA) is a person who is responsible for the environmental aspects of a database. In common, these involves:

Data redundancy, Data Redundancy -A lot of information is being repeated in...

Data Redundancy -A lot of information is being repeated in the relation. For instance, the information that MCS-014 is named SSAD is repetitive, address of Rahul is "D- 27, Main ro

Design a gennalization and specialization hierarchy for an a, Design a genn...

Design a gennalization and specialization hierarchy for an automobile sales company

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd