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 are the two aspect to the implementation of association, What are the ...

What are the two distinct aspects to the implementation of associations? i) It is required to define data declarations which will enable details of actual links to be stored. I

Log, what is the need of a log in dbms

what is the need of a log in dbms

Find out the names and company names from database, Find out the names and ...

Find out the names and company names of all employees sorted in ascending order of company name and descending order of employee names of by which company. SELECT EMPLOYEE_NAME,

How to rearrange the execution order for efficiency, Rearrange the Executio...

Rearrange the Execution Order for Efficiency  Rearranging execution order for efficiency means executing such job that requires less execution time. By rearranging the object

Optimistic concurrency control, Optimistic Concurrency Control Is locki...

Optimistic Concurrency Control Is locking the only way to stop concurrency related problems? There exist some other ways too. One such way is known as an Optimistic Concurrency

Dataware house, ) Define a job scheduling strategy that will meet business ...

) Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a picto

Fds in relationships and teaches relationship, FDs in Relationships:  E...

FDs in Relationships:  Enrols Relationship: None as it is many to many Teaches Relationship : Course code → Instructor Instructor → Course code The next question is:

What is called as recursive partitioning, What is called as recursive parti...

What is called as recursive partitioning? The system repeats the splitting of the input unless each partition of the build input fits in the memory. Such partitioning is known

Create database for car application, The Database MySQL scripts cars_f...

The Database MySQL scripts cars_for_sale.sql and car_details.sql containing the data to use for this task have been supplied. To complete this task, you need to first create

Define 2nf normal form, 2NF Normal Form : A relation schema process R i...

2NF Normal Form : A relation schema process R is in 2NF if it is in 1NF and each non-prime attribute A in R is fully functionally related on primary key. Second normal form (2N

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