आज हम What is Relational Algebra in Hindi and Unary and binary Relational Operations in DBMS के बारे मे जानेगे क्या होता है तो चलिए शुरु करते हैं:-
What is Relational Algebra in dbms in hindi:-
इसके द्वारा हम queries को lower level पर प्रस्तुत करते हैं। यह प्रस्तुतिकरण queries evaluation तथा querry optimizer के द्वारा समझी जाती है । सामान्यतः को represent करने के लिए अंग्रेजी भाषा के शब्दों का use करते हैं । किन्तु relational algebra के अन्दर query को प्रस्तुत करने के लिये कुछ special symbol का use किया जाता है ।
SQL केवल Relational Algebra पर आधारित है । Relation Algebra के अन्तर्गत operator दो प्रकार के operators होते हैं ।
( 1 ) Uneary in hindi ( 2 ) Binary in hindi
( 1 ) Uneary in hindi :-
( a ) It require only one relation ( table )
( b ) example
(i) select
(ii) predicate (where clause)
(iii) Rename (Alias)
(2) Binary in hindi:-
(a) are those that require relations
(i) Union (U)
(ii) Intersect (∩)
(iii) Minus
(iv) Divion
(v) Inner Join
(vi) Outer Join
A. left Outer Join
B. Right Outer Join
C. Full Outer Join
1 : - Table name must written in brackets .
2 : - Column name are written in the small letters .
3 : - Column name are written as a subscript of the PI π symbol
4 : - The PI π symbol is used to represent select statement .
Example - display name , class and fee of all the students .
SQL Query : - select name , class , fee from student
relational algebra in dbms in hindi:- Tiname , class , fee ( student )
5 : - Where के स्थान पर sigma (σ) का use किया जाता है।
6 : - Condition को Sigma के subscript में तथा Brackets ( ) मे लिखा जाता है ।
7 : - Condition मे Relational , logical , operator का use किया जाता है ।
Relation Operators:-
is equals too =
Not equals too ≠
Greater than >
Less than <
Greater than or equals too ≥
Less than or equals too ≤
Logical operators:-
And
Or V
relational algebra in dbms with examples:- Retrieve employee name, job, & salary for those em ployees who are earning more than 2000 & working as clerk.
SQL Querry :- Select ename, salary, job from emp where salary > 2000 and Job = 'clerk'
FoxPro Query :- list fields ename, salary, job for salary > 2000 and job = "clerk" %3D
Relation Algebra:-
𝝅ename, salary, Job (≥σsalary>2000۸job="clerck"(amp.))
Joins:-
एक से अधिक tables को आपस में Relate करने के लिये Join का Use किया जाता है । यह तीन प्रकार के होते हैं
( i ) Inner Join Natural Join
( ii ) Cross / Cartesion Product
( iii ) Outer Join
( i ) Inner Join :-
( iii ) Outer Join :-
(i) Inner join/Natural join - example
1. List Employess name, department name, location of all Em- ployees.
Query :- Select ename, dname form emp
inner join DEPT (Using deptno)
Relational Algebra in dbms in hindi :- 𝝅ename, dname (emp ⋈ dept)
2. list employee name, department name of New York.
Querry :- Select ename, dname, loc from emp inner join dept using (dept no) where loc = "New York"
Relational Algebra in dbms in hindi :- 𝝅ename, dname,loc (σloc = "New York") (emp ⋈ dept)
(ii) Cross / curtesion : -example
1. list employee name, departname name, location of all employ- ers
Querry :- select ename, dname from emp cross join dept.
Relational Algebra in dbms in hindi :- 𝝅ename, dname(emp X dept)
(iii) Outer Join - example :-
list employess name department name location of all employ- ers
Querry :- select ename, dname from dept full outer join emp on amp. deptno = dept.deptno
Relational Algebra in hindi :-
𝝅Neame, dname (emp dept)
टिप्पणियाँ
एक टिप्पणी भेजें