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

Database life cycle, Enumerate or state the steps in creating a relevant da...

Enumerate or state the steps in creating a relevant database of a shop.

How is oracle used in pl/sql, How is Oracle used in PL/SQL? Define the feat...

How is Oracle used in PL/SQL? Define the features of process and how they are defined? PL/SQL - PL/SQL is Oracle's procedural language (PL) superset of the Structured

Write short notes on index structure of files, WRITE SHORT NOTES ON INDEX S...

WRITE SHORT NOTES ON INDEX STRUCTURE OF FILES? There are two basic parts of indices 1.   Ordered indices 2.   Hash indices Every technique must be evaluated on the bas

Create student db and execute insert query, Create Student DB and execute I...

Create Student DB and execute Insert query? STUDENT (name, student#, class, major) COURSE (course name, course#, credit hours, department) SECTION (section identifier, course

Shadow copy, why shadow copy technique is used?

why shadow copy technique is used?

Spanned and unspanned organisation, Spanned and unspanned organisation? ...

Spanned and unspanned organisation? Spanned and unspanned organization: If records are not permited to cross block boundaries then the organisation is called unspanned record

Referential integrity constraint - relational constraints, It defines that ...

It defines that the tuple in one relation that refers to another relation must refer to an existing tuple in that relation. This constraint is states on two relations (not essentia

Explain hierarchical model, Explain Hierarchical Model ? Hierarchical ...

Explain Hierarchical Model ? Hierarchical Model - It was established to model several kinds of hierarchical organizations which exist in the real world. It uses tree structur

Write short notes on domain relational calculus, Write short notes on domai...

Write short notes on domain relational calculus The domain relational calculus uses domain variables that take on values from an attribute domain rather than values for whole t

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