Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Datenbanken SS20
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leon Kleinheinz
Datenbanken SS20
Commits
77ec1ad8
Commit
77ec1ad8
authored
Jun 18, 2020
by
maa676
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
senden
parent
650b7f4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
Übung5.1/LeonKleinheinz.sql
Übung5.1/LeonKleinheinz.sql
+10
-0
No files found.
Übung5.1/LeonKleinheinz.sql
0 → 100644
View file @
77ec1ad8
--3. Ändern Sie das Attribut name der Tabelle countries vom Wert "United States" in "USA"
update
countries
set
name
=
'USA'
where
name
=
'United States'
;
--4. Fügen Sie eine Geometrie-Spalte zur Tabelle regions hinzu, die Koordinaten des Ortes der (Sales) regions aufnehmen kann. Wählen Sie einen sinnvollen Geometrie-Datentyp.
select
addgeometrycolumn
(
'regions'
,
'headquarter_coor'
,
4326
,
'Point'
,
2
);
--5. Fügen Sie per SQL/PostGIS für die vier Orte die Koordinaten von Wikipedia ein, x und y müssen getauscht werden.
update
regions
set
headquarter_coor
=
ST_SetSRID
(
st_makepoint
(
13
.
4083
,
52
.
5186
),
4326
)
where
region_headquarter_city
=
'Mainz'
;
update
regions
set
headquarter_coor
=
ST_SetSRID
(
st_makepoint
(
-
3
.
7039
,
40
.
4125
),
4326
)
where
region_headquarter_city
=
'Madrid'
;
update
regions
set
headquarter_coor
=
ST_SetSRID
(
st_makepoint
(
-
80
.
2242
,
25
.
7878
),
4326
)
where
region_headquarter_city
=
'Miami'
;
update
regions
set
headquarter_coor
=
ST_SetSRID
(
st_makepoint
(
-
43
.
1964
,
-
22
.
9083
),
4326
)
where
region_headquarter_city
=
'Rio de Janeiro'
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment