• Stars
    star
    647
  • Rank 69,579 (Top 2 %)
  • Language
  • License
    Other
  • Created over 9 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Northwind sample database for postgres

Northwind database for Postgres

A simple sql script that will populate a database with the famous northwind example, adapted for postgres.

Getting started:

Manually

Use the provided sql file nortwhind.sql in order to populate your database.

With Docker and docker compose

Pre-requirement: install docker and docker-compose

https://www.docker.com/get-started

https://docs.docker.com/compose/install/

1. Run docker-compose

> docker-compose up
...
... Lots of messages...
...
Creating network "northwind_psql_db" with driver "bridge"
Creating volume "northwind_psql_db" with default driver
Creating volume "northwind_psql_pgadmin" with default driver
Creating pgadmin ... done
Creating db      ... done

2. Run psql client:

Method 1: Via the docker-compose container

Open another terminal window, and type:

> docker-compose exec db psql -U postgres -d northwind

psql (13.2 (Debian 13.2-1.pgdg100+1))
Type "help" for help.

northwind=# select * from us_states;
 state_id |      state_name      | state_abbr | state_region
----------+----------------------+------------+--------------
        1 | Alabama              | AL         | south
        2 | Alaska               | AK         | north
        ...

Alternatively, you can launch bash, then psql:

docker-compose exec db /bin/bash

# You are now inside the "db" docker container
psql -U postgres northwind
Method 2: Direct access via the port 55432

The "db" docker exposes postgres on the port 55432. If you have psql on your path, you may connect to it via:

# Run this directly from your computer (this will connect to the docker db)
psql -U postgres northwind -p 55432

3. Connect PgAdmin

Access to PgAdmin at the url: http://localhost:5050

Add a new server in PgAdmin:

  • General Tab:
    • Name = db
  • Connection Tab:
    • Host name: db
    • Username: postgres
    • Password: postgres

Then, select database "northwind".

4. Stop docker-compose

Stop the server that was launched by docker compose up via Ctrl-C, then remove the containers via:

docker-compose down

5. Files & persistence

Your modifications to the postgres database(s)will be persisted in the postgresql_data docker volume, and can be retrieved once you restart docker compose up.

If you need to delete the database data, run docker-compose down -v (the database will then be repopulated from scratch when running docker-compose up).

If you need to upload any files into your db container, just copy and paste them to the files local folder. They will be available at the /files path inside the db container.

More Repositories

1

hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping
C++
536
star
2

imgui_bundle

Dear ImGui Bundle: easily create ImGui applications in Python and C++. Batteries included!
Python
470
star
3

imgui_manual

https://pthom.github.io/imgui_manual_online - an interactive manual for ImGui
Python
285
star
4

cleantype

Readable and consistent C++ type introspection - Compiler Decipherer
C++
86
star
5

imgui_datascience

(py)imgui for data and computer vision scientists
Python
85
star
6

cvnp

cvnp: pybind11 casts between numpy and OpenCV, with shared memory
C++
46
star
7

immvision

ImmVision, aka Immediate Vision: immediate image debugger and insights
C++
36
star
8

implot_demo

Online demo for [implot](https://github.com/epezent/implot)
C++
23
star
9

litgen

litgen: a pybind11 automatic generator for humans who like nice code and API documentation. Also a C++ transformer tool
Jupyter Notebook
20
star
10

hello_imgui_my_app

Sample app using hello_imgui
C++
19
star
11

TestSolvePnp

sandbox for testing various pnp strategies with opencv
C++
12
star
12

rpn_calculator

A sample RPN calculator build with ImGui Bundle and HelloImGui
C++
8
star
13

cmake_registertest

cmake scripts for googletest / catch / doctest. Automatic tests registration, even inside library code.
CMake
6
star
14

hello_imgui_template

A quick start template to work with Hello ImGui
HTML
6
star
15

clion-ninja

Python
4
star
16

multiplicative-persistence

Sandbox around multiplicative persistence
C++
3
star
17

Cling_Repl_Demo

Some demos and docs around cling and xeus-cling
Jupyter Notebook
3
star
18

imgui_bundle_template

A quick start template to work with Dear ImGui Bundle
HTML
3
star
19

imgui_manual_online

ImGui Manual - Online
HTML
2
star
20

srcml_caller

srcml_caller, simple python bindings for srcML
C++
2
star
21

catch_registerstaticlibrary

Static library testing made easy with catch and cmake
Python
1
star
22

function_list_vs_abtsract_interface

explores a possible alternative to pure abstract interfaces in C++, under the form of a list of std::function
C++
1
star
23

clcache-msbuild-install

Easily integrate clcache with Visual Studio and msbuild
Python
1
star
24

node_window_clipping_issue

Example code for reproducing https://github.com/thedmd/imgui-node-editor/issues/205
C++
1
star
25

cpp_skeleton

multiplatform c++ project skeleton (using fplus, doctest, conan, travis & appveyor)
CMake
1
star
26

test_conan_opencv_codecs

Python
1
star
27

doctest_registerlibrary

Static library "doctesting" made easy with cmake
Python
1
star
28

env_utils

Shell
1
star
29

pybind_numpy_error

Shortest reproduction of a bug between numpy and pybind11
C++
1
star
30

pylance_test

Dummy repo to test issues with pylance
Python
1
star
31

sandbox-master_repo

1
star
32

pretty_function_sandbox

This repo demonstrates how `__PRETTY_FUNCTION__` can be used in order to get compile time type information.
C++
1
star
33

lg_skbuild_template

An adpatation of scikit_build_example for litgen
Python
1
star
34

tmp_implot_dyn

Sample demo of implot using dynamic link / using long and long double
C++
1
star
35

pthom

1
star
36

FitSpline

Exercice around spline fitting
Jupyter Notebook
1
star
37

fiatlux

Python
1
star
38

sdl_glfw_cmake_issue

Repro of a cmake issue when combining glfw and SDL on MacOS
Shell
1
star
39

lunasvg_perf_issue

Repro for a performance issue with lunasvg and imgui
C++
1
star