Relational algebra and calculus, Database Management System

Assignment Help:

Q. What is relational algebra and calculus? Explain the relational algebra operators :- Selection and predicate, set operation, joins and division.

Sol. Relational Algebra 

It is a procedural query language. It consists of a set of operations that tade one or two relations as input and produce a new relation as their result. The fundamental operations in the relational algebrare :- In addition to these there are several other operations namely : set intersection natural join division and assignment.                                                                                                                                                     

1. Selection and Predicate                                                                                                                                                     (i) Select operation : It selects tuples that satisfy a given predicate. We use a lower case letter sigma to denote selection . The preicate appears as subscript to entity, The argument relation is in parentheses after the query. In general, we allow comparisons using =, =, <, < _, > >, _ in the selection       predicat. We can also combine several predicate in to a larger predicate by using the connectives and or and not.                                                                                                                                                   (ii) Predicate operation :  The predicate operation is a unary operation that returns its argument relation with certain attributes left out. It is denoted by the upper cade Greek letter pi.                                                                                                                                                          

2 Set operation : The set difference operatio denoted by allows us to find tuples that are I one relation but are not in another. We can find all customers of the bank who have an account but not a loan by that branch.                                                                                                                                                                     

3 Natural join : It is a binary operatio that allows us to combine certain selections and a cartesian product into one operation. It is denoted by join symbol.                                                                                                                                                                          

4 Division operation : The division operation denoted by is suited to queries that include the pharase for all. We can obtain all branches in Brooklyn by the expression. 


Related Discussions:- Relational algebra and calculus

Sql insert statements, Submit SQL INSERT Statements that will populate the ...

Submit SQL INSERT Statements that will populate the database with sample data.  You must insert at least 5 records into each table in your database.Submit your SQL INSERT Statement

On laod, how to write a in a text and load it on mysql

how to write a in a text and load it on mysql

What is normalization, What is normalization? It is a method of analysi...

What is normalization? It is a method of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to attain the properties (1).Minim

Clinic, Need a sample of a clinic database relationships

Need a sample of a clinic database relationships

How to create a table from existing table, How to create a table from exist...

How to create a table from existing table? Create table as e.g, To create a new table ‘N_emp' with employee names and their identification numbers only from employee ta

Sql, example of embedded SQL query

example of embedded SQL query

One to many - relationship cardinality, One-to-many : An entity in A is rel...

One-to-many : An entity in A is related with any number of entities in B. An entity in B is related with at the most one entity in A. Example: Relationship between faculty and d

In tuple relational calculus p1- p2 is equivalent to, In tuple relational ...

In tuple relational calculus P1 → P2 is equivalent to ? A In tuple relational calculus P1→  P2 is equivalent to ¬P1 V P2. (The logical implication expression A  B, meaning

Explain natural join, Explain natural join? Natural Join - Similar as...

Explain natural join? Natural Join - Similar as equi-join except in which the join attributes (having similar names) are not involved in the resulting relation. Only one sets

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