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

Improve efficiency of database, Smart Alex Catering Sevice (SACS) is a comp...

Smart Alex Catering Sevice (SACS) is a company offering top class catering staff  for prestigious events.  The company employs approximately 200 hourly paid contact staff - chefs,

Describe participation constraints, Describe Participation Constraints? ...

Describe Participation Constraints? Participation Constraints - The participation constraint exacts whether the existence of an entity depends on its being related to another

What is average response time, What is average response time? The avera...

What is average response time? The average response time is that the average time for a transaction to be done after it has been submitted.

What are views explain how views are different from tables, What are views?...

What are views? Explain how views are different from tables? A view in SQL terminology is a one table in which is derived from other tables. These other tables could be base t

Data handling and research methods, Data Handling and Research Methods: ...

Data Handling and Research Methods: The dataset encompassing 130 participants contains several variables measuring detrimental health related behaviours referring to the use o

Binary relationship, explain in details about one to one binary relationshi...

explain in details about one to one binary relationship

What are the advantages of logical databases, What are the advantages of Lo...

What are the advantages of Logical Databases? It offers a simple-to-use selection screens.  You can change the pre-generated selection screen to your needs.  It offers check f

How can you connect to the mysql server, How can you connect to the MySQL S...

How can you connect to the MySQL Server? In order to connect to the MySQL server it is necessary to give the username and password so this be able to done with The following

What is rdbms, What is RDBMS? Relational Data Base Management Systems (...

What is RDBMS? Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be formed and

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