You are on page 1of 10

Page |1

NAME: VINAY DATIR


REG. ID: 201080065
BRANCH: INFORMATION TECHNOLOGY
BATCH: C

SPATIAL & GRAPH DATABASES LAB


EXPERIMENT 4

AIM:
pgAdmin - Postgres's Graphical User Interface

Perform following queries on the nyc database :

1. Read all records of nyc_census_blocks, nyc_homicide, nyc_neighborhoods,


nyc_streets, nyc_subway_stations and visualize the data by clicking on the geometry-
viewer icon available in the column header of the geometry data-type.

2. SELECT name, ST_Transform(geom, 4326) FROM nyc_neighborhoods;

3. Find the total length of all the streets in New York City.

4. Find the total area of New York City.

5. (a) What is the well-known text (WKT) of Broad Street subway station?

(b) What neighborhood intersects that subway station?

(c) What streets are within 10 meters of Broad Street subway station?

THEORY:
pgAdmin is a management tool for PostgreSQL and derivative relational
databases such as EnterpriseDB's EDB Advanced Server. It may be run either
as a web or desktop application.
PostgreSQL is a powerful, open-source object-relational database system. It
has more than 15 years of active development and a proven architecture that
has earned it a strong reputation for reliability, data integrity, and correctness.
PostgreSQL runs on all major operating systems, including Linux, UNIX (AIX,
BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows.
It supports text, images, sounds, and video, and includes programming
interfaces for C / C++, Java, Perl, Python, Ruby, Tcl and Open Database
Connectivity (ODBC).
PostgreSQL supports four standard procedural languages, which allows the
users to write their own code in any of the languages and it can be executed by
PostgreSQL database server. These procedural languages
are - PL/pgSQL, PL/Tcl, PL/Perl and PL/Python.
PGAdmin is a web-based GUI tool used to interact with the Postgres database
sessions, both locally and remote servers as well. You can use
PGAdmin to perform any sort of database administration required for a
Postgres database.
Page |2

pgAdmin Interface

OUTPUT :
1. Read and Visualize the data of nyc_census_blocks :
Page |3

2. Read and Visualize the data of nyc_homicides :


Page |4

3. Read and Visualize the data of nyc_neighborhoods :


Page |5

4. Read and Visualize the data of nyc_streets :


Page |6

5. Read and Visualize the data of nyc_subway_stations :


Page |7

6. Read and Visualize the result of the query -> (


SELECT name,ST_Transform(geom,4326)a
From nyc_neighborhoods;) :
Page |8

7. Total length of nyc_streets :


Page |9

8. Total Area of nyc :

9. Well Known Text(WKT) of Broad Street Subway Station :

10. Neighborhood which intersects Broad St. Subway


aaa station :
P a g e | 10

11. Streets within 10m of Broad Street Subway Station :

CONCLUSION:
We have studied basic functionalities of pgAdmin and how to visualize data in
pgAdmin.

You might also like