The relationship between GIS and standard Quary language "SQL"
"SQL" Standard search language OR language of arithmetic and logical questions:-
- It is a non-procedural language comparable to programming languages.
- Developed by IBM.
- SQL is the abbreviation for Standard or Structured Query Language.
- The SQL language includes two languages (arithmetic and logical) (suspicion of arithmetic) combinations.
- Subtraction, denomination, multiplication, and others (as for territorial suspicion), they are blamed on Boolean Algebra.
- It depends on three main vocabulary (- AND, OR, NOT.)
- " E.g. devising the population schedule 1996 and not the population table 2000"
The basic structure of the language - SQL basic structure is based on three important vocabulary:-
- Select Field Attribute (s) (Field in Table).
- Choose Table - Form Relation (s) (Table).
- condition = +> <- Where Condition.
Example:-
- Select (Country – Name And Population)
- From (Country – Pop)
- Where (population < 1000000)
There Are 9 Main Relational Algebra Operations:-
1- Select:- (Select Tuples {Records} From A Relation).
2- Project:- (Extract Attributes From a Relation).
3- Restrict:- (Extract Tuples {Records} From A Relation {Table}).
4- Union:- (New Relation With All Tuples From Relation).
5- Intersection:- (New Relation Of Tuples in Both Relation).
6- Difference:- (A - B) (Tuples Exist in The 1st Relation But Not Exist in The 2st Relation).
7- Difference:- (B - A) (Tuples Exist in The 1st Relation But Not Exist in The 2st Relation).
8- Join:- (Take Two Relation Joined By a Common Attribute {Field}).
9- Product:- (All Possible Combination Of Tuples).
Some Examples:-
1- Select → Select (Relation : Tuples)
↪Select (Student : Y=3)
2- Project → project (Relation : Attributes)
↪Project (Student : Stud-ID , Grade)
3- Restrict → Restrict (Relation : Condition)
↪Restrict ( Cities : Pop > 100000)
4- Union → Union (Relation-1 , Relation-2)
↪Union (Students , Courses)
5- Join → Join (Relation : Attribute , Relation : Same Attribute)
Source:-
DR. Mona Ahmed (2019): GIS1 Lectures , Maps Division, Cairo University
تعليقات: 0
إرسال تعليق