Redirecting to
NADOS


  Prev   Next
First learn about procedural and non-procedural query language: procedural and non-procedural query language Relational Algebra: Relational Algebra is a procedural query language which take relation as input and gives relation as output. It uses various operation to perform this action. It is performed recursively on a relation and intermediate results are also considered as relations. Video on Relational Algebra: Relational Algebra Theory: database-management-system-relational-algebra relational-algebra-dbms basic-operators-in-relational-algebra extended-operators-in-relational-algebra dbms-row-oriented-vs-column-oriented-data-stores Types of operations in relational algebra: 1. Basic/fundamental operations - Select, project, Union, Set Difference, Cartesian product, Rename. 2. Derived operations - Join (Natural, Left, Right, Full), Intersection, Division. relational_algebra 1. Basic/Fundamental operations: a. Select (σ): It selects tuples that satisfy the given predicate/condition from a relation. It is Unary operator which can take one table at a time. Syntax: select_algebra e.g. Find the details of Student who live in Rohini select_algebra_eg select_algebra_eg_output Video on Select operation: 1. Select operation1 2. Select operation2 b. Project (π): It selects the desired columns from a relation. It is Unary operator which can take one table at a time. Syntax: project_algebra e.g. Find all student name along with their rank project_algebra_eg 1. Video on Project Operation: Project Operation 2. Select and Project operations examples: Select and Project operations c. Union (U): It works on multiple tables. It includes all the tuples that are in table A or in B. Union helps to remove duplicate tuples. Syntax: A U B union_algebra Video on Union: Union d. Set difference (-): If A - B, then the result of this includes all the tuples that are in A but not in B. If B - A, then the result of this includes all the tuples that are in B but not in A. a_difference_b_algebra b_difference_a_algebra Video on Set difference: Set difference e. Cartesian product (X): It is helpful to merge columns from two relations. cartesian_product_algebra Video : Cartesian product Problems: Problems in Cartesian product f. Rename (ρ): Result of relational algebra is relation but without any name so, rename operations helps in that. Rename operation helps to rename the output relation. 2. Derived operations: a. Natural Join: Video on Natural Join Natural Join A Natural Join is a join operation in which 2 tables are joined based on all common columns. natural_join b. Left Outer Join: It returns all records from the left relation and matched records from the right relation and if there is no match then the result is null from the right side. left_join c. Right Outer Join: It returns all records from the right table and matched records from the left table and if there is no match then the result is null from the left side. right_join d. Full Outer Join: It returns all matching records from both tables whether the other matches or not. full_join Outer Join or Full Outer join: Outer Join or Full outer join Join or Inner Join: Join or Inner Join Join or Inner Join with 'ON' operation: Join or Inner Join with 'ON' operation e. Intersection (∩): Records that are present in both the relation A and B will only present in the set obtained by intersection of A and B (i.e. common tuple in both relation). intersection_algebra f. Division: division_algebra Extended operators in Relational Algebra: Extended operators in Relational Algebra
 
Run
Id Name