RDMS Journal - 23gi04
RDMS Journal - 23gi04
“Introduction to ArcGIS”
M.Sc. GEOINFORMACTICS
ID: 23GI04
SEMESTER: 1
YEAR: 2023-2024
Guided by:
Akangsha Varma
Asst.professor, Geoinformatics Department -ISTAR
The CVM Universtiy
V.V. Nagar-388120, Gujarat, India
(ISTAR)
1
CERTIFICATE
This is to certify that the project work embodied in this report entitled "JOURNAL ON
RDMS" was carried out by Miss. Payal Hazra (23GI04) at the Geoinformatics
department, Institute of Science and Technology for Advanced Studies and Research
(ISTAR)- CVM University, Vallabh Vidyanagar fulfilment of the requirement for the
award of M.Sc. (Geoinformatics) for the Project Work (201400107). This project work
has been carried out under my guidance and it is up to my satisfaction.
Signature:
Akangsha Varma
Asst.professor
M.Sc. Geoinformatics
2
ACKNOWLEDGEMENT
My Sincere efforts have made me to accomplish the task of completing this project. I have
taken effort in this project. However it would not have been possible without the kind support
and help of many individuals.
I would like to express my gratitude to my Principal Dr. M .M. Raj , I/C Principal, ISTAR
CVM University and the college for providing me with facilities required to do the project.
Thanking you
Payal Hazra
3
LIST OF CONTENT
4
List of Figure
5
1 . Introduction to RDMS
TABLES: Data is organized into tables, each containing rows and columns. Each
table represent special; entity or data type.
Popular examples of RDBMS systems include Oracle Database, Microsoft SQL Server,
MySQL, PostgreSQL, and SQLite. RDBMS is commonly used for a wide range of
applications, from business data management to GIS, where it helps in the storage and
retrieval of structured data efficiently.
RDMS IN GIS:
Oracle Spatial: Oracle offers a spatial extension that allows for the storage and analysis of
spatial data within the Oracle database.
Microsoft SQL Server with Spatial: Microsoft SQL Server includes spatial data types and
functions, making it suitable for GIS applications.
MySQL with Spatial Extensions: MySQL also provides spatial extensions for handling
geospatial data, although it may be less feature-rich compared to PostgreSQL and SQL
Server.
6
These RDBMS systems allow us for efficient storage, querying, and analysis of geographic
data, making them integral components of GIS workflows.
7
2. MY SQL
1. Spatial Data Types: MySQL has spatial data types, such as Point, Line String, Polygon,
and Geometry, which allow you to store and manage geographic data efficiently.
2. Spatial Functions: MySQL provides a set of spatial functions to perform various spatial
operations, including distance calculations, spatial joins, and geometric operations on spatial
data.
3. Indexing: You can create spatial indexes to optimize the performance of spatial queries
and retrievals in GIS applications.
4. Compatibility: MySQL can be used with various GIS software and libraries, making it
versatile for geospatial data management.
5. Open Source: MySQL is open source and cost-effective, which can be advantageous for
small to medium-scale GIS projects.
8
3. KEY ELEMENT
SQL (Structured Query Language) consists of several key elements that make up its syntax
and structure:
1. Clauses: SQL queries are composed of various clauses, each serving a specific purpose.
Common clauses include:
- SELECT: Specifies which columns to retrieve.
- FROM: Specifies the table(s) from which to retrieve data.
- WHERE: Filters rows based on specified conditions.
- GROUP BY: Groups rows for aggregation.
- HAVING: Filters grouped data.
- ORDER BY: Sorts the result set.
- JOIN: Combines data from multiple tables.
4. Operators: SQL supports various operators, including arithmetic operators (+, -, *, /),
comparison operators (=, <>, >, <, >=, <=), logical operators (AND, OR, NOT), and
concatenation operator (|| or + for string concatenation).
5. Functions: SQL provides a range of built-in functions for data manipulation and analysis.
Common functions include COUNT, SUM, AVG, MAX, MIN for aggregation, and string
functions like CONCAT, SUBSTRING, and date functions like DATEADD, DATEDIFF.
6. Constraints: Constraints are rules applied to columns to maintain data integrity. Common
constraints include PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, and CHECK.
7. Indexes: Indexes are data structures used to optimize data retrieval. They improve query
performance by creating a quick lookup structure for columns.
8. Views: Views are virtual tables created from one or more tables, which simplify complex
queries and provide an abstracted layer for data retrieval.
9. Transactions: Transactions are sequences of SQL statements that are executed as a single
unit. They follow the ACID properties (Atomicity, Consistency, Isolation, Durability) to
ensure data integrity.
9
10. Joins: Joins are used to combine data from multiple tables based on related columns.
Common types include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
These elements form the foundation of SQL, allows us to interact with and manipulate data
within relational databases effectively.
10
4. SQL words and phrases:
10. JOIN: Combines data from multiple tables based on a related column.
11. GROUP BY: Groups rows based on specified columns for aggregation.
12. HAVING: Filters grouped data based on conditions after using GROUP BY.
13. ORDER BY: Sorts the result set in ascending or descending order.
14. COUNT: Calculates the number of rows in a result set or a specific column.
19. PRIMARY KEY: Ensures unique values and identifies each row uniquely in a table.
20. FOREIGN KEY: Establishes a relationship between tables based on a column in one
table that refers to the primary key in another table.
21. INDEX: Improves query performance by creating a data structure for faster data retrieval.
11
23. NULL: Represents missing or unknown data in a column.
24. INNER JOIN: Retrieves records that have matching values in both tables.
25. LEFT JOIN (or LEFT OUTER JOIN): Retrieves all records from the left table and
matching records from the right table.
26. RIGHT JOIN (or RIGHT OUTER JOIN): Retrieves all records from the right table and
matching records from the left table.
27. FULL JOIN (or FULL OUTER JOIN): Retrieves all records when there is a match in
either the left or right table.
These SQL words and phrases are fundamental to working with relational databases and
performing various data operations.
12
5. RDMS PRACTICAL
Figure 2 : Showing first page that appears after opening of the SQL app
STEP 3 : Then we have to click on the gry box in the left side and then enter
the password that we kept while downloading the app.
13
Figure 3 : Showing the password page.
STEP 4 : At first we have to create schema. For creating the schema we need to go
to toolbar and find create a new schema in connecting server, and click on it and
than give a name to your schema and click on apply and now our, schema is
created.
STEP 5 : Next step is to create table and input data as per the requirement.
14
Figure 5 : showing creation of new schemas.
STEP 6 : Next step is to create table. We need to click on table from the tool
bar .
15
STEP 7 : then as per the requirement we will fill the heading for the table.
16
Figure 10 : one of the steps for creating table.
17
STEP 9: As per the requirement we will we fill and create tables.
Figure 13 : Showing and confirming that your table will be saved , after apply and finish.
18
6. My SQL QUERRY
If we want to solve or have any question or find anything from the table we
have to write a query about it and run it, it will show the thing we want.
19
2) The payment is due in two months from the invoice date. Find the payment due
date.
20
4) Find customers who are in not from MP or MH states.
21
6) Find the total price amount of each invoice.
22
8) Display Invoice, Customer Names, Items Names and Quantities together.
9) Display the name of the students who are staying in ‘Square’ Hostel and studying
in MSc (GIS).
23
10) Display the name of the hostel which has the highest capacity.
11) Count and display the number of students for each course along with course
name.
24
12) Display the course name in which ‘Aryan’ study.
13) List the details of students whose name have ‘A’ as one of the character.
25
26