Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DataEngineering
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Kuoni
DataEngineering
Commits
18734982
Commit
18734982
authored
7 years ago
by
Marcel Huber
Browse files
Options
Downloads
Patches
Plain Diff
restyled
parent
4d4f971c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
PostGraphile/README.md
+45
-50
45 additions, 50 deletions
PostGraphile/README.md
PostGraphile/README.solutions.md
+57
-13
57 additions, 13 deletions
PostGraphile/README.solutions.md
with
102 additions
and
63 deletions
PostGraphile/README.md
+
45
−
50
View file @
18734982
# Übung 14: PostgreSQL + GrapQL
# Übung 14: PostgreSQL + Grap
h
QL
## Lernziele
...
...
@@ -13,27 +13,34 @@
#### Mit Docker/docker-compose
*
https://gitlab.dev.ifs.hsr.ch/m1huber/Dbs2Uebungen (https://gitlab.dev.ifs.hsr.ch/m1huber/Dbs2Uebungen.git) lokal klonen
*
ins Verzeichnis Dbs2Uebungen/docker/ wechseln
*
docker-compose up --build -d
*
http://localhost:5000/graphiql öffnen
-
https://gitlab.dev.ifs.hsr.ch/m1huber/Dbs2Uebungen
(https://gitlab.dev.ifs.hsr.ch/m1huber/Dbs2Uebungen.git) lokal
klonen
-
ins Verzeichnis Dbs2Uebungen/docker/ wechseln
-
docker-compose up --build -d
-
http://localhost:5000/graphiql öffnen
#### Mit lokaler DB/node/npm
*
AngProj installieren (https://gitlab.dev.ifs.hsr.ch/ifs/AngProj)
*
`npm install -g postgraphile@next`
*
`postgraphile --connection postgres://postgres:postgres@localhost/angproj --watch --dynamic-json -p 5000`
*
http://localhost:5000/graphiql öffnen
-
AngProj installieren (https://gitlab.dev.ifs.hsr.ch/ifs/AngProj)
-
`npm install -g postgraphile@next`
-
`postgraphile --connection postgres://postgres:postgres@localhost/angproj --watch --dynamic-json -p 5000`
-
http://localhost:5000/graphiql öffnen
### Bereitgestellte Instanzen
*
https://{0-20}.postgraphile.sifs0003.infs.ch/graphiql öffnen und eine Instanz verwenden. (zB https://13.postgraphile.sifs0003.infs.ch/graphiql)
Bitte sprecht untereinander ab, wer welche Instanz verwendet. Nutzername und Passwort: 'postgraphile'/'dbs2uebung'
-
https://{0-20}.postgraphile.sifs0003.infs.ch/graphiql öffnen und
eine Instanz verwenden. (zB
https://13.postgraphile.sifs0003.infs.ch/graphiql) Bitte sprecht
untereinander ab, wer welche Instanz verwendet. Nutzername und
Passwort:
`postgraphile`
/
`dbs2uebung`
**Hinweise:**
-
Die Instanzen werden nach jeder Übung zurückgesetzt (um 00, 02, 04, 06, 08, 10, 12, 14, 16, 18, 20, 22)!
-
Wenn eine der 21 Instanzen nicht funktionieren sollte, bitte eine andere (freie) nehmen.
-
Die Instanzen werden nach jeder Übung zurückgesetzt (um 00, 02, 04,
06, 08, 10, 12, 14, 16, 18, 20, 22)!
-
Wenn eine der 21 Instanzen nicht funktionieren sollte, bitte eine
andere (freie) nehmen.
-
Richtzeit der Übung 45min.
## Aufgaben
...
...
@@ -45,6 +52,7 @@ tbd.
<!-- SOLUTION
-
***Lösungsvorschlag***
```graphql
query {
allProjekts {
...
...
@@ -65,15 +73,6 @@ query {
}
```
SOLUTION -->
<!-- SOLUTION
-
***Lösungsvorschlag***
``` sql
DROP TABLE IF EXISTS TBD;
```
SOLUTION -->
## Musterlösung
Die Musterlösung zu dieser Übung finden Sie auf
[
dieser
...
...
@@ -84,12 +83,8 @@ Datei.
---
keywords:
-
database
-
distributed
-
replication
-
sharding
-
cluster
-
mongodb
-
nosql
-
postgresql
-
graphiql
-
graphql
title: 'Übung 14: PostgreSQL + GraphQL'
---
This diff is collapsed.
Click to expand it.
PostGraphile/README.solutions.md
+
57
−
13
View file @
18734982
# Übung 14: PostgreSQL + GrapQL
# Übung 14: PostgreSQL + Grap
h
QL
## Lernziele
-
??
-
Graphql/Graphiql kennenlernen
-
Bestehende AngProj Datanbank Ändern und Abfragen können
-
Teile der DBS1 Queries mit Graphql auf PostGraphile ausführen können
-
Optional: Eigene DB erstellen und abfragen
## Vorbereitung
tbd.
### Lokale Installation
#### Mit Docker/docker-compose
-
https://gitlab.dev.ifs.hsr.ch/m1huber/Dbs2Uebungen
(https://gitlab.dev.ifs.hsr.ch/m1huber/Dbs2Uebungen.git) lokal
klonen
-
ins Verzeichnis Dbs2Uebungen/docker/ wechseln
-
docker-compose up --build -d
-
http://localhost:5000/graphiql öffnen
#### Mit lokaler DB/node/npm
-
AngProj installieren (https://gitlab.dev.ifs.hsr.ch/ifs/AngProj)
-
`npm install -g postgraphile@next`
-
`postgraphile --connection postgres://postgres:postgres@localhost/angproj --watch --dynamic-json -p 5000`
-
http://localhost:5000/graphiql öffnen
### Bereitgestellte Instanzen
-
https://{0-20}.postgraphile.sifs0003.infs.ch/graphiql öffnen und
eine Instanz verwenden. (zB
https://13.postgraphile.sifs0003.infs.ch/graphiql) Bitte sprecht
untereinander ab, wer welche Instanz verwendet. Nutzername und
Passwort:
`postgraphile`
/
`dbs2uebung`
**Hinweise:**
-
tbd.
-
Die Instanzen werden nach jeder Übung zurückgesetzt (um 00, 02, 04,
06, 08, 10, 12, 14, 16, 18, 20, 22)!
-
Wenn eine der 21 Instanzen nicht funktionieren sollte, bitte eine
andere (freie) nehmen.
-
Richtzeit der Übung 45min.
## Aufgaben
...
...
@@ -20,8 +51,24 @@ tbd.
-
***Lösungsvorschlag***
``` sql
DROP TABLE IF EXISTS TBD;
``` graphql
query {
allProjekts {
nodes {
nodeId
projnr
bezeichnung
startzeit
dauer
aufwand
angestellterByProjleiter {
name
tel
salaer
}
}
}
}
```
## Musterlösung
...
...
@@ -34,12 +81,9 @@ Datei.
---
keywords:
-
database
-
distributed
-
replication
-
sharding
-
cluster
-
mongodb
-
nosql
title: 'Übung 14: PostgreSQL + GrapQL'
-
postgresql
-
graphiql
-
graphql
title: 'Übung 14: PostgreSQL + GraphQL'
---
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment